New CMake build option to avoid version conflicts : CACHE_NAME_SUFFIX By default, append the latesttag value, but the developper may override it by specifying -DCACHE_NAME_SUFFIX:STRING=MySuffix in the cmake command line
With this new mechanism, the cache name will then be RawTherapee3.0, RawTherapee3.1, etc... The cache is now located in %LOCALAPPDATA% on Windows Options.xxx template files has also been reduced to essential values, other ones are set in options.cc
This commit is contained in:
@@ -19,6 +19,9 @@ execute_process(COMMAND ${HG_CMD} -R ${SRC_DIR} branch OUTPUT_VARIABLE HG_BRANCH
|
||||
execute_process(COMMAND ${HG_CMD} parents --template={latesttag}.{latesttagdistance} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE HG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${HG_CMD} parents --template={node|short} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE HG_CHANGESET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${HG_CMD} parents --template={latesttagdistance} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE HG_TAGDISTANCE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if (CACHE_NAME_SUFFIX STREQUAL "")
|
||||
execute_process(COMMAND ${HG_CMD} parents --template={latesttag} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE CACHE_NAME_SUFFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif ()
|
||||
|
||||
# build version.h from template
|
||||
configure_file (${SRC_DIR}/rtgui/version.h.in ${SRC_DIR}/rtgui/version.h)
|
||||
|
@@ -19,6 +19,9 @@ execute_process(COMMAND ${HG_CMD} -R ${SRC_DIR} branch OUTPUT_VARIABLE HG_BRANCH
|
||||
execute_process(COMMAND ${HG_CMD} parents --template={latesttag}.{latesttagdistance} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE HG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${HG_CMD} parents --template={node|short} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE HG_CHANGESET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${HG_CMD} parents --template={latesttagdistance} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE HG_TAGDISTANCE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if (CACHE_NAME_SUFFIX STREQUAL "")
|
||||
execute_process(COMMAND ${HG_CMD} parents --template={latesttag} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE CACHE_NAME_SUFFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif ()
|
||||
|
||||
# build version.h from template
|
||||
configure_file (${SRC_DIR}/rtgui/version.h.in ${SRC_DIR}/rtgui/version.h)
|
||||
|
@@ -19,6 +19,9 @@ execute_process(COMMAND ${HG_CMD} -R ${SRC_DIR} branch OUTPUT_VARIABLE HG_BRANCH
|
||||
execute_process(COMMAND ${HG_CMD} parents --template={latesttag}.{latesttagdistance} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE HG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${HG_CMD} parents --template={node|short} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE HG_CHANGESET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${HG_CMD} parents --template={latesttagdistance} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE HG_TAGDISTANCE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if (CACHE_NAME_SUFFIX STREQUAL "")
|
||||
execute_process(COMMAND ${HG_CMD} parents --template={latesttag} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE CACHE_NAME_SUFFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif ()
|
||||
|
||||
# build version.h from template
|
||||
configure_file (${SRC_DIR}/rtgui/version.h.in ${SRC_DIR}/rtgui/version.h)
|
||||
|
@@ -11,6 +11,8 @@ if (CMAKE_BUILD_TYPE STREQUAL "")
|
||||
endif ()
|
||||
message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
set (CACHE_NAME_SUFFIX "" CACHE STRING "RawTherapee's cache folder suffix (leave empty to use the default suffix, i.e. latesttag)")
|
||||
|
||||
# By default, we don't use specific processor target, so PROC_TARGET_NUMBER is set to 0. If can specify other values to select specific
|
||||
# processor targets, which list can be found in ProcessorTargets.cmake.
|
||||
set (PROC_TARGET_NUMBER 0 CACHE STRING "Selected target processor from the list above (taken from ProcessorTargets.cmake)")
|
||||
@@ -179,6 +181,7 @@ else (AUTOMATED_BUILD_SYSTEM)
|
||||
add_custom_target (AboutFile ALL
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DSRC_DIR:STRING=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-DCACHE_NAME_SUFFIX:STRING=${CACHE_NAME_SUFFIX}
|
||||
-DSYSTEM:STRING=Windows
|
||||
-DPROC_LABEL:STRING=\"${PROC_LABEL}\"
|
||||
-DPROC_BIT_DEPTH:STRING=\"${PROC_BIT_DEPTH}\"
|
||||
@@ -199,6 +202,7 @@ else (AUTOMATED_BUILD_SYSTEM)
|
||||
add_custom_target (AboutFile ALL
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DSRC_DIR:STRING=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-DCACHE_NAME_SUFFIX:STRING=${CACHE_NAME_SUFFIX}
|
||||
-DSYSTEM:STRING=Apple
|
||||
-DPROC_LABEL:STRING=\"${PROC_LABEL}\"
|
||||
-DPROC_BIT_DEPTH:STRING=\"${PROC_BIT_DEPTH}\"
|
||||
@@ -220,6 +224,7 @@ else (AUTOMATED_BUILD_SYSTEM)
|
||||
add_custom_target (AboutFile ALL
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DSRC_DIR:STRING=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-DCACHE_NAME_SUFFIX:STRING=${CACHE_NAME_SUFFIX}
|
||||
-DSYSTEM:STRING=Linux
|
||||
-DPROC_LABEL:STRING=\"${PROC_LABEL}\"
|
||||
-DPROC_BIT_DEPTH:STRING=\"${PROC_BIT_DEPTH}\"
|
||||
|
@@ -18,6 +18,8 @@ set(OPTION_OMP ON CACHE BOOL "Use OpenMP to speedup the preview and batch proces
|
||||
# set WITH_MYFILE_MMAP to OFF if you experience crash with thumbnail creation (it should be slower, but more reliable)
|
||||
set(WITH_MYFILE_MMAP ON CACHE BOOL "Use the MMAP mechanism to speedup thumbnail creations")
|
||||
|
||||
set(CACHE_NAME_SUFFIX "" CACHE STRING "RawTherapee's cache folder suffix (leave empty to use the default suffix, i.e. latesttag)")
|
||||
|
||||
# This line will let you chose the target number, and the associated processor
|
||||
set(PROC_TARGET_NUMBER 0 CACHE STRING "Target Processor")
|
||||
|
||||
|
@@ -1,111 +1,23 @@
|
||||
# Only important or pre-first run parameters are left in this global option file.
|
||||
# After the first run, all the parameters will be available in this global option file
|
||||
# or in a new local option file, depending on the MultiUser value below
|
||||
|
||||
# Most ot the options are modifiable through the Preference window
|
||||
|
||||
[General]
|
||||
TabbedEditor=true
|
||||
StoreLastProfile=true
|
||||
StartupDirectory=last
|
||||
StartupPath=
|
||||
DateFormat=%y/%m/%d
|
||||
AdjusterDelay=0
|
||||
DualProcSupport=true
|
||||
# Setting MultiUser to false will use the application's installation directory as cache directory,
|
||||
# which can be usefull if you want to keep the application and all the cache datas in a single place,
|
||||
# an external HD for example
|
||||
MultiUser=true
|
||||
Language=English (US)
|
||||
Theme=Focus
|
||||
UseSystemTheme=false
|
||||
Version=300
|
||||
FirstRun=true
|
||||
|
||||
[External Editor]
|
||||
EditorKind=1
|
||||
GimpDir=
|
||||
PhotoshopDir=
|
||||
CustomEditor=
|
||||
|
||||
[File Browser]
|
||||
BrowseOnlyRaw=false
|
||||
BrowserShowsDate=true
|
||||
BrowserShowsExif=true
|
||||
BrowserShowsHidden=false
|
||||
ThumbnailSize=240
|
||||
MaxPreviewHeight=400
|
||||
MaxCacheEntries=20000
|
||||
ThumbnailFormat=5
|
||||
CacheMemPolicy=0
|
||||
ParseExtensions=jpg;tif;tiff;png;crw;cr2;crf;nef;raf;pef;dng;arw;sr2;mrw;raw;orf;kdc;rwz;rw2;mef;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;
|
||||
ThumbnailArrangement=2
|
||||
ThumbnailInterpolation=1
|
||||
LiveThumbnails=true
|
||||
FavoriteDirs=
|
||||
RenameTemplates=
|
||||
RenameUseTemplates=false
|
||||
ThumbnailZoomRatios=0.2;0.3;0.45;0.6;0.8;1;
|
||||
OverlayedFileNames=true
|
||||
|
||||
# if TRUE, only fast, internal preview images are taken if the image is not edited yet
|
||||
InternalThumbIfUntouched=true
|
||||
|
||||
[Clipping Indication]
|
||||
HighlightThreshold=253
|
||||
ShadowThreshold=8
|
||||
BlinkClipped=false
|
||||
|
||||
[Output]
|
||||
Format=jpg
|
||||
JpegQuality=100
|
||||
PngCompression=6
|
||||
PngBps=8
|
||||
TiffBps=8
|
||||
SaveProcParams=true
|
||||
PathTemplate=%p1/converted/%f
|
||||
PathFolder=
|
||||
UsePathTemplate=true
|
||||
LastSaveAsPath=
|
||||
|
||||
# if TRUE, existing output JPGs/PNGs are overwritten, instead of adding ..-1.jpg, -2.jpg etc.
|
||||
OverwriteOutputFile=false
|
||||
|
||||
[Profiles]
|
||||
Directory=profiles
|
||||
RawDefault=default
|
||||
ImgDefault=neutral
|
||||
SaveParamsWithFile=false
|
||||
SaveParamsToCache=true
|
||||
LoadParamsFromLocation=0
|
||||
|
||||
# if this is set to a path of a custom program, it will receive the EXIFs as parameters and must generate a PP3 preset file for the given RAW/JPG
|
||||
# Parameters: <Path to RAW/JPG> <Path to default profile> <fNumber> <expose in seconds> <focal length in mm> <ISO> <Lens> <Camera>
|
||||
CustomProfileBuilder=
|
||||
|
||||
[GUI]
|
||||
WindowWidth=900
|
||||
WindowHeight=560
|
||||
WindowMaximized=false
|
||||
FileBrowserHeight=250
|
||||
ToolPanelWidth=300
|
||||
BrowserToolPanelWidth=300
|
||||
HistoryPanelWidth=230
|
||||
LastPreviewScale=5
|
||||
LastCropSize=1
|
||||
ShowHistory=true
|
||||
ShowFilePanelState=2
|
||||
ShowInfo=true
|
||||
ShowClippedHighlights=false
|
||||
ShowClippedShadows=false
|
||||
FrameColor=0
|
||||
ProcessingQueueEnbled=false
|
||||
ToolPanelsExpanded=1;1;0;0;0;1;1;0;0;0;0;1;1;0;0;0;0;0;
|
||||
|
||||
[Algorithms]
|
||||
DemosaicMethod=hphd
|
||||
DemosaicMethodBatch=hphd
|
||||
ColorCorrection=1
|
||||
|
||||
[Crop Settings]
|
||||
Ratio=3:2
|
||||
FixRatio=true
|
||||
DPI=600
|
||||
|
||||
[Color Management]
|
||||
ICCDirectory=
|
||||
MonitorProfile=
|
||||
Intent=1
|
||||
|
@@ -1,111 +1,23 @@
|
||||
# Only important or pre-first run parameters are left in this global option file.
|
||||
# After the first run, all the parameters will be available in this global option file
|
||||
# or in a new local option file, depending on the MultiUser value below
|
||||
|
||||
# Most ot the options are modifiable through the Preference window
|
||||
|
||||
[General]
|
||||
TabbedEditor=true
|
||||
StoreLastProfile=true
|
||||
StartupDirectory=last
|
||||
StartupPath=
|
||||
DateFormat=%y/%m/%d
|
||||
AdjusterDelay=0
|
||||
DualProcSupport=true
|
||||
# Setting MultiUser to false will use the application's installation directory as cache directory,
|
||||
# which can be usefull if you want to keep the application and all the cache datas in a single place,
|
||||
# an external HD for example
|
||||
MultiUser=true
|
||||
Language=English (US)
|
||||
Theme=Focus
|
||||
UseSystemTheme=false
|
||||
Version=300
|
||||
FirstRun=true
|
||||
|
||||
[External Editor]
|
||||
EditorKind=1
|
||||
GimpDir=
|
||||
PhotoshopDir=
|
||||
CustomEditor=
|
||||
|
||||
[File Browser]
|
||||
BrowseOnlyRaw=false
|
||||
BrowserShowsDate=true
|
||||
BrowserShowsExif=true
|
||||
BrowserShowsHidden=false
|
||||
ThumbnailSize=240
|
||||
MaxPreviewHeight=400
|
||||
MaxCacheEntries=20000
|
||||
ThumbnailFormat=5
|
||||
CacheMemPolicy=0
|
||||
ParseExtensions=jpg;tif;tiff;png;crw;cr2;crf;nef;raf;pef;dng;arw;sr2;mrw;raw;orf;kdc;rwz;rw2;mef;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;
|
||||
ThumbnailArrangement=2
|
||||
ThumbnailInterpolation=1
|
||||
LiveThumbnails=true
|
||||
FavoriteDirs=
|
||||
RenameTemplates=
|
||||
RenameUseTemplates=false
|
||||
ThumbnailZoomRatios=0.2;0.3;0.45;0.6;0.8;1;
|
||||
OverlayedFileNames=true
|
||||
|
||||
# if TRUE, only fast, internal preview images are taken if the image is not edited yet
|
||||
InternalThumbIfUntouched=true
|
||||
|
||||
[Clipping Indication]
|
||||
HighlightThreshold=253
|
||||
ShadowThreshold=8
|
||||
BlinkClipped=false
|
||||
|
||||
[Output]
|
||||
Format=jpg
|
||||
JpegQuality=100
|
||||
PngCompression=6
|
||||
PngBps=8
|
||||
TiffBps=8
|
||||
SaveProcParams=true
|
||||
PathTemplate=%p1/converted/%f
|
||||
PathFolder=
|
||||
UsePathTemplate=true
|
||||
LastSaveAsPath=
|
||||
|
||||
# if TRUE, existing output JPGs/PNGs are overwritten, instead of adding ..-1.jpg, -2.jpg etc.
|
||||
OverwriteOutputFile=false
|
||||
|
||||
[Profiles]
|
||||
Directory=profiles
|
||||
RawDefault=default
|
||||
ImgDefault=neutral
|
||||
SaveParamsWithFile=false
|
||||
SaveParamsToCache=true
|
||||
LoadParamsFromLocation=0
|
||||
|
||||
# if this is set to a path of a custom program, it will receive the EXIFs as parameters and must generate a PP3 preset file for the given RAW/JPG
|
||||
# Parameters: <Path to RAW/JPG> <Path to default profile> <fNumber> <expose in seconds> <focal length in mm> <ISO> <Lens> <Camera>
|
||||
CustomProfileBuilder=
|
||||
|
||||
[GUI]
|
||||
WindowWidth=900
|
||||
WindowHeight=560
|
||||
WindowMaximized=false
|
||||
FileBrowserHeight=250
|
||||
ToolPanelWidth=300
|
||||
BrowserToolPanelWidth=300
|
||||
HistoryPanelWidth=200
|
||||
LastPreviewScale=5
|
||||
LastCropSize=1
|
||||
ShowHistory=true
|
||||
ShowFilePanelState=2
|
||||
ShowInfo=true
|
||||
ShowClippedHighlights=false
|
||||
ShowClippedShadows=false
|
||||
FrameColor=0
|
||||
ProcessingQueueEnbled=false
|
||||
ToolPanelsExpanded=1;1;0;0;0;1;1;0;0;0;0;1;1;0;0;0;0;0;
|
||||
|
||||
[Algorithms]
|
||||
DemosaicMethod=hphd
|
||||
DemosaicMethodBatch=hphd
|
||||
ColorCorrection=1
|
||||
|
||||
[Crop Settings]
|
||||
Ratio=3:2
|
||||
FixRatio=true
|
||||
DPI=600
|
||||
|
||||
[Color Management]
|
||||
ICCDirectory=
|
||||
MonitorProfile=
|
||||
Intent=1
|
||||
|
@@ -1,112 +1,25 @@
|
||||
# Only important or pre-first run parameters are left in this global option file.
|
||||
# After the first run, all the parameters will be available in this global option file
|
||||
# or in a new local option file, depending on the MultiUser value below
|
||||
|
||||
# Most ot the options are modifiable through the Preference window
|
||||
|
||||
[General]
|
||||
TabbedEditor=true
|
||||
StoreLastProfile=true
|
||||
StartupDirectory=last
|
||||
StartupPath=
|
||||
DateFormat=%y/%m/%d
|
||||
AdjusterDelay=0
|
||||
DualProcSupport=true
|
||||
# Setting MultiUser to false will use the application's installation directory as cache directory,
|
||||
# which can be usefull if you want to keep the application and all the cache datas in a single place,
|
||||
# an external HD for example
|
||||
MultiUser=true
|
||||
Language=English (US)
|
||||
Theme=Focus
|
||||
# Windows users should not use the system theme : some composed widget won't be usable
|
||||
UseSystemTheme=false
|
||||
Version=300
|
||||
FirstRun=true
|
||||
|
||||
[External Editor]
|
||||
EditorKind=1
|
||||
GimpDir=C:\\Program Files\\GIMP-2.0
|
||||
PhotoshopDir=C:\\Program Files\\Adobe\\Adobe Photoshop CS5
|
||||
CustomEditor=start
|
||||
|
||||
[File Browser]
|
||||
BrowseOnlyRaw=false
|
||||
BrowserShowsDate=true
|
||||
BrowserShowsExif=true
|
||||
BrowserShowsHidden=false
|
||||
ThumbnailSize=240
|
||||
MaxPreviewHeight=400
|
||||
MaxCacheEntries=20000
|
||||
ThumbnailFormat=5
|
||||
CacheMemPolicy=0
|
||||
ParseExtensions=jpg;tif;tiff;png;crw;cr2;crf;nef;raf;pef;dng;arw;sr2;mrw;raw;orf;kdc;rwz;rw2;mef;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;
|
||||
ThumbnailArrangement=2
|
||||
ThumbnailInterpolation=1
|
||||
LiveThumbnails=true
|
||||
FavoriteDirs=
|
||||
RenameTemplates=
|
||||
RenameUseTemplates=false
|
||||
ThumbnailZoomRatios=0.2;0.3;0.45;0.6;0.8;1;
|
||||
OverlayedFileNames=true
|
||||
|
||||
# if TRUE, only fast, internal preview images are taken if the image is not edited yet
|
||||
InternalThumbIfUntouched=true
|
||||
|
||||
[Clipping Indication]
|
||||
HighlightThreshold=253
|
||||
ShadowThreshold=8
|
||||
BlinkClipped=false
|
||||
|
||||
[Output]
|
||||
Format=jpg
|
||||
JpegQuality=100
|
||||
PngCompression=6
|
||||
PngBps=8
|
||||
TiffBps=8
|
||||
SaveProcParams=true
|
||||
PathTemplate=%p1/converted/%f
|
||||
PathFolder=
|
||||
UsePathTemplate=true
|
||||
LastSaveAsPath=
|
||||
|
||||
# if TRUE, existing output JPGs/PNGs are overwritten, instead of adding ..-1.jpg, -2.jpg etc.
|
||||
OverwriteOutputFile=false
|
||||
|
||||
[Profiles]
|
||||
Directory=profiles
|
||||
RawDefault=default
|
||||
ImgDefault=neutral
|
||||
SaveParamsWithFile=false
|
||||
SaveParamsToCache=true
|
||||
LoadParamsFromLocation=0
|
||||
|
||||
# if this is set to a path of a custom program, it will receive the EXIFs as parameters and must generate a PP3 preset file for the given RAW/JPG
|
||||
# Parameters: <Path to RAW/JPG> <Path to default profile> <fNumber> <expose in seconds> <focal length in mm> <ISO> <Lens> <Camera>
|
||||
CustomProfileBuilder=
|
||||
|
||||
|
||||
[GUI]
|
||||
WindowWidth=900
|
||||
WindowHeight=560
|
||||
WindowMaximized=false
|
||||
FileBrowserHeight=250
|
||||
ToolPanelWidth=300
|
||||
BrowserToolPanelWidth=300
|
||||
HistoryPanelWidth=230
|
||||
LastPreviewScale=5
|
||||
LastCropSize=1
|
||||
ShowHistory=true
|
||||
ShowFilePanelState=2
|
||||
ShowInfo=true
|
||||
ShowClippedHighlights=false
|
||||
ShowClippedShadows=false
|
||||
FrameColor=0
|
||||
ProcessingQueueEnbled=false
|
||||
ToolPanelsExpanded=1;1;0;0;0;1;1;0;0;0;0;1;1;0;0;0;0;0;
|
||||
|
||||
[Algorithms]
|
||||
DemosaicMethod=hphd
|
||||
DemosaicMethodBatch=hphd
|
||||
ColorCorrection=1
|
||||
|
||||
[Crop Settings]
|
||||
Ratio=3:2
|
||||
FixRatio=true
|
||||
DPI=600
|
||||
|
||||
[Color Management]
|
||||
ICCDirectory=C:\\WINDOWS\\System32\\spool\\drivers\\color
|
||||
MonitorProfile=
|
||||
Intent=1
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <glib/gstdio.h>
|
||||
#include <safekeyfile.h>
|
||||
#include <safegtk.h>
|
||||
#include <version.h>
|
||||
|
||||
CacheImageData::CacheImageData ()
|
||||
: md5(""), supported(false), format(FT_Invalid), rank(0), inTrash(false), recentlySaved(false),
|
||||
@@ -100,7 +101,7 @@ int CacheImageData::save (const Glib::ustring& fname) {
|
||||
if (safe_file_test(fname,Glib::FILE_TEST_EXISTS)) keyFile.load_from_file (fname);
|
||||
|
||||
keyFile.set_string ("General", "MD5", md5);
|
||||
keyFile.set_string ("General", "Version", options.version);
|
||||
keyFile.set_string ("General", "Version", VERSION); // Application's version
|
||||
keyFile.set_boolean ("General", "Supported", supported);
|
||||
keyFile.set_integer ("General", "Format", format);
|
||||
keyFile.set_integer ("General", "Rank", rank);
|
||||
|
@@ -138,8 +138,14 @@ void FilePanel::init () {
|
||||
dirBrowser->open (Glib::get_home_dir());
|
||||
else if (options.startupDir==STARTUPDIR_CURRENT)
|
||||
dirBrowser->open (argv0);
|
||||
else if (options.startupDir==STARTUPDIR_CUSTOM || options.startupDir==STARTUPDIR_LAST)
|
||||
else if (options.startupDir==STARTUPDIR_CUSTOM || options.startupDir==STARTUPDIR_LAST) {
|
||||
if (options.startupPath.length() && safe_file_test(options.startupPath, Glib::FILE_TEST_EXISTS) && safe_file_test(options.startupPath, Glib::FILE_TEST_IS_DIR))
|
||||
dirBrowser->open (options.startupPath);
|
||||
else {
|
||||
// Fallback option if the path is empty or the folder doesn't exist
|
||||
dirBrowser->open (Glib::get_home_dir());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
108
rtgui/options.cc
108
rtgui/options.cc
@@ -51,7 +51,7 @@ void Options::setDefaults () {
|
||||
saveFormat.pngBits = 8;
|
||||
saveFormat.tiffBits = 8;
|
||||
saveFormat.tiffUncompressed = true;
|
||||
saveFormat.saveParams = false;
|
||||
saveFormat.saveParams = true; // was false
|
||||
savePathTemplate = "%p1/converted/%f";
|
||||
savePathFolder = "";
|
||||
saveUsePathTemplate = true;
|
||||
@@ -59,7 +59,7 @@ void Options::setDefaults () {
|
||||
defProfImg = "neutral";
|
||||
dateFormat = "%y-%m-%d";
|
||||
adjusterDelay = 0;
|
||||
startupDir = 1;
|
||||
startupDir = STARTUPDIR_LAST; // was STARTUPDIR_HOME ; an empty startupPath is now correctly handled (open in the Home dir)
|
||||
startupPath = "";
|
||||
profilePath = "profiles";
|
||||
dirBrowserWidth = 200;
|
||||
@@ -69,46 +69,48 @@ void Options::setDefaults () {
|
||||
toolPanelWidth = 300;
|
||||
browserToolPanelWidth = 300;
|
||||
browserToolPanelHeight = 300;
|
||||
historyPanelWidth = 150;
|
||||
lastScale = 4;
|
||||
historyPanelWidth = 230; // was 150
|
||||
lastScale = 5; // was 4
|
||||
lastCropSize = 1;
|
||||
fbOnlyRaw = false;
|
||||
fbShowDateTime = true;
|
||||
fbShowBasicExif = true;
|
||||
fbShowHidden = false;
|
||||
fbArrangement = 0;
|
||||
multiUser = false;
|
||||
fbArrangement = 2; // was 0
|
||||
multiUser = true;
|
||||
version = VERSION;
|
||||
thumbSize = 80;
|
||||
thumbSize = 240; // was 80
|
||||
thumbSizeTab = 80;
|
||||
showHistory = true;
|
||||
showFilePanelState = 0;
|
||||
showInfo = false;
|
||||
cropDPI = 300;
|
||||
showFilePanelState = 0; // Not used anymore ; was the thumb strip state
|
||||
showInfo = true; // was false
|
||||
cropDPI = 600; // was 300
|
||||
showClippedHighlights = false;
|
||||
showClippedShadows = false;
|
||||
highlightThreshold = 254;
|
||||
shadowThreshold = 0;
|
||||
highlightThreshold = 253; // was 254
|
||||
shadowThreshold = 8; // was 0
|
||||
bgcolor = 0;
|
||||
blinkClipped = true;
|
||||
blinkClipped = false; // was true
|
||||
language = DefaultLanguage;
|
||||
lastSaveAsPath = "";
|
||||
theme = "";
|
||||
useSystemTheme = false;
|
||||
overwriteOutputFile = false; // if TRUE, existing output JPGs/PNGs are overwritten, instead of adding ..-1.jpg, -2.jpg etc.
|
||||
theme = "Dark";
|
||||
useSystemTheme = true;
|
||||
maxThumbnailHeight = 400;
|
||||
maxCacheEntries = 10000;
|
||||
thumbnailFormat = FT_Custom16;
|
||||
maxCacheEntries = 20000; // was 10000
|
||||
thumbnailFormat = FT_Custom; // was FT_Custom16
|
||||
thumbInterp = 1;
|
||||
autoSuffix = false;
|
||||
saveParamsFile = false;
|
||||
saveParamsCache = true;
|
||||
paramsLoadLocation = PLL_Cache;
|
||||
procQueueEnabled = true;
|
||||
gimpDir = "C:\\Program Files\\GIMP-2.0";
|
||||
psDir = "C:\\Program Files\\Adobe\\Adobe Photoshop CS3";
|
||||
customEditorProg = "start";
|
||||
saveParamsFile = true; // was false, but saving the procparams files next to the file make more sense when reorganizing file tree than in a cache
|
||||
saveParamsCache = false; // there's no need to save the procparams files in a cache if saveParamsFile is true
|
||||
paramsLoadLocation = PLL_Input; // was PLL_Cache
|
||||
procQueueEnabled = false; // was true
|
||||
gimpDir = "";
|
||||
psDir = "";
|
||||
customEditorProg = "";
|
||||
editorToSendTo = 1;
|
||||
liveThumbnails = true;
|
||||
favoriteDirs.clear();
|
||||
tpOpen.clear ();
|
||||
//crvOpen.clear ();
|
||||
parseExtensions.clear ();
|
||||
@@ -123,8 +125,9 @@ void Options::setDefaults () {
|
||||
thumbnailZoomRatios.push_back (0.8);
|
||||
thumbnailZoomRatios.push_back (1.0);
|
||||
overlayedFileNames = true;
|
||||
internalThumbIfUntouched = true; // if TRUE, only fast, internal preview images are taken if the image is not edited yet
|
||||
showFileNames = true;
|
||||
tabbedUI = false;
|
||||
tabbedUI = true; // was false;
|
||||
multiDisplayMode = 0;
|
||||
|
||||
cutOverlayBrush = std::vector<double> (4);
|
||||
@@ -334,7 +337,7 @@ int Options::saveToFile (Glib::ustring fname) {
|
||||
keyFile.set_string ("General", "Theme", theme);
|
||||
keyFile.set_boolean ("General", "UseSystemTheme", useSystemTheme);
|
||||
keyFile.set_string ("General", "Version", VERSION);
|
||||
keyFile.set_boolean ("General", "FirstRun", firstRun);
|
||||
keyFile.set_boolean ("General", "FirstRun", false);
|
||||
keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath);
|
||||
keyFile.set_boolean ("General", "Verbose", rtSettings.verbose);
|
||||
|
||||
@@ -455,20 +458,65 @@ Glib::ustring Options::cacheBaseDir;
|
||||
|
||||
void Options::load () {
|
||||
|
||||
rtdir = Glib::ustring(g_get_user_config_dir ())+"/RawTherapeeAlpha";
|
||||
options.readFromFile (argv0+"/options");
|
||||
// Find the application data path
|
||||
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
* If LOCALAPPDATA exists, RT run on a WinVista/7 system, so we use LOCALAPPDATA as is
|
||||
* otherwise RT run on a Win2000/XP system, so we rebuild the path like this: %USERPROFILE%\Local Settings\Application Data
|
||||
*
|
||||
* Folder redirection is then fully supported on WinVista/7, but not on Win2000/XP
|
||||
*/
|
||||
const gchar* dataPath;
|
||||
Glib::ustring dPath;
|
||||
|
||||
// ->ODUIS: How to make that commented out code work ?
|
||||
|
||||
/*WCHAR path[MAX_PATH] = {0};
|
||||
if (SHGetSpecialFolderPathW(NULL, path, CSIDL_LOCAL_APPDATA, false)) {
|
||||
dPath = path;
|
||||
printf("SHGetSpecialFolderPathW: \"%s\"\n", dPath.c_str());
|
||||
}
|
||||
else {
|
||||
printf("SHGetSpecialFolderPathW: Fail!\n");
|
||||
}*/
|
||||
|
||||
dataPath = g_getenv("LOCALAPPDATA");
|
||||
if (dataPath != NULL)
|
||||
rtdir = Glib::ustring(dataPath) + Glib::ustring("\\") + Glib::ustring(CACHEFOLDERNAME);
|
||||
else {
|
||||
dataPath = g_getenv("USERPROFILE");
|
||||
if (dataPath != NULL)
|
||||
rtdir = Glib::ustring(dataPath) + Glib::ustring("\\Local Settings\\Application Data\\") + Glib::ustring(CACHEFOLDERNAME);
|
||||
}
|
||||
#else
|
||||
rtdir = Glib::ustring(g_get_user_config_dir ()) + Glib::ustring("/") + Glib::ustring(CACHEFOLDERNAME);
|
||||
#endif
|
||||
|
||||
// Set the cache folder in RT's base folder
|
||||
cacheBaseDir = argv0 + "/cache";
|
||||
|
||||
// Read the global option file (the one located in the application's base folder)
|
||||
options.readFromFile (argv0+"/options");
|
||||
|
||||
// Check if RT is installed in Multi-User mode
|
||||
if (options.multiUser) {
|
||||
// Read the user option file (the one located somewhere in the user's home folder)
|
||||
// Those values supersets those of the global option file
|
||||
int r = options.readFromFile (rtdir + "/options");
|
||||
// If the local option file does not exist or is broken, and the local cache folder does not exist, recreate it
|
||||
if (r && !safe_g_mkdir_with_parents (rtdir, 511)) {
|
||||
// Recreate the user's profile folder
|
||||
Glib::ustring profdir = rtdir + "/profiles";
|
||||
safe_g_mkdir_with_parents (profdir, 511);
|
||||
// Save the option file
|
||||
options.saveToFile (rtdir + "/options");
|
||||
}
|
||||
// Modify the path of the cache folder to the user's personal folder
|
||||
#ifdef _WIN32
|
||||
cacheBaseDir = rtdir + "/cache";
|
||||
#else
|
||||
cacheBaseDir = Glib::ustring(g_get_user_cache_dir()) + "/RawTherapee";
|
||||
cacheBaseDir = Glib::ustring(g_get_user_cache_dir()) + Glib::ustring("/") + Glib::ustring(CACHEFOLDERNAME);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -476,7 +524,7 @@ void Options::load () {
|
||||
// (most likely using simple English). The next level is the language: for instance, English, French, Chinese, etc. This file should contain a
|
||||
// generic translation for all items which differ from default. Finally there is the locale. This is region-specific items which differ from the
|
||||
// language file. These files must be name in the format <Language> (<LC>), where Language is the name of the language which it inherits from,
|
||||
// and LC is the locale code. Some examples of this would be English (US) (American English), French (FR) (Franch French), French (CA) (Canadian
|
||||
// and LC is the local code. Some examples of this would be English (US) (American English), French (FR) (Franch French), French (CA) (Canadian
|
||||
// French), etc.
|
||||
//
|
||||
// Each level will only contain the differences between itself and its parent translation. For instance, English (UK) or English (CA) may
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
#define VERSION "${HG_VERSION}"
|
||||
#define TAGDISTANCE ${HG_TAGDISTANCE}
|
||||
#define CACHEFOLDERNAME "RawTherapee${CACHE_NAME_SUFFIX}"
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user