diff --git a/AboutThisBuild.cmake b/AboutThisBuild.cmake index 56cf47fd8..c937a259c 100644 --- a/AboutThisBuild.cmake +++ b/AboutThisBuild.cmake @@ -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 diff --git a/AboutThisBuild.txt.in b/AboutThisBuild.txt.in index 618926eec..2d8cf207e 100644 --- a/AboutThisBuild.txt.in +++ b/AboutThisBuild.txt.in @@ -1,5 +1,5 @@ Branch: ${HG_BRANCH} -Version: ${HG_VERSION} +Version: ${HG_VERSION_SUFFIX} Changeset: ${HG_CHANGESET} Compiler: ${COMPILER_INFO} Processor: ${PROC_LABEL} diff --git a/CMakeLists.txt b/CMakeLists.txt index 984ee26c0..b2b1ba8fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) diff --git a/rtgui/options.cc b/rtgui/options.cc index 3b9d4b45f..efd650a84 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -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 () { diff --git a/rtgui/options.h b/rtgui/options.h index 4500c6b85..53b5e7e5f 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -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 diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index cf3b31f9a..6a961d98d 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -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); diff --git a/rtgui/splash.cc b/rtgui/splash.cc index c0f69455d..1747fb44d 100644 --- a/rtgui/splash.cc +++ b/rtgui/splash.cc @@ -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); diff --git a/rtgui/version.h.in b/rtgui/version.h.in index 335e2840d..29e7ccbed 100644 --- a/rtgui/version.h.in +++ b/rtgui/version.h.in @@ -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}" diff --git a/win.cmake b/win.cmake index 2259c144f..b4bbc66a2 100644 --- a/win.cmake +++ b/win.cmake @@ -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")