Version handling in main window title, About window (now with tabs, including the license) and in PP3 files
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
Project initiator:
|
||||
|
||||
Gabor Horvath <hgabor@rawtherapee.com>
|
||||
Gábor Horváth <hgabor@rawtherapee.com>
|
||||
|
||||
Developement contributors, in last name alphabetical order:
|
||||
|
||||
|
23
About-Apple.cmake
Normal file
23
About-Apple.cmake
Normal file
@@ -0,0 +1,23 @@
|
||||
# this will generate a target that will never exist, so it will (should) be executed on each build
|
||||
#WARNING: Actually, only Gcc is supported
|
||||
|
||||
string (TOUPPER ${CMAKE_BUILD_TYPE} UPPER_CMAKE_BUILD_TYPE)
|
||||
|
||||
set (OUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/AboutThisBuild.txt")
|
||||
set (VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/rtgui/version.h")
|
||||
set (SHELL "/bin/bash")
|
||||
|
||||
add_custom_target (AboutFile ALL
|
||||
COMMAND for i in \$\( hg branch \)\; do echo Branch: $i >${OUT_FILE}\; done
|
||||
COMMAND hg parents --template=\"Version: {latesttag}_{latesttagdistance}\\nChangset: {node}\\n\" >>${OUT_FILE}
|
||||
COMMAND for i in \$\( gcc -dumpversion \) \;do echo Compiler: GCC $i >>${OUT_FILE} \; done
|
||||
COMMAND echo Processor: ${PROC_LABEL} >>${OUT_FILE}
|
||||
COMMAND echo Gtkmm: V${GTKMM_VERSION} >>${OUT_FILE}
|
||||
COMMAND echo Build flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPER_CMAKE_BUILD_TYPE}} >>${OUT_FILE}
|
||||
COMMAND echo Link flags: ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${UPPER_CMAKE_BUILD_TYPE}} >>${OUT_FILE}
|
||||
COMMAND if [ \"${OPTION_OMP}\" = \"ON\" ] \; then echo OpenMP support: Yes >>${OUT_FILE} \;else echo OpenMP support: No >>${OUT_FILE} \;fi
|
||||
COMMAND if [ \"${WITH_MYFILE_MMAP}\" = \"ON\" ] \; then echo MMAP support: Yes >>${OUT_FILE} \; else echo MMAP support: No >>${OUT_FILE} \;fi
|
||||
COMMAND if [ \"${WITH_RAWZOR}\" = \"ON\" ] \; then echo Rawzor support: Yes >>${OUT_FILE} \;else echo Rawzor support: No >>${OUT_FILE} \;fi
|
||||
COMMAND hg parents --template=\"// This file is automatically generated by the Makefile \; DO NOT EDIT!\\n// You can \(should\) also tell mercurial to ignore it.\\n\\n\#ifndef _VERSION_\\n\#define _VERSION_\\n\\n\#define VERSION \\"{latesttag}.{latesttagdistance}\\"\\n\#define TAGDISTANCE {latesttagdistance}\\n\\n\#endif\\n\" >${VERSION_FILE}
|
||||
COMMENT "Creating the about file"
|
||||
)
|
23
About-Linux.cmake
Normal file
23
About-Linux.cmake
Normal file
@@ -0,0 +1,23 @@
|
||||
# this will generate a target that will never exist, so it will (should) be executed on each build
|
||||
#WARNING: Actually, only Gcc is supported
|
||||
|
||||
string (TOUPPER ${CMAKE_BUILD_TYPE} UPPER_CMAKE_BUILD_TYPE)
|
||||
|
||||
set (OUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/AboutThisBuild.txt")
|
||||
set (VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/rtgui/version.h")
|
||||
set (SHELL "/bin/bash")
|
||||
|
||||
add_custom_target (AboutFile ALL
|
||||
COMMAND for i in \$\( hg branch \)\; do echo Branch: $i >${OUT_FILE}\; done
|
||||
COMMAND hg parents --template=\"Version: {latesttag}_{latesttagdistance}\\nChangset: {node}\\n\" >>${OUT_FILE}
|
||||
COMMAND for i in \$\( gcc -dumpversion \) \;do echo Compiler: GCC $i >>${OUT_FILE} \; done
|
||||
COMMAND echo Processor: ${PROC_LABEL} >>${OUT_FILE}
|
||||
COMMAND echo Gtkmm: V${GTKMM_VERSION} >>${OUT_FILE}
|
||||
COMMAND echo Build flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPER_CMAKE_BUILD_TYPE}} >>${OUT_FILE}
|
||||
COMMAND echo Link flags: ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${UPPER_CMAKE_BUILD_TYPE}} >>${OUT_FILE}
|
||||
COMMAND if [ \"${OPTION_OMP}\" = \"ON\" ] \; then echo OpenMP support: Yes >>${OUT_FILE} \;else echo OpenMP support: No >>${OUT_FILE} \;fi
|
||||
COMMAND if [ \"${WITH_MYFILE_MMAP}\" = \"ON\" ] \; then echo MMAP support: Yes >>${OUT_FILE} \; else echo MMAP support: No >>${OUT_FILE} \;fi
|
||||
COMMAND if [ \"${WITH_RAWZOR}\" = \"ON\" ] \; then echo Rawzor support: Yes >>${OUT_FILE} \;else echo Rawzor support: No >>${OUT_FILE} \;fi
|
||||
COMMAND hg parents --template=\"// This file is automatically generated by the Makefile \; DO NOT EDIT!\\n// You can \(should\) also tell mercurial to ignore it.\\n\\n\#ifndef _VERSION_\\n\#define _VERSION_\\n\\n\#define VERSION \\"{latesttag}.{latesttagdistance}\\"\\n\#define TAGDISTANCE {latesttagdistance}\\n\\n\#endif\\n\" >${VERSION_FILE}
|
||||
COMMENT "Creating the about file"
|
||||
)
|
22
About-Windows.cmake
Normal file
22
About-Windows.cmake
Normal file
@@ -0,0 +1,22 @@
|
||||
# this will generate a target that will never exist, so it will (should) be executed on each build
|
||||
#WARNING: Actually, only Gcc is supported
|
||||
|
||||
string (TOUPPER ${CMAKE_BUILD_TYPE} UPPER_CMAKE_BUILD_TYPE)
|
||||
|
||||
set (OUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/AboutThisBuild.txt")
|
||||
set (VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/rtgui/version.h")
|
||||
|
||||
add_custom_target (AboutFile ALL
|
||||
COMMAND for /F \"tokens=*\" %%i in \('hg branch'\) do echo Branch: %%i >${OUT_FILE}
|
||||
COMMAND hg parents --template=\"Version: {latesttag}_{latesttagdistance}\\nChangset: {node}\\n\" >>${OUT_FILE}
|
||||
COMMAND for /F \"tokens=*\" %%i in \('gcc -dumpversion'\) do echo Compiler: GCC%%i >>${OUT_FILE}
|
||||
COMMAND \(echo Processor: ${PROC_LABEL}\) >>${OUT_FILE}
|
||||
COMMAND \(echo Gtkmm: V${GTKMM_VERSION}\) >>${OUT_FILE}
|
||||
COMMAND \(echo Build flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPER_CMAKE_BUILD_TYPE}} \) >>${OUT_FILE}
|
||||
COMMAND \(echo Link flags: ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${UPPER_CMAKE_BUILD_TYPE}} \) >>${OUT_FILE}
|
||||
COMMAND (if ${OPTION_OMP}==ON \(echo OpenMP support: Yes\) else \(echo OpenMP support: No\)) >>${OUT_FILE}
|
||||
COMMAND (if ${WITH_MYFILE_MMAP}==ON \(echo MMAP support: Yes\) else \(echo MMAP support: No\)) >>${OUT_FILE}
|
||||
COMMAND (if ${WITH_RAWZOR}==ON \(echo Rawzor support: Yes\) else \(echo Rawzor support: No\)) >>${OUT_FILE}
|
||||
COMMAND hg parents --template=\"// This file is automatically generated by the Makefile \; DO NOT EDIT!\\n// You can \(should\) also tell mercurial to ignore it.\\n\\n\#ifndef _VERSION_\\n\#define _VERSION_\\n\\n\#define VERSION \\"{latesttag}.{latesttagdistance}\\"\\n\#define TAGDISTANCE {latesttagdistance}\\n\\n\#endif\\n\" >${VERSION_FILE}
|
||||
COMMENT "Creating the about file"
|
||||
)
|
11
AboutThisBuild.txt
Normal file
11
AboutThisBuild.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Branch: default
|
||||
Version: release-3.0-a1_659
|
||||
Changset: b29e4497a6d4199f339ccd8cbff3efe8a555bca5
|
||||
Compiler: GCC4.5.1
|
||||
Processor: core2
|
||||
Gtkmm: V2.22.0
|
||||
Build flags: "-mwin32 -mthreads -march=core2 -mfpmath=sse" "-O0 -g2 -Wall -pedantic"
|
||||
Link flags: "-lpthread -mwin32 -mthreads -mthread -static-libgcc -static-libstdc++ -march=core2 -mfpmath=sse" -O0
|
||||
OpenMP support: Yes
|
||||
MMAP support: Yes
|
||||
Rawzor support: Yes
|
@@ -1,13 +1,34 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
# the default target is 'Debug'
|
||||
set (CMAKE_BUILD_TYPE Debug CACHE STRING "One of: None Debug Release RelWithDebInfo MinSizeRel.")
|
||||
|
||||
# set the default target processor to 'native', i.e. the one of your own machine. The complete list of targets is in ProcessorTargets.cmake
|
||||
# you can override the cpu list by setting PROC_TARGET_NUMBER to 0, but you have to provide at least
|
||||
# the PROC_LABEL value (set to "undefined" by default) in order to provide downloadable builds,
|
||||
# and evetually provide PROC_FLAGS if you want to manually set the processor specific flags
|
||||
set (PROC_TARGET_NUMBER 2 CACHE STRING "Selected target processor from the list above (taken from ProcessorTargets.cmake)")
|
||||
|
||||
# The following line set special compilation flags for RTEngine, and will be added to CMAKE_CXX_FLAGS
|
||||
# It were moved away from rtengine/CMakefiles.txt, because some users may want to remove -ffast_math :
|
||||
# this flag speeds up the floating-point operations, but with a little bite less precisions. This default value
|
||||
# gives the same result/behaviour as before.
|
||||
set (RTENGINE_CXX_FLAGS "-ffast-math -funroll-loops" CACHE STRING "Special compilation flags for RTEngine")
|
||||
|
||||
#loading the processor targets list
|
||||
set (PROC_LABEL "undefined")
|
||||
set (PROC_FLAGS "")
|
||||
if (PROC_TARGET_NUMBER GREATER 0)
|
||||
include (ProcessorTargets.cmake)
|
||||
set (PROC_LABEL ${PROC_TARGET_${PROC_TARGET_NUMBER}_LABEL})
|
||||
set (PROC_FLAGS ${PROC_TARGET_${PROC_TARGET_NUMBER}_FLAGS})
|
||||
endif (PROC_TARGET_NUMBER GREATER 0)
|
||||
|
||||
# adding the proc flags to the build flags
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PROC_FLAGS}")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PROC_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PROC_FLAGS}")
|
||||
|
||||
if (WIN32)
|
||||
set(CMAKE_PREFIX_PATH $ENV{MINGW_BASEPATH} $ENV{GTKMM_BASEPATH} CACHE STRING "Additional search paths")
|
||||
endif (WIN32)
|
||||
@@ -107,6 +128,16 @@ find_package (PNG REQUIRED)
|
||||
find_package (TIFF REQUIRED)
|
||||
find_package (ZLIB REQUIRED)
|
||||
|
||||
#generating AboutThisBuild.txt
|
||||
if (WIN32)
|
||||
include (About-Windows.cmake)
|
||||
elseif (APPLE)
|
||||
include (About-Apple.cmake)
|
||||
else (WIN32)
|
||||
include (About-Linux.cmake)
|
||||
endif (WIN32)
|
||||
add_dependencies(AboutFile Debug Release MinSizeRel RelWithDebInfo)
|
||||
|
||||
# link rawzor
|
||||
if (WITH_RAWZOR)
|
||||
set (EXTRA_INCDIR ${EXTRA_INCDIR} "${CMAKE_CURRENT_SOURCE_DIR}/rawzor")
|
||||
@@ -167,6 +198,7 @@ endif (UNIX)
|
||||
|
||||
install (FILES AUTHORS.txt DESTINATION ${CREDITSDIR})
|
||||
install (FILES LICENSE.txt DESTINATION ${LICENCEDIR})
|
||||
install (FILES AboutThisBuild.txt DESTINATION ${BINDIR})
|
||||
|
||||
add_subdirectory (rtexif)
|
||||
add_subdirectory (rtengine)
|
||||
|
78
LICENSE.txt
78
LICENSE.txt
@@ -1,7 +1,26 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
RawTherapee
|
||||
|
||||
|
||||
Copyright ©2004-2011 Gábor Horváth <hgabor@rawtherapee.com>
|
||||
|
||||
RawTherapee is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
RawTherapee is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License below for more details.
|
||||
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
<http://www.gnu.org/licenses/>
|
||||
|
||||
Copyright ©2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@@ -619,56 +638,3 @@ Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
33
ProcessorTargets.cmake
Normal file
33
ProcessorTargets.cmake
Normal file
@@ -0,0 +1,33 @@
|
||||
# We have to create a label variable if we want to display it in AboutThisBuild.txt...
|
||||
|
||||
# This first choice should be used for official releases
|
||||
set(PROC_TARGET_1_LABEL "generic x86" CACHE STRING "Processor-1 label - should be used for official Windows release")
|
||||
set(PROC_TARGET_1_FLAGS "-mtune=generic" CACHE STRING "Processor-1 flags")
|
||||
|
||||
# This second choice should be used for your own build only
|
||||
set(PROC_TARGET_2_LABEL "native" CACHE STRING "Processor-2 label - use it for your own build")
|
||||
set(PROC_TARGET_2_FLAGS "-march=native" CACHE STRING "Processor-2 flags")
|
||||
|
||||
# The later choices is intended to be used if you want to provide specific builds, but it should match your own processor
|
||||
# You can cross compile but you have to know what you're doing, this mechanism has not been designed for that
|
||||
|
||||
set(PROC_TARGET_3_LABEL "pentium/no-sse" CACHE STRING "Processor-3 label - use it to provide a pentium/no sse optimized build, if you have this processor")
|
||||
set(PROC_TARGET_3_FLAGS "-march=pentium -mfpmath=387" CACHE STRING "Processor-3 flags")
|
||||
|
||||
set(PROC_TARGET_4_LABEL "pentium4" CACHE STRING "Processor-4 label - use it to provide a pentium4 optimized build, if you have this processor")
|
||||
set(PROC_TARGET_4_FLAGS "-march=pentium4 -mfpmath=sse" CACHE STRING "Processor-4 flags")
|
||||
|
||||
set(PROC_TARGET_5_LABEL "core2" CACHE STRING "Processor-5 label - use it to provide a core2 optimized build, if you have this processor")
|
||||
set(PROC_TARGET_5_FLAGS "-march=core2 -mfpmath=sse" CACHE STRING "Processor-5 flags")
|
||||
|
||||
set(PROC_TARGET_6_LABEL "corei7" CACHE STRING "Processor-6 label - use it to provide a corei7 optimized build, if you have this processor")
|
||||
set(PROC_TARGET_6_FLAGS "-march=corei7 -mfpmath=sse" CACHE STRING "Processor-6 flags")
|
||||
|
||||
set(PROC_TARGET_7_LABEL "athlon-4" CACHE STRING "Processor-7 label - use it to provide a athlon-4 optimized build, if you have this processor")
|
||||
set(PROC_TARGET_7_FLAGS "-march=athlon-4 -mfpmath=sse" CACHE STRING "Processor-7 flags")
|
||||
|
||||
set(PROC_TARGET_8_LABEL "athlon64" CACHE STRING "Processor-8 label - use it to provide a athlon64 optimized build, if you have this processor")
|
||||
set(PROC_TARGET_8_FLAGS "-march=pentium2 -mtune=athlon64 -mfpmath=sse" CACHE STRING "Processor-8 flags")
|
||||
|
||||
#set(PROC_TARGET__LABEL "" CACHE STRING "Processor- label")
|
||||
#set(PROC_TARGET__FLAGS "" CACHE STRING "Processor- flags")
|
@@ -18,8 +18,11 @@ 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")
|
||||
|
||||
# Tune the build to your CPU and its instruction set
|
||||
set(CMAKE_CXX_FLAGS "-mwin32 -mthreads -march=native" CACHE STRING "Compiler options for C++ source files")
|
||||
set (PROC_TARGET_NUMBER 2 CACHE STRING "Target Processor")
|
||||
# If you want to manually specify the target processor name, uncomment the line right under, and set its value
|
||||
#set (PROC_LABEL 'Core i7' X2 CACHE STRING "Target Processor label")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-mwin32 -mthreads" CACHE STRING "Compiler options for C++ source files")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g2" CACHE STRING "Compiler options for C++ source files and Debug target")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-mwindows -DNDEBUG -O2" CACHE STRING "Compiler options for C++ source files and Release target")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "-mwindows -DNDEBUG -Os" CACHE STRING "Compiler options for C++ source files and MinSizeRel target")
|
||||
@@ -28,13 +31,13 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Compiler options for C
|
||||
# Uncomment the next line and set the right value to override the default value
|
||||
#set(RTENGINE_CXX_FLAGS "-funroll-loops" CACHE STRING "Special compilation flags for RTEngine")
|
||||
|
||||
set(CMAKE_C_FLAGS "-mwin32 -mthreads -march=native" CACHE STRING "Compiler options for C source files")
|
||||
set(CMAKE_C_FLAGS "-mwin32 -mthreads" CACHE STRING "Compiler options for C source files")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-O0 -g2" CACHE STRING "Compiler options for C source files and Debug target")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-mwindows -DNDEBUG -O2" CACHE STRING "Compiler options for C source files and Release target")
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL "-mwindows -DNDEBUG -Os" CACHE STRING "Compiler options for C source files and MinSizeRel target")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Compiler options for C source files and RelWithDebInfo target")
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-mwin32 -mthreads -mthread -march=native -static-libgcc -static-libstdc++" CACHE STRING "Linker options")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-mwin32 -mthreads -mthread -static-libgcc -static-libstdc++" CACHE STRING "Linker options")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-O0" CACHE STRING "Linkage options for the Debug target")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-mwindows -s -O2" CACHE STRING "Linkage options for the Release target")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-mwindows -s -Os" CACHE STRING "Linkage options for the MinSizeRel target")
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 75 KiB |
@@ -3,6 +3,7 @@
|
||||
#01 1.3.2008: Initial translation by Hombre
|
||||
ABOUT_TAB_BUILD;Version
|
||||
ABOUT_TAB_CREDITS;Crédits
|
||||
ABOUT_TAB_LICENSE;License
|
||||
ABOUT_TAB_SPLASH;Splash
|
||||
ADJUSTER_RESET_TO_DEFAULT;Réglages par défaut
|
||||
BATCHQUEUE_AUTOSTART;Démarrage auto
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#01 Developers should add translations to this file and then run 'generateDifferences.sh' script to update other locales.
|
||||
ABOUT_TAB_BUILD;Version
|
||||
ABOUT_TAB_CREDITS;Credits
|
||||
ABOUT_TAB_LICENSE;License
|
||||
ABOUT_TAB_SPLASH;Splash
|
||||
ADJUSTER_RESET_TO_DEFAULT;Reset to default
|
||||
BATCHQUEUE_AUTOSTART;Auto start
|
||||
|
@@ -23,7 +23,7 @@ IF (BUILD_SHARED_LIBS)
|
||||
install (TARGETS rtengine DESTINATION ${LIBDIR})
|
||||
ENDIF (BUILD_SHARED_LIBS)
|
||||
|
||||
set_target_properties (rtengine PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${RTENGINE_CXX_FLAGS}")
|
||||
set_target_properties (rtengine PROPERTIES COMPILE_FLAGS "${RTENGINE_CXX_FLAGS}")
|
||||
|
||||
target_link_libraries (rtengine rtexif ${EXTRA_LIB} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES}
|
||||
${GLIB2_LIBRARIES} ${GLIBMM_LIBRARIES} ${LCMS_LIBRARIES} ${IPTCDATA_LIBRARIES}
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include <glibmm.h>
|
||||
#include <sstream>
|
||||
#include <string.h>
|
||||
#include <version.h>
|
||||
|
||||
#include <safekeyfile.h>
|
||||
|
||||
@@ -223,14 +224,14 @@ raw.preser=0.0;
|
||||
exif.clear ();
|
||||
iptc.clear ();
|
||||
|
||||
version = 249;
|
||||
version = TAGDISTANCE;
|
||||
}
|
||||
|
||||
int ProcParams::save (Glib::ustring fname) const {
|
||||
|
||||
SafeKeyFile keyFile;
|
||||
|
||||
keyFile.set_integer ("Version", "Version", 20101019);
|
||||
keyFile.set_integer ("Version", "Version", TAGDISTANCE);
|
||||
|
||||
// save tonecurve:
|
||||
keyFile.set_boolean ("Exposure", "Auto", toneCurve.autoexp);
|
||||
@@ -496,7 +497,7 @@ int ProcParams::load (Glib::ustring fname) {
|
||||
|
||||
// load tonecurve:
|
||||
|
||||
version = 200;
|
||||
version = TAGDISTANCE;
|
||||
if (keyFile.has_group ("Version")) {
|
||||
if (keyFile.has_key ("Version", "Version")) version = keyFile.get_integer ("Version", "Version");
|
||||
}
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <options.h>
|
||||
#include <version.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <config.h>
|
||||
@@ -225,6 +226,8 @@ int processLineParams( int argc, char **argv )
|
||||
case 'h':
|
||||
case '?':
|
||||
default:
|
||||
std::cerr << "RawTherapee, " << VERSION << std::endl;
|
||||
std::cerr << "Copyright (c)2004-2011 Gabor Horvath <hgabor@rawtherapee.com>"<< std::endl << std::endl;
|
||||
std::cerr << "Usage:"<< std::endl;
|
||||
std::cerr << Glib::path_get_basename(argv[0]) << " [<selected dir>] : start RT GUI browser inside dir."<< std::endl;
|
||||
std::cerr << Glib::path_get_basename(argv[0]) << " <file> : start GUI editor with file."<< std::endl;
|
||||
|
@@ -25,9 +25,10 @@
|
||||
#include <safekeyfile.h>
|
||||
#include <addsetids.h>
|
||||
#include <safegtk.h>
|
||||
#include <version.h>
|
||||
|
||||
Options options;
|
||||
Glib::ustring versionString = "v3.0 alpha 1";
|
||||
Glib::ustring versionString = VERSION;
|
||||
Glib::ustring paramFileExtension = ".pp3";
|
||||
|
||||
Options::Options () {
|
||||
@@ -75,7 +76,7 @@ void Options::setDefaults () {
|
||||
fbShowHidden = false;
|
||||
fbArrangement = 0;
|
||||
multiUser = false;
|
||||
version = 290;
|
||||
version = TAGDISTANCE;
|
||||
thumbSize = 80;
|
||||
thumbSizeTab = 80;
|
||||
showHistory = true;
|
||||
@@ -191,7 +192,7 @@ if (keyFile.has_group ("General")) {
|
||||
if (keyFile.has_key ("General", "UseSystemTheme")) useSystemTheme = keyFile.get_boolean ("General", "UseSystemTheme");
|
||||
if (keyFile.has_key ("General", "FirstRun")) firstRun = keyFile.get_boolean ("General", "FirstRun");
|
||||
if( keyFile.has_key ("General", "DarkFramesPath")) rtSettings.darkFramesPath = keyFile.get_string("General", "DarkFramesPath");
|
||||
if( keyFile.has_key ("General", "FlatFieldsPath")) rtSettings.flatFieldsPath = keyFile.get_string("General", "FlatFieldsPath");
|
||||
if( keyFile.has_key ("General", "FlatFieldsPath")) rtSettings.flatFieldsPath = keyFile.get_string("General", "FlatFieldsPath");
|
||||
if( keyFile.has_key ("General", "Verbose")) rtSettings.verbose = keyFile.get_boolean ( "General", "Verbose");
|
||||
}
|
||||
|
||||
@@ -336,7 +337,7 @@ int Options::saveToFile (Glib::ustring fname) {
|
||||
keyFile.set_string ("General", "Language", language);
|
||||
keyFile.set_string ("General", "Theme", theme);
|
||||
keyFile.set_boolean ("General", "UseSystemTheme", useSystemTheme);
|
||||
keyFile.set_integer ("General", "Version", 290);
|
||||
keyFile.set_integer ("General", "Version", TAGDISTANCE);
|
||||
keyFile.set_boolean ("General", "FirstRun", firstRun);
|
||||
keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath);
|
||||
keyFile.set_string ("General", "FlatFieldsPath", rtSettings.flatFieldsPath);
|
||||
|
@@ -1047,7 +1047,7 @@ void Preferences::selectStartupDir () {
|
||||
|
||||
void Preferences::aboutPressed () {
|
||||
|
||||
Splash* splash = new Splash (-1);
|
||||
Splash* splash = new Splash ();
|
||||
splash->set_transient_for (*this);
|
||||
splash->set_modal (true);
|
||||
splash->show ();
|
||||
|
118
rtgui/splash.cc
118
rtgui/splash.cc
@@ -44,26 +44,131 @@ void SplashImage::on_realize () {
|
||||
|
||||
bool SplashImage::on_expose_event (GdkEventExpose* event) {
|
||||
|
||||
Glib::RefPtr<Gdk::Window> window = get_window();
|
||||
Glib::RefPtr<Gdk::Window> window = get_window();
|
||||
pixbuf->render_to_drawable (window, gc_, 0, 0, 0, 0, pixbuf->get_width(), pixbuf->get_height(), Gdk::RGB_DITHER_NONE, 0, 0);
|
||||
|
||||
Cairo::FontOptions cfo;
|
||||
cfo.set_antialias (Cairo::ANTIALIAS_SUBPIXEL);
|
||||
Glib::RefPtr<Pango::Context> context = get_pango_context () ;
|
||||
Glib::RefPtr<Pango::Context> context = get_pango_context ();
|
||||
context->set_cairo_font_options (cfo);
|
||||
Pango::FontDescription fontd = context->get_font_description ();
|
||||
fontd.set_weight (Pango::WEIGHT_SEMIBOLD);
|
||||
fontd.set_size (12*Pango::SCALE);
|
||||
fontd.set_weight (Pango::WEIGHT_LIGHT);
|
||||
fontd.set_absolute_size (12*Pango::SCALE);
|
||||
context->set_font_description (fontd);
|
||||
Gdk::Color *textColor = new Gdk::Color();
|
||||
textColor->set_rgb(0, 0, 0);
|
||||
gc_->set_foreground(*textColor);
|
||||
|
||||
version = create_pango_layout (versionString);
|
||||
int w, h;
|
||||
version = create_pango_layout (versionString);
|
||||
version->get_pixel_size (w, h);
|
||||
window->draw_layout(gc_, pixbuf->get_width() - w - 28, 44-h, version);
|
||||
window->draw_layout(gc_, pixbuf->get_width() - w - 4, pixbuf->get_height() - h - 4, version);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Splash::Splash () {
|
||||
|
||||
set_title (M("GENERAL_ABOUT"));
|
||||
set_border_width (4);
|
||||
|
||||
Gtk::Notebook* nb = Gtk::manage (new Gtk::Notebook ());
|
||||
get_vbox()->pack_start (*nb);
|
||||
|
||||
// Tab 1: the image
|
||||
splashImage = new SplashImage ();
|
||||
nb->append_page (*splashImage, M("ABOUT_TAB_SPLASH"));
|
||||
splashImage->show ();
|
||||
|
||||
// Tab 2: the informations about the current version
|
||||
std::string buildFileName = Glib::build_filename (argv0, "AboutThisBuild.txt");
|
||||
if ( safe_file_test(buildFileName, (Glib::FILE_TEST_EXISTS)) ) {
|
||||
FILE *f = safe_g_fopen (buildFileName, "rt");
|
||||
if (f != NULL) {
|
||||
char* buffer = new char[1024];
|
||||
std::ostringstream ostr;
|
||||
while (fgets (buffer, 1024, f))
|
||||
ostr << buffer;
|
||||
delete [] buffer;
|
||||
fclose (f);
|
||||
|
||||
Glib::RefPtr<Gtk::TextBuffer> textBuffer = Gtk::TextBuffer::create();
|
||||
textBuffer->set_text((Glib::ustring)(ostr.str()));
|
||||
|
||||
Gtk::ScrolledWindow *buildSW = Gtk::manage (new Gtk::ScrolledWindow());
|
||||
Gtk::TextView *buildTV = Gtk::manage (new Gtk::TextView (textBuffer));
|
||||
buildTV->set_editable(false);
|
||||
buildSW->add(*buildTV);
|
||||
nb->append_page (*buildSW, M("ABOUT_TAB_BUILD"));
|
||||
}
|
||||
}
|
||||
|
||||
// Tab 3: the credits
|
||||
#if defined _WIN32 || defined __APPLE__
|
||||
std::string creditsFileName = Glib::build_filename (argv0, "AUTHORS.txt");
|
||||
#else
|
||||
std::string creditsFileName = Glib::build_filename (argv0, "share/doc/AUTHORS.txt");
|
||||
#endif
|
||||
if ( safe_file_test(creditsFileName, (Glib::FILE_TEST_EXISTS)) ) {
|
||||
FILE *f = safe_g_fopen (creditsFileName, "rt");
|
||||
if (f != NULL) {
|
||||
char* buffer = new char[1024];
|
||||
std::ostringstream ostr;
|
||||
while (fgets (buffer, 1024, f))
|
||||
ostr << buffer;
|
||||
delete [] buffer;
|
||||
fclose (f);
|
||||
|
||||
Glib::RefPtr<Gtk::TextBuffer> textBuffer = Gtk::TextBuffer::create();
|
||||
textBuffer->set_text((Glib::ustring)(ostr.str()));
|
||||
|
||||
Gtk::ScrolledWindow *creditsSW = Gtk::manage (new Gtk::ScrolledWindow());
|
||||
Gtk::TextView *creditsTV = Gtk::manage (new Gtk::TextView (textBuffer));
|
||||
creditsTV->set_editable(false);
|
||||
creditsSW->add(*creditsTV);
|
||||
nb->append_page (*creditsSW, M("ABOUT_TAB_CREDITS"));
|
||||
}
|
||||
}
|
||||
|
||||
// Tab 4: the license
|
||||
#if defined _WIN32 || defined __APPLE__
|
||||
std::string licenseFileName = Glib::build_filename (argv0, "LICENSE.txt");
|
||||
#else
|
||||
std::string licenseFileName = Glib::build_filename (argv0, "share/doc/LICENSE.txt");
|
||||
#endif
|
||||
if ( safe_file_test(licenseFileName, (Glib::FILE_TEST_EXISTS)) ) {
|
||||
FILE *f = safe_g_fopen (licenseFileName, "rt");
|
||||
if (f != NULL) {
|
||||
char* buffer = new char[1024];
|
||||
std::ostringstream ostr;
|
||||
while (fgets (buffer, 1024, f))
|
||||
ostr << buffer;
|
||||
delete [] buffer;
|
||||
fclose (f);
|
||||
|
||||
Glib::RefPtr<Gtk::TextBuffer> textBuffer = Gtk::TextBuffer::create();
|
||||
textBuffer->set_text((Glib::ustring)(ostr.str()));
|
||||
|
||||
Gtk::ScrolledWindow *licenseSW = Gtk::manage (new Gtk::ScrolledWindow());
|
||||
Gtk::TextView *creditsTV = Gtk::manage (new Gtk::TextView (textBuffer));
|
||||
creditsTV->set_editable(false);
|
||||
licenseSW->add(*creditsTV);
|
||||
nb->append_page (*licenseSW, M("ABOUT_TAB_LICENSE"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
set_position (Gtk::WIN_POS_CENTER);
|
||||
//add_events(Gdk::BUTTON_RELEASE_MASK);
|
||||
set_resizable (true);
|
||||
|
||||
nb->set_current_page (0);
|
||||
|
||||
show_all_children ();
|
||||
set_modal (true);
|
||||
set_keep_above (true);
|
||||
}
|
||||
|
||||
Splash::Splash (int maxtime) {
|
||||
|
||||
set_title (M("GENERAL_ABOUT"));
|
||||
@@ -71,7 +176,6 @@ Splash::Splash (int maxtime) {
|
||||
splashImage = new SplashImage ();
|
||||
// add (*splashImage);
|
||||
get_vbox()->pack_start (*splashImage);
|
||||
set_has_separator (false);
|
||||
splashImage->show ();
|
||||
|
||||
if (maxtime>0)
|
||||
|
@@ -42,6 +42,7 @@ class Splash : public Gtk::Dialog {
|
||||
|
||||
public:
|
||||
Splash (int maxtime);
|
||||
Splash ();
|
||||
|
||||
bool on_timer ();
|
||||
virtual bool on_button_release_event (GdkEventButton* event);
|
||||
|
Reference in New Issue
Block a user