Solving issue 2274: "Adding a suffix to the version string"
This commit is contained in:
@@ -33,6 +33,12 @@ else (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
|
||||
include("${PROJECT_SOURCE_DIR}/ReleaseInfo.cmake")
|
||||
endif (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
|
||||
|
||||
if (VERSION_SUFFIX STREQUAL "")
|
||||
set (HG_VERSION_SUFFIX "${HG_VERSION}")
|
||||
else (VERSION_SUFFIX STREQUAL "")
|
||||
set (HG_VERSION_SUFFIX "${HG_VERSION} ${VERSION_SUFFIX}")
|
||||
endif ()
|
||||
|
||||
# build version.h from template
|
||||
configure_file ("${PROJECT_SOURCE_DIR}/rtgui/version.h.in" "${CMAKE_BINARY_DIR}/rtgui/version.h")
|
||||
# build AboutThisBuild.txt from template
|
||||
|
@@ -1,5 +1,5 @@
|
||||
Branch: ${HG_BRANCH}
|
||||
Version: ${HG_VERSION}
|
||||
Version: ${HG_VERSION_SUFFIX}
|
||||
Changeset: ${HG_CHANGESET}
|
||||
Compiler: ${COMPILER_INFO}
|
||||
Processor: ${PROC_LABEL}
|
||||
|
@@ -312,6 +312,7 @@ set(ABOUT_COMMAND_WITH_ARGS ${CMAKE_COMMAND}
|
||||
-DPROC_LABEL:STRING="${PROC_LABEL}"
|
||||
-DPROC_BIT_DEPTH:STRING="${PROC_BIT_DEPTH}"
|
||||
-DBUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
|
||||
-DVERSION_SUFFIX:STRING=${VERSION_SUFFIX}
|
||||
-DGTKMM_VERSION:STRING=${GTKMM_VERSION}
|
||||
-DOPTION_OMP:STRING=${OPTION_OMP}
|
||||
-DWITH_MYFILE_MMAP:STRING=${WITH_MYFILE_MMAP})
|
||||
|
@@ -42,7 +42,8 @@ Glib::ustring Options::rtdir;
|
||||
Glib::ustring Options::cacheBaseDir;
|
||||
|
||||
Options options;
|
||||
Glib::ustring versionString = VERSION;
|
||||
Glib::ustring versionString = VERSION;
|
||||
Glib::ustring versionSuffixString = VERSION_SUFFIX;
|
||||
Glib::ustring paramFileExtension = ".pp3";
|
||||
|
||||
Options::Options () {
|
||||
|
@@ -289,6 +289,7 @@ extern Glib::ustring argv0;
|
||||
extern Glib::ustring argv1;
|
||||
extern bool simpleEditor;
|
||||
extern Glib::ustring versionString;
|
||||
extern Glib::ustring versionSuffixString;
|
||||
extern Glib::ustring paramFileExtension;
|
||||
|
||||
#endif
|
||||
|
@@ -113,7 +113,10 @@ RTWindow::RTWindow ()
|
||||
gtkosx_application_ready (osxApp);
|
||||
}
|
||||
#endif
|
||||
set_title("RawTherapee "+versionString);
|
||||
Glib::ustring versionStr("RawTherapee "+versionString);
|
||||
if (!versionSuffixString.empty())
|
||||
versionStr += " "+versionSuffixString;
|
||||
set_title(versionStr);
|
||||
property_allow_shrink() = true;
|
||||
set_default_size(options.windowWidth, options.windowHeight);
|
||||
set_modal(false);
|
||||
|
@@ -25,6 +25,7 @@ extern Glib::ustring argv0;
|
||||
extern Glib::ustring creditsPath;
|
||||
extern Glib::ustring licensePath;
|
||||
extern Glib::ustring versionString;
|
||||
extern Glib::ustring versionSuffixString;
|
||||
|
||||
SplashImage::SplashImage () {
|
||||
|
||||
@@ -63,7 +64,10 @@ bool SplashImage::on_expose_event (GdkEventExpose* event) {
|
||||
gc_->set_foreground(*textColor);
|
||||
|
||||
int w, h;
|
||||
version = create_pango_layout (versionString);
|
||||
Glib::ustring versionStr(versionString);
|
||||
if (!versionSuffixString.empty())
|
||||
versionStr += " "+versionSuffixString;
|
||||
version = create_pango_layout (versionStr);
|
||||
version->get_pixel_size (w, h);
|
||||
window->draw_layout(gc_, pixbuf->get_width() - w - 4, pixbuf->get_height() - h - 4, version);
|
||||
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#define _VERSION_
|
||||
|
||||
#define VERSION "${HG_VERSION}"
|
||||
#define VERSION_SUFFIX "${VERSION_SUFFIX}"
|
||||
#define TAGDISTANCE ${HG_TAGDISTANCE}
|
||||
#define CACHEFOLDERNAME "RawTherapee${CACHE_NAME_SUFFIX}"
|
||||
|
||||
|
@@ -22,6 +22,9 @@ set(CACHE_NAME_SUFFIX "" CACHE STRING "RawTherapee's cache folder suffix (leave
|
||||
# This line will let you chose the target number, and the associated processor
|
||||
set(PROC_TARGET_NUMBER 0 CACHE STRING "Target Processor")
|
||||
|
||||
# To add a version suffix (text) after the standard version number, e.g. for patched builds
|
||||
set(VERSION_SUFFIX "" CACHE STRING "For patched builds, use this string to add a version suffix (text); KEEP EMPTY FOR RELEASE BULDS")
|
||||
|
||||
# If you want to force the target processor name when PROC_TARGET_NUMBER = 0 or 2,
|
||||
# uncomment the next line and replace labelWithoutQuotes by its value
|
||||
#set (PROC_LABEL labelWithoutQuotes CACHE STRING "Target Processor label")
|
||||
|
Reference in New Issue
Block a user