PP3 file version is now manually specified in a header file (ppversion.h) for easier version tracking through Mercurial. It has been set to 300 instead of {latestagdistance} which was a bad idea. This could chnage if the Mercurial team manage to create a reliable absolute version numbering of the remote repos before the 3.0 release.
This commit is contained in:
parent
01401c20a6
commit
c2ad633fe8
@ -42,6 +42,8 @@ if (APPLE)
|
|||||||
SET (CMAKE_OSX_DEPLOYMENT_TARGET "10.5")
|
SET (CMAKE_OSX_DEPLOYMENT_TARGET "10.5")
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
|
option (AUTOMATED_BUILD_SYSTEM "TRUE if built by an automate" OFF)
|
||||||
|
|
||||||
option (BUILD_SHARED "Build rawtherapee with shared libraries" OFF)
|
option (BUILD_SHARED "Build rawtherapee with shared libraries" OFF)
|
||||||
option (WITH_RAWZOR "Build with Rawzor support" OFF)
|
option (WITH_RAWZOR "Build with Rawzor support" OFF)
|
||||||
option (WITH_MYFILE_MMAP "Build using memory mapped file" OFF)
|
option (WITH_MYFILE_MMAP "Build using memory mapped file" OFF)
|
||||||
@ -139,6 +141,24 @@ else (WIN32)
|
|||||||
find_package (ZLIB REQUIRED)
|
find_package (ZLIB REQUIRED)
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
||||||
|
if (AUTOMATED_BUILD_SYSTEM)
|
||||||
|
|
||||||
|
message(WARNING "Automated build system mode! You have to make sure that AboutThisBuild.txt and rtgui/version.h are up-to-date by building RT at least one time with AUTOMATED_BUILD_SYSTEM=OFF.")
|
||||||
|
|
||||||
|
# Checking for the presence of AboutThisBuild.txt
|
||||||
|
find_file(ABOUT_FILE AboutThisBuild.txt PATHS "${CMAKE_CURRENT_SOURCE_DIR}" NO_DEFAULT_PATH)
|
||||||
|
if (ABOUT_FILE STREQUAL ABOUT_FILE-NOTFOUND)
|
||||||
|
message(FATAL_ERROR "AboutThisBuild.txt not found! You have to build RT at least one time with AUTOMATED_BUILD_SYSTEM=OFF to generate this file.")
|
||||||
|
endif (ABOUT_FILE STREQUAL ABOUT_FILE-NOTFOUND)
|
||||||
|
|
||||||
|
# Checking for the presence of version.h
|
||||||
|
find_file(VERSION_FILE version.h PATHS "${CMAKE_CURRENT_SOURCE_DIR}/rtgui" NO_DEFAULT_PATH)
|
||||||
|
if (VERSION_FILE STREQUAL VERSION_FILE-NOTFOUND)
|
||||||
|
message(FATAL_ERROR "rtgui/version.h not found! You have to build RT at least one time with AUTOMATED_BUILD_SYSTEM=OFF to generate this file.")
|
||||||
|
endif (VERSION_FILE STREQUAL VERSION_FILE-NOTFOUND)
|
||||||
|
|
||||||
|
else (AUTOMATED_BUILD_SYSTEM)
|
||||||
|
|
||||||
# set the bit number information of the platform
|
# set the bit number information of the platform
|
||||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||||
set(PROC_BIT_DEPTH 32 bits)
|
set(PROC_BIT_DEPTH 32 bits)
|
||||||
@ -156,6 +176,8 @@ else (WIN32)
|
|||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
add_dependencies(AboutFile Debug Release MinSizeRel RelWithDebInfo)
|
add_dependencies(AboutFile Debug Release MinSizeRel RelWithDebInfo)
|
||||||
|
|
||||||
|
endif (AUTOMATED_BUILD_SYSTEM)
|
||||||
|
|
||||||
# link rawzor
|
# link rawzor
|
||||||
if (WITH_RAWZOR)
|
if (WITH_RAWZOR)
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
@ -9,7 +9,7 @@ Cmake is actually used to create the Makefiles (scripts that handle the build pr
|
|||||||
It is designed to find all necessary compilation flags for your specific machine, but everything can be overriden.
|
It is designed to find all necessary compilation flags for your specific machine, but everything can be overriden.
|
||||||
|
|
||||||
RT's build mechanism will generate a build information file, named "AboutThisBuild.txt", and require some parameters that can't be set by Cmake, so it's
|
RT's build mechanism will generate a build information file, named "AboutThisBuild.txt", and require some parameters that can't be set by Cmake, so it's
|
||||||
done in our build script, and may be aoverriden at your own will. The build process also enable some sort of cross compiling, since you can only choose
|
done in our build script, and may be overriden at your own will. The build process also enable some sort of cross compiling, since you can only choose
|
||||||
a specific processor variation of the same type (e.g. core2, athlon64, which are both an x86 architecture). Real cross compiling (e.g. building the windows
|
a specific processor variation of the same type (e.g. core2, athlon64, which are both an x86 architecture). Real cross compiling (e.g. building the windows
|
||||||
version on a linux platform) has not been tested.
|
version on a linux platform) has not been tested.
|
||||||
|
|
||||||
@ -17,6 +17,11 @@ By default, no processor is specified, so Cmake/GCC will build RT for your proce
|
|||||||
download then have to set the processor label manually (set to 'undefined' by default) with the PROC_FORCED_LABEL cmake's parameter (we assume that you know
|
download then have to set the processor label manually (set to 'undefined' by default) with the PROC_FORCED_LABEL cmake's parameter (we assume that you know
|
||||||
how to specify a cmake parameter).
|
how to specify a cmake parameter).
|
||||||
|
|
||||||
|
Note for developers that handle an automated build system : Mercurial is requested in order to produce the build information file, but you build system will
|
||||||
|
certainly only use the source code without any access to a Mercurial repository. In this case, you have to first build RT like explained below to generates
|
||||||
|
the build information files, then you can tell your build system to run cmake with the following additionnal parameter : -D AUTOMATED_BUILD_SYSTEM:BOOL=ON.
|
||||||
|
Cmake will then pass the files creation step, but will check the presence of the requested files and stop if they're not there.
|
||||||
|
|
||||||
|
|
||||||
Windows
|
Windows
|
||||||
-------
|
-------
|
||||||
|
@ -23,9 +23,12 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <version.h>
|
#include <version.h>
|
||||||
|
#include <ppversion.h>
|
||||||
|
|
||||||
#include <safekeyfile.h>
|
#include <safekeyfile.h>
|
||||||
|
|
||||||
|
#define APPVERSION VERSION
|
||||||
|
|
||||||
namespace rtengine {
|
namespace rtengine {
|
||||||
namespace procparams {
|
namespace procparams {
|
||||||
|
|
||||||
@ -223,14 +226,15 @@ raw.preser=0.0;
|
|||||||
exif.clear ();
|
exif.clear ();
|
||||||
iptc.clear ();
|
iptc.clear ();
|
||||||
|
|
||||||
version = TAGDISTANCE;
|
ppVersion = PPVERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ProcParams::save (Glib::ustring fname) const {
|
int ProcParams::save (Glib::ustring fname) const {
|
||||||
|
|
||||||
SafeKeyFile keyFile;
|
SafeKeyFile keyFile;
|
||||||
|
|
||||||
keyFile.set_integer ("Version", "Version", TAGDISTANCE);
|
keyFile.set_string ("Version", "AppVersion", APPVERSION);
|
||||||
|
keyFile.set_integer ("Version", "Version", PPVERSION);
|
||||||
|
|
||||||
// save tonecurve:
|
// save tonecurve:
|
||||||
keyFile.set_boolean ("Exposure", "Auto", toneCurve.autoexp);
|
keyFile.set_boolean ("Exposure", "Auto", toneCurve.autoexp);
|
||||||
@ -495,9 +499,11 @@ int ProcParams::load (Glib::ustring fname) {
|
|||||||
|
|
||||||
// load tonecurve:
|
// load tonecurve:
|
||||||
|
|
||||||
version = TAGDISTANCE;
|
ppVersion = PPVERSION;
|
||||||
|
appVersion = APPVERSION;
|
||||||
if (keyFile.has_group ("Version")) {
|
if (keyFile.has_group ("Version")) {
|
||||||
if (keyFile.has_key ("Version", "Version")) version = keyFile.get_integer ("Version", "Version");
|
if (keyFile.has_key ("Version", "AppVersion")) appVersion = keyFile.get_string ("Version", "AppVersion");
|
||||||
|
if (keyFile.has_key ("Version", "Version")) ppVersion = keyFile.get_integer ("Version", "Version");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyFile.has_group ("Exposure")) {
|
if (keyFile.has_group ("Exposure")) {
|
||||||
@ -513,7 +519,7 @@ if (keyFile.has_group ("Exposure")) {
|
|||||||
if (keyFile.has_key ("Exposure", "HighlightComprThreshold")) toneCurve.hlcomprthresh = keyFile.get_integer ("Exposure", "HighlightComprThreshold");
|
if (keyFile.has_key ("Exposure", "HighlightComprThreshold")) toneCurve.hlcomprthresh = keyFile.get_integer ("Exposure", "HighlightComprThreshold");
|
||||||
if (keyFile.has_key ("Exposure", "ShadowCompr")) toneCurve.shcompr = keyFile.get_integer ("Exposure", "ShadowCompr");
|
if (keyFile.has_key ("Exposure", "ShadowCompr")) toneCurve.shcompr = keyFile.get_integer ("Exposure", "ShadowCompr");
|
||||||
if (toneCurve.shcompr > 100) toneCurve.shcompr = 100; // older pp3 files can have values above 100.
|
if (toneCurve.shcompr > 100) toneCurve.shcompr = 100; // older pp3 files can have values above 100.
|
||||||
if (version>200)
|
if (ppVersion>200)
|
||||||
if (keyFile.has_key ("Exposure", "Curve")) toneCurve.curve = keyFile.get_double_list ("Exposure", "Curve");
|
if (keyFile.has_key ("Exposure", "Curve")) toneCurve.curve = keyFile.get_double_list ("Exposure", "Curve");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -537,7 +543,7 @@ if (keyFile.has_group ("Luminance Curve")) {
|
|||||||
if (keyFile.has_key ("Luminance Curve", "AvoidColorClipping")) labCurve.avoidclip = keyFile.get_boolean ("Luminance Curve", "AvoidColorClipping");
|
if (keyFile.has_key ("Luminance Curve", "AvoidColorClipping")) labCurve.avoidclip = keyFile.get_boolean ("Luminance Curve", "AvoidColorClipping");
|
||||||
if (keyFile.has_key ("Luminance Curve", "SaturationLimiter")) labCurve.enable_saturationlimiter= keyFile.get_boolean ("Luminance Curve", "SaturationLimiter");
|
if (keyFile.has_key ("Luminance Curve", "SaturationLimiter")) labCurve.enable_saturationlimiter= keyFile.get_boolean ("Luminance Curve", "SaturationLimiter");
|
||||||
if (keyFile.has_key ("Luminance Curve", "SaturationLimit")) labCurve.saturationlimit = keyFile.get_double ("Luminance Curve", "SaturationLimit");
|
if (keyFile.has_key ("Luminance Curve", "SaturationLimit")) labCurve.saturationlimit = keyFile.get_double ("Luminance Curve", "SaturationLimit");
|
||||||
if (version>200)
|
if (ppVersion>200)
|
||||||
if (keyFile.has_key ("Luminance Curve", "LCurve")) labCurve.lcurve = keyFile.get_double_list ("Luminance Curve", "LCurve");
|
if (keyFile.has_key ("Luminance Curve", "LCurve")) labCurve.lcurve = keyFile.get_double_list ("Luminance Curve", "LCurve");
|
||||||
if (keyFile.has_key ("Luminance Curve", "aCurve")) labCurve.acurve = keyFile.get_double_list ("Luminance Curve", "aCurve");
|
if (keyFile.has_key ("Luminance Curve", "aCurve")) labCurve.acurve = keyFile.get_double_list ("Luminance Curve", "aCurve");
|
||||||
if (keyFile.has_key ("Luminance Curve", "bCurve")) labCurve.bcurve = keyFile.get_double_list ("Luminance Curve", "bCurve");
|
if (keyFile.has_key ("Luminance Curve", "bCurve")) labCurve.bcurve = keyFile.get_double_list ("Luminance Curve", "bCurve");
|
||||||
|
@ -446,7 +446,8 @@ class ProcParams {
|
|||||||
HSVEqualizerParams hsvequalizer; ///< hsv equalizer parameters
|
HSVEqualizerParams hsvequalizer; ///< hsv equalizer parameters
|
||||||
std::vector<ExifPair> exif; ///< List of modifications appplied on the exif tags of the input image
|
std::vector<ExifPair> exif; ///< List of modifications appplied on the exif tags of the input image
|
||||||
std::vector<IPTCPair> iptc; ///< The IPTC tags and values to be saved to the output image
|
std::vector<IPTCPair> iptc; ///< The IPTC tags and values to be saved to the output image
|
||||||
int version; ///< Version of the file from which the parameters have been read
|
Glib::ustring appVersion; ///< Version of the application that generated the parameters
|
||||||
|
int ppVersion; ///< Version of the PP file from which the parameters have been read
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The constructor only sets the hand-wired defaults.
|
* The constructor only sets the hand-wired defaults.
|
||||||
|
@ -36,7 +36,7 @@ int CacheImageData::load (const Glib::ustring& fname) {
|
|||||||
|
|
||||||
if (keyFile.has_group ("General")) {
|
if (keyFile.has_group ("General")) {
|
||||||
if (keyFile.has_key ("General", "MD5")) md5 = keyFile.get_string ("General", "MD5");
|
if (keyFile.has_key ("General", "MD5")) md5 = keyFile.get_string ("General", "MD5");
|
||||||
if (keyFile.has_key ("General", "Version")) version = keyFile.get_integer ("General", "Version");
|
if (keyFile.has_key ("General", "Version")) version = keyFile.get_string ("General", "Version");
|
||||||
if (keyFile.has_key ("General", "Supported")) supported = keyFile.get_boolean ("General", "Supported");
|
if (keyFile.has_key ("General", "Supported")) supported = keyFile.get_boolean ("General", "Supported");
|
||||||
if (keyFile.has_key ("General", "Format")) format = (ThFileType)keyFile.get_integer ("General", "Format");
|
if (keyFile.has_key ("General", "Format")) format = (ThFileType)keyFile.get_integer ("General", "Format");
|
||||||
if (keyFile.has_key ("General", "Rank")) rank = keyFile.get_integer ("General", "Rank");
|
if (keyFile.has_key ("General", "Rank")) rank = keyFile.get_integer ("General", "Rank");
|
||||||
@ -99,7 +99,7 @@ int CacheImageData::save (const Glib::ustring& fname) {
|
|||||||
if (::g_file_test(fname.c_str(),G_FILE_TEST_EXISTS)) keyFile.load_from_file (fname);
|
if (::g_file_test(fname.c_str(),G_FILE_TEST_EXISTS)) keyFile.load_from_file (fname);
|
||||||
|
|
||||||
keyFile.set_string ("General", "MD5", md5);
|
keyFile.set_string ("General", "MD5", md5);
|
||||||
keyFile.set_integer ("General", "Version", options.version);
|
keyFile.set_string ("General", "Version", options.version);
|
||||||
keyFile.set_boolean ("General", "Supported", supported);
|
keyFile.set_boolean ("General", "Supported", supported);
|
||||||
keyFile.set_integer ("General", "Format", format);
|
keyFile.set_integer ("General", "Format", format);
|
||||||
keyFile.set_integer ("General", "Rank", rank);
|
keyFile.set_integer ("General", "Rank", rank);
|
||||||
|
@ -28,7 +28,7 @@ class CacheImageData {
|
|||||||
|
|
||||||
// basic informations
|
// basic informations
|
||||||
Glib::ustring md5;
|
Glib::ustring md5;
|
||||||
int version;
|
Glib::ustring version;
|
||||||
bool supported;
|
bool supported;
|
||||||
ThFileType format;
|
ThFileType format;
|
||||||
char rank;
|
char rank;
|
||||||
|
@ -75,7 +75,7 @@ void Options::setDefaults () {
|
|||||||
fbShowHidden = false;
|
fbShowHidden = false;
|
||||||
fbArrangement = 0;
|
fbArrangement = 0;
|
||||||
multiUser = false;
|
multiUser = false;
|
||||||
version = TAGDISTANCE;
|
version = VERSION;
|
||||||
thumbSize = 80;
|
thumbSize = 80;
|
||||||
thumbSizeTab = 80;
|
thumbSizeTab = 80;
|
||||||
showHistory = true;
|
showHistory = true;
|
||||||
@ -181,7 +181,7 @@ if (keyFile.has_group ("General")) {
|
|||||||
if (keyFile.has_key ("General", "StoreLastProfile")) savesParamsAtExit = keyFile.get_boolean ("General", "StoreLastProfile");
|
if (keyFile.has_key ("General", "StoreLastProfile")) savesParamsAtExit = keyFile.get_boolean ("General", "StoreLastProfile");
|
||||||
if (keyFile.has_key ("General", "DualProcSupport")) rtSettings.dualThreadEnabled = keyFile.get_boolean ("General", "DualProcSupport");
|
if (keyFile.has_key ("General", "DualProcSupport")) rtSettings.dualThreadEnabled = keyFile.get_boolean ("General", "DualProcSupport");
|
||||||
if (keyFile.has_key ("General", "MultiUser")) multiUser = keyFile.get_boolean ("General", "MultiUser");
|
if (keyFile.has_key ("General", "MultiUser")) multiUser = keyFile.get_boolean ("General", "MultiUser");
|
||||||
// if (keyFile.has_key ("General", "Version")) version = keyFile.get_integer ("General", "Version");
|
if (keyFile.has_key ("General", "Version")) version = keyFile.get_string ("General", "Version");
|
||||||
if (keyFile.has_key ("General", "Language")) language = keyFile.get_string ("General", "Language");
|
if (keyFile.has_key ("General", "Language")) language = keyFile.get_string ("General", "Language");
|
||||||
if (keyFile.has_key ("General", "Theme")) theme = keyFile.get_string ("General", "Theme");
|
if (keyFile.has_key ("General", "Theme")) theme = keyFile.get_string ("General", "Theme");
|
||||||
if (keyFile.has_key ("General", "UseSystemTheme")) useSystemTheme = keyFile.get_boolean ("General", "UseSystemTheme");
|
if (keyFile.has_key ("General", "UseSystemTheme")) useSystemTheme = keyFile.get_boolean ("General", "UseSystemTheme");
|
||||||
@ -324,7 +324,7 @@ int Options::saveToFile (Glib::ustring fname) {
|
|||||||
keyFile.set_string ("General", "Language", language);
|
keyFile.set_string ("General", "Language", language);
|
||||||
keyFile.set_string ("General", "Theme", theme);
|
keyFile.set_string ("General", "Theme", theme);
|
||||||
keyFile.set_boolean ("General", "UseSystemTheme", useSystemTheme);
|
keyFile.set_boolean ("General", "UseSystemTheme", useSystemTheme);
|
||||||
keyFile.set_integer ("General", "Version", TAGDISTANCE);
|
keyFile.set_string ("General", "Version", VERSION);
|
||||||
keyFile.set_boolean ("General", "FirstRun", firstRun);
|
keyFile.set_boolean ("General", "FirstRun", firstRun);
|
||||||
keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath);
|
keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath);
|
||||||
keyFile.set_boolean ("General", "Verbose", rtSettings.verbose);
|
keyFile.set_boolean ("General", "Verbose", rtSettings.verbose);
|
||||||
|
@ -84,7 +84,7 @@ class Options {
|
|||||||
int fbArrangement;
|
int fbArrangement;
|
||||||
bool multiUser;
|
bool multiUser;
|
||||||
static Glib::ustring rtdir;
|
static Glib::ustring rtdir;
|
||||||
int version;
|
Glib::ustring version;
|
||||||
int thumbSize,thumbSizeTab;
|
int thumbSize,thumbSizeTab;
|
||||||
bool showHistory;
|
bool showHistory;
|
||||||
int showFilePanelState; // 0: normal, 1: maximized, 2: normal, 3: hidden
|
int showFilePanelState; // 0: normal, 1: maximized, 2: normal, 3: hidden
|
||||||
|
7
rtgui/ppversion.h
Normal file
7
rtgui/ppversion.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#ifndef _PPVERSION_
|
||||||
|
#define _PPVERSION_
|
||||||
|
|
||||||
|
// This number have to be incremented whenever the PP3 file format is modified
|
||||||
|
#define PPVERSION 300
|
||||||
|
|
||||||
|
#endif
|
@ -73,7 +73,7 @@ void ProfileStore::parseDir (const Glib::ustring& pdir) {
|
|||||||
}
|
}
|
||||||
ProcParams* pp = new ProcParams ();
|
ProcParams* pp = new ProcParams ();
|
||||||
int res = pp->load (fname);
|
int res = pp->load (fname);
|
||||||
if (!res && pp->version>=220)
|
if (!res && pp->ppVersion>=220)
|
||||||
pparams[name] = pp;
|
pparams[name] = pp;
|
||||||
else
|
else
|
||||||
delete pp;
|
delete pp;
|
||||||
|
@ -158,7 +158,7 @@ void Thumbnail::loadProcParams () {
|
|||||||
if (options.paramsLoadLocation==PLL_Input) {
|
if (options.paramsLoadLocation==PLL_Input) {
|
||||||
// try to load it from params file next to the image file
|
// try to load it from params file next to the image file
|
||||||
int ppres = pparams.load (fname + paramFileExtension);
|
int ppres = pparams.load (fname + paramFileExtension);
|
||||||
pparamsValid = !ppres && pparams.version>=220;
|
pparamsValid = !ppres && pparams.ppVersion>=220;
|
||||||
if (!pparamsValid)
|
if (!pparamsValid)
|
||||||
pparamsValid = !pparams.load (getCacheFileName ("profiles")+paramFileExtension);
|
pparamsValid = !pparams.load (getCacheFileName ("profiles")+paramFileExtension);
|
||||||
}
|
}
|
||||||
@ -168,7 +168,7 @@ void Thumbnail::loadProcParams () {
|
|||||||
// if no success, load it from params file next to the image file
|
// if no success, load it from params file next to the image file
|
||||||
if (!pparamsValid) {
|
if (!pparamsValid) {
|
||||||
int ppres = pparams.load (fname + paramFileExtension);
|
int ppres = pparams.load (fname + paramFileExtension);
|
||||||
pparamsValid = !ppres && pparams.version>=220;
|
pparamsValid = !ppres && pparams.ppVersion>=220;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user