Version handling in main window title, About window (now with tabs, including the license) and in PP3 files

This commit is contained in:
Hombre
2011-02-08 01:25:40 +01:00
parent 84945ee826
commit aac9c13b9f
16 changed files with 856 additions and 610 deletions

View File

@@ -1,6 +1,6 @@
Project initiator: Project initiator:
Gabor Horvath <hgabor@rawtherapee.com> Gábor Horváth <hgabor@rawtherapee.com>
Developement contributors, in last name alphabetical order: Developement contributors, in last name alphabetical order:

23
About-Apple.cmake Normal file
View 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
View 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
View 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"
)

View File

@@ -1,7 +1,34 @@
cmake_minimum_required(VERSION 2.6) 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 (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 (APPLE) if (APPLE)
# SET (CMAKE_OSX_ARCHITECTURES "i386;x86_64;" ) # SET (CMAKE_OSX_ARCHITECTURES "i386;x86_64;" )
# SET (CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "i386;x86_64;" ) # SET (CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "i386;x86_64;" )
@@ -44,6 +71,30 @@ if (NOT DEFINED LIBDIR)
endif (WIN32 OR APPLE) endif (WIN32 OR APPLE)
endif (NOT DEFINED LIBDIR) endif (NOT DEFINED LIBDIR)
if (NOT DEFINED DOCDIR)
if (WIN32 OR APPLE)
set (DOCDIR ${CMAKE_CURRENT_SOURCE_DIR}/release/doc)
else (WIN32 OR APPLE)
set (DOCDIR ${CMAKE_INSTALL_PREFIX}/share/doc)
endif (WIN32 OR APPLE)
endif (NOT DEFINED DOCDIR)
if (NOT DEFINED CREDITSDIR)
if (WIN32 OR APPLE)
set (CREDITSDIR ${CMAKE_CURRENT_SOURCE_DIR}/release)
else (WIN32 OR APPLE)
set (CREDITSDIR ${CMAKE_INSTALL_PREFIX}/share/doc)
endif (WIN32 OR APPLE)
endif (NOT DEFINED CREDITSDIR)
if (NOT DEFINED LICENCEDIR)
if (WIN32 OR APPLE)
set (LICENCEDIR ${CMAKE_CURRENT_SOURCE_DIR}/release)
else (WIN32 OR APPLE)
set (LICENCEDIR ${CMAKE_INSTALL_PREFIX}/share/doc)
endif (WIN32 OR APPLE)
endif (NOT DEFINED LICENCEDIR)
# check for libraries # check for libraries
find_package(PkgConfig) find_package(PkgConfig)
pkg_check_modules (GTK REQUIRED gtk+-2.0>=2.12) pkg_check_modules (GTK REQUIRED gtk+-2.0>=2.12)
@@ -82,6 +133,16 @@ else (WIN32)
find_package (ZLIB REQUIRED) find_package (ZLIB REQUIRED)
endif (WIN32) endif (WIN32)
#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 # link rawzor
if (WITH_RAWZOR) if (WITH_RAWZOR)
if (WIN32) if (WIN32)
@@ -144,7 +205,9 @@ if (UNIX)
install (PROGRAMS rtstart DESTINATION ${BINDIR}) install (PROGRAMS rtstart DESTINATION ${BINDIR})
endif (UNIX) endif (UNIX)
install (FILES AUTHORS.txt LICENSE.txt DESTINATION ${BINDIR}) install (FILES AUTHORS.txt DESTINATION ${CREDITSDIR})
install (FILES LICENSE.txt DESTINATION ${LICENCEDIR})
install (FILES AboutThisBuild.txt DESTINATION ${BINDIR})
add_subdirectory (rtexif) add_subdirectory (rtexif)
add_subdirectory (rtengine) add_subdirectory (rtengine)

View File

@@ -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 Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. 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. copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS 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
View 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")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 75 KiB

View File

@@ -1,5 +1,9 @@
#00 Français #00 Français
#01 1.3.2008: Initial translation by Hombre #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 ADJUSTER_RESET_TO_DEFAULT;Réglages par défaut
BATCHQUEUE_AUTOSTART;Démarrage auto BATCHQUEUE_AUTOSTART;Démarrage auto
BATCH_PROCESSING;Traitement par lot BATCH_PROCESSING;Traitement par lot

View File

@@ -1,5 +1,9 @@
#00 default translation file #00 default translation file
#01 Developers should add translations to this file and then run 'generateDifferences.sh' script to update other locales. #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 ADJUSTER_RESET_TO_DEFAULT;Reset to default
BATCHQUEUE_AUTOSTART;Auto start BATCHQUEUE_AUTOSTART;Auto start
BATCH_PROCESSING;Batch processing BATCH_PROCESSING;Batch processing

View File

@@ -1,30 +1,30 @@
include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../rtexif include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../rtexif
${EXTRA_INCDIR} ${GTHREAD_INCLUDE_DIRS} ${GOBJECT_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS} ${EXTRA_INCDIR} ${GTHREAD_INCLUDE_DIRS} ${GOBJECT_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS}
${GLIBMM_INCLUDE_DIRS} ${IPTCDATA_INCLUDE_DIRS} ${LCMS_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS} ${IPTCDATA_INCLUDE_DIRS} ${LCMS_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../rtgui ${GTKMM_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS}) ${CMAKE_CURRENT_SOURCE_DIR}/../rtgui ${GTKMM_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS})
link_directories (${CMAKE_CURRENT_SOURCE_DIR}/../rtexif ${EXTRA_LIBDIR} ${GTHREAD_LIBRARY_DIRS} link_directories (${CMAKE_CURRENT_SOURCE_DIR}/../rtexif ${EXTRA_LIBDIR} ${GTHREAD_LIBRARY_DIRS}
${GOBJECT_LIBRARY_DIRS} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS} ${GOBJECT_LIBRARY_DIRS} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS}
${IPTCDATA_LIBRARY_DIRS} ${LCMS_LIBRARY_DIRS}) ${IPTCDATA_LIBRARY_DIRS} ${LCMS_LIBRARY_DIRS})
set (RTENGINESOURCEFILES colortemp.cc curves.cc dcraw.cc iccstore.cc dfmanager.cc rawimage.cc set (RTENGINESOURCEFILES colortemp.cc curves.cc dcraw.cc iccstore.cc dfmanager.cc rawimage.cc
image8.cc image16.cc imagedata.cc imageio.cc improcfun.cc init.cc dcrop.cc image8.cc image16.cc imagedata.cc imageio.cc improcfun.cc init.cc dcrop.cc
loadinitial.cc procparams.cc rawimagesource.cc shmap.cc simpleprocess.cc refreshmap.cc loadinitial.cc procparams.cc rawimagesource.cc shmap.cc simpleprocess.cc refreshmap.cc
stdimagesource.cc myfile.cc iccjpeg.c hlmultipliers.cc improccoordinator.cc stdimagesource.cc myfile.cc iccjpeg.c hlmultipliers.cc improccoordinator.cc
processingjob.cc rtthumbnail.cc utils.cc labimage.cc slicer.cc processingjob.cc rtthumbnail.cc utils.cc labimage.cc slicer.cc
iplab2rgb.cc ipsharpen.cc iptransform.cc ipresize.cc iplab2rgb.cc ipsharpen.cc iptransform.cc ipresize.cc
jpeg_memsrc.c jdatasrc.c jpeg_memsrc.c jdatasrc.c
PF_correct_RT.cc PF_correct_RT.cc
wavelet_dec.cc ipequalizer.cc dirpyrLab_denoise.cc dirpyrLab_equalizer.cc dirpyr_equalizer.cc) wavelet_dec.cc ipequalizer.cc dirpyrLab_denoise.cc dirpyrLab_equalizer.cc dirpyr_equalizer.cc)
add_library (rtengine ${RTENGINESOURCEFILES}) add_library (rtengine ${RTENGINESOURCEFILES})
#It may be nice to store library version too #It may be nice to store library version too
IF (BUILD_SHARED_LIBS) IF (BUILD_SHARED_LIBS)
install (TARGETS rtengine DESTINATION ${LIBDIR}) install (TARGETS rtengine DESTINATION ${LIBDIR})
ENDIF (BUILD_SHARED_LIBS) ENDIF (BUILD_SHARED_LIBS)
set_target_properties (rtengine PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math -funroll-loops") set_target_properties (rtengine PROPERTIES COMPILE_FLAGS "${RTENGINE_CXX_FLAGS}")
target_link_libraries (rtengine rtexif ${EXTRA_LIB} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES} target_link_libraries (rtengine rtexif ${EXTRA_LIB} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES}
${GLIB2_LIBRARIES} ${GLIBMM_LIBRARIES} ${LCMS_LIBRARIES} ${IPTCDATA_LIBRARIES} ${GLIB2_LIBRARIES} ${GLIBMM_LIBRARIES} ${LCMS_LIBRARIES} ${IPTCDATA_LIBRARIES}
${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES}) ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES})

View File

@@ -22,6 +22,7 @@
#include <glibmm.h> #include <glibmm.h>
#include <sstream> #include <sstream>
#include <string.h> #include <string.h>
#include <version.h>
#include <safekeyfile.h> #include <safekeyfile.h>
@@ -221,14 +222,14 @@ raw.preser=0.0;
exif.clear (); exif.clear ();
iptc.clear (); iptc.clear ();
version = 249; version = TAGDISTANCE;
} }
int ProcParams::save (Glib::ustring fname) const { int ProcParams::save (Glib::ustring fname) const {
SafeKeyFile keyFile; SafeKeyFile keyFile;
keyFile.set_integer ("Version", "Version", 20101019); keyFile.set_integer ("Version", "Version", TAGDISTANCE);
// save tonecurve: // save tonecurve:
keyFile.set_boolean ("Exposure", "Auto", toneCurve.autoexp); keyFile.set_boolean ("Exposure", "Auto", toneCurve.autoexp);
@@ -492,7 +493,7 @@ int ProcParams::load (Glib::ustring fname) {
// load tonecurve: // load tonecurve:
version = 200; version = TAGDISTANCE;
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", "Version")) version = keyFile.get_integer ("Version", "Version");
} }

File diff suppressed because it is too large Load Diff

View File

@@ -952,7 +952,7 @@ void Preferences::selectStartupDir () {
void Preferences::aboutPressed () { void Preferences::aboutPressed () {
Splash* splash = new Splash (-1); Splash* splash = new Splash ();
splash->set_transient_for (*this); splash->set_transient_for (*this);
splash->set_modal (true); splash->set_modal (true);
splash->show (); splash->show ();

View File

@@ -18,6 +18,7 @@
*/ */
#include <splash.h> #include <splash.h>
#include <multilangmgr.h> #include <multilangmgr.h>
#include <glib/gstdio.h>
#include <safegtk.h> #include <safegtk.h>
extern Glib::ustring argv0; extern Glib::ustring argv0;
@@ -44,26 +45,131 @@ void SplashImage::on_realize () {
bool SplashImage::on_expose_event (GdkEventExpose* event) { 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); 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; Cairo::FontOptions cfo;
cfo.set_antialias (Cairo::ANTIALIAS_SUBPIXEL); 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); context->set_cairo_font_options (cfo);
Pango::FontDescription fontd = context->get_font_description (); Pango::FontDescription fontd = context->get_font_description ();
fontd.set_weight (Pango::WEIGHT_SEMIBOLD); fontd.set_weight (Pango::WEIGHT_LIGHT);
fontd.set_size (12*Pango::SCALE); fontd.set_absolute_size (12*Pango::SCALE);
context->set_font_description (fontd); 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; int w, h;
version = create_pango_layout (versionString);
version->get_pixel_size (w, h); 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; 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 ( Glib::file_test(buildFileName, (Glib::FILE_TEST_EXISTS)) ) {
FILE *f = g_fopen (buildFileName.c_str(), "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 ( Glib::file_test(creditsFileName, (Glib::FILE_TEST_EXISTS)) ) {
FILE *f = g_fopen (creditsFileName.c_str(), "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 ( Glib::file_test(licenseFileName, (Glib::FILE_TEST_EXISTS)) ) {
FILE *f = g_fopen (licenseFileName.c_str(), "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) { Splash::Splash (int maxtime) {
set_title (M("GENERAL_ABOUT")); set_title (M("GENERAL_ABOUT"));
@@ -71,7 +177,6 @@ Splash::Splash (int maxtime) {
splashImage = new SplashImage (); splashImage = new SplashImage ();
// add (*splashImage); // add (*splashImage);
get_vbox()->pack_start (*splashImage); get_vbox()->pack_start (*splashImage);
set_has_separator (false);
splashImage->show (); splashImage->show ();
if (maxtime>0) if (maxtime>0)

View File

@@ -42,6 +42,7 @@ class Splash : public Gtk::Dialog {
public: public:
Splash (int maxtime); Splash (int maxtime);
Splash ();
bool on_timer (); bool on_timer ();
virtual bool on_button_release_event (GdkEventButton* event); virtual bool on_button_release_event (GdkEventButton* event);