diff --git a/CMakeLists.txt b/CMakeLists.txt index 671ca2d53..49f262c1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,9 @@ -cmake_minimum_required(VERSION 2.6) +if (WIN32) + cmake_minimum_required(VERSION 2.8.4) + cmake_policy(SET CMP0015 OLD) +else (WIN32) + cmake_minimum_required(VERSION 2.6) +endif (WIN32) # the default target is 'Debug' if (CMAKE_BUILD_TYPE STREQUAL "") @@ -36,6 +41,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PROC_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PROC_FLAGS}") if (WIN32) + # we additionnally look in the MinGW path first then in the Gtkmm path, + # so if you wish to build some dependant library, you have to install them in MinGW to use them set(CMAKE_PREFIX_PATH $ENV{MINGW_BASEPATH} $ENV{GTKMM_BASEPATH} CACHE STRING "Additional search paths") endif (WIN32) @@ -127,10 +134,10 @@ if (WIN32) endif (MINGW) set (EXTRA_LIB "-lws2_32") -else (WIN32) endif (WIN32) +# you may need lcms v1.xx for older version : pkg_check_modules (LCMS REQUIRED lcms<=1.99) +pkg_check_modules (LCMS REQUIRED lcms2) pkg_check_modules (IPTCDATA REQUIRED libiptcdata) -pkg_check_modules (LCMS REQUIRED lcms<=1.99) find_package (JPEG REQUIRED) find_package (PNG REQUIRED) find_package (TIFF REQUIRED) diff --git a/COMPILE.txt b/COMPILE.txt index 32a504155..3840668e8 100644 --- a/COMPILE.txt +++ b/COMPILE.txt @@ -21,28 +21,6 @@ certainly only use the source code without any access to a Mercurial repository. 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. - -Preamble: ---------- - -Cmake is actually used to create the Makefiles (scripts that handle the build process) or specific Integrated Developement Environement (IDE) projects. -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 -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 -version on a linux platform) has not been tested. - -By default, no processor is specified, so Cmake/GCC will build RT for your processor (or maybe a generic processor). Developers that are providing build to -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). - -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 ------- @@ -53,8 +31,8 @@ Windows Of course, you'll have to install the package for the build method explained later in this document. The rest of this document assumes that you've installed MinGW, MSYS and Gtkmm respectively to "C:\mingw", - "C:\msys" and "C:\Gtkmm". - This tutorial assume that you've installed the packages in a paths THAT DOES NOT CONTAIN SPACES. + "C:\msys" and "C:\gtkmm". + This tutorial assume that you've installed the packages in paths THAT DOES NOT CONTAIN SPACES. METHOD 1: - MinGW-TDM (http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.1.exe/download) @@ -64,6 +42,7 @@ Windows - MSYS (http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe) If you have some trouble installing MSYS, see here : http://www.mingw.org/wiki/MSYS - CMake (http://www.cmake.org/cmake/resources/software.html) + Version 2.8.4 or above si required for this platform - Gtkmm2.22 (http://ftp.se.debian.org/pub/gnome/binaries/win32/gtkmm/2.22/) METHOD 2: @@ -118,13 +97,13 @@ Windows Open an MSYS console, that will create a Linux environment, and compile the dependancies in that order: zlib: - If you have Gtkmm2.22 installed, you can skip this section + If you have Gtkmm2.22 installed, you should skip this section - download: http://zlib.net/ - how to build: cd to the unarchiving directory of zlib-1.2.5 - make -f win32/Makefile.gcc + make -f win32/Makefile.gcc - Then, manually copy the files as follows: + Then, manually copy the files as follows (tip: you can individually copy the lines below and paste them in MSys's prompt with the middle mouse button): cp -iv zlib1.dll /mingw/bin cp -iv zconf.h zlib.h /mingw/include @@ -132,7 +111,7 @@ Windows cp -iv libzdll.a /mingw/lib/libz.dll.a libpng: - If you have Gtkmm2.22 installed, you can skip this section + If you have Gtkmm2.22 installed, you should skip this section - download: http://sourceforge.net/projects/libpng/files/ (please note that libpng 1.5 has not been tested yet) - how to build: @@ -160,7 +139,11 @@ Windows libtiff: - download: ftp://ftp.remotesensing.org/pub/libtiff/ - how to build: - ./configure --prefix=/mingw + + In the configure process below, set the zlib include and lib path to the right folder. We're assuming that you're using + the one provided in the gtkmm bundle + + ./configure --prefix=/mingw --with-zlib-include-dir=/c/gtkmm/include --with-zlib-lib-dir=/c/gtkmm/lib make cd libtiff make install @@ -177,8 +160,8 @@ Windows make install lcms: - - download v1.x (v2.x is not supported yet): http://sourceforge.net/projects/lcms/files/ - - how to build: + - download lcm v1.x for RT3.0, v2.x for RT3.1 and upper: http://sourceforge.net/projects/lcms/files/ + - how to build (suitable for both version): ./configure --prefix=/mingw make make install diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 87c8901b5..ae17ff600 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -81,7 +81,7 @@ ICCStore::getInstance(void) ICCStore::ICCStore () { - cmsErrorAction (LCMS_ERROR_SHOW); + // cmsErrorAction (LCMS_ERROR_SHOW); int N = sizeof(wpnames)/sizeof(wpnames[0]); for (int i=0; i +#include #include #include #include diff --git a/rtengine/iimage.h b/rtengine/iimage.h index 792149a63..a9b298846 100644 --- a/rtengine/iimage.h +++ b/rtengine/iimage.h @@ -19,7 +19,7 @@ #ifndef _IIMAGE_ #define _IIMAGE_ -#include +#include #include namespace rtengine { diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index 793098c6f..e09dee3c2 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -25,6 +25,7 @@ #include #include #include +#include #ifdef WIN32 #include #else diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index 2326fd47c..5dca6d78a 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -20,7 +20,7 @@ #define _RAWIMAGESOURCE_ #include -#include +#include #define HR_SCALE 2 diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index 68694ce5e..78af6df12 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 086e86f7d..510bd44b9 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/rtengine/rtthumbnail.h b/rtengine/rtthumbnail.h index 50212ae16..1cc8a09de 100644 --- a/rtengine/rtthumbnail.h +++ b/rtengine/rtthumbnail.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include namespace rtengine { diff --git a/rtgui/CMakeLists.txt b/rtgui/CMakeLists.txt index 3e95ad37f..e243db17e 100644 --- a/rtgui/CMakeLists.txt +++ b/rtgui/CMakeLists.txt @@ -32,8 +32,8 @@ set (BASESOURCEFILES popupcommon.cc popupbutton.cc popuptogglebutton.cc) if (WIN32) - set (EXTRA_SRC windirmonitor.cc myicon.o) - set (EXTRA_LIB_RTGUI winmm) + set (EXTRA_SRC windirmonitor.cc myicon.rc) + set (EXTRA_LIB_RTGUI winmm) include_directories ( ../rtengine ${CMAKE_CURRENT_BINARY_DIR} . ../rtexif ${EXTRA_INCDIR} ${GLIB2_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS} ${GIO_INCLUDE_DIRS} ${GIOMM_INCLUDE_DIRS}) link_directories (. ../rtexif ${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS} diff --git a/rtgui/myicon.o b/rtgui/myicon.o deleted file mode 100644 index 5f2bced97..000000000 Binary files a/rtgui/myicon.o and /dev/null differ diff --git a/rtgui/rawexposure.cc b/rtgui/rawexposure.cc index 087b1163a..fbbb3322f 100644 --- a/rtgui/rawexposure.cc +++ b/rtgui/rawexposure.cc @@ -26,7 +26,7 @@ using namespace rtengine::procparams; RAWExposure::RAWExposure () : Gtk::VBox(), FoldableToolPanel(this) { - PexPos = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_LINEAR"),0.2,4.0,0.1,1)); + PexPos = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_LINEAR"),0.2,5.0,0.01,1)); PexPos->setAdjusterListener (this); if (PexPos->delay < 1000) PexPos->delay = 1000; PexPos->show();