Updated COMPILE.txt file ; the Windows build process now uses a customizable CMake options file.
This commit is contained in:
92
COMPILE.txt
92
COMPILE.txt
@@ -5,25 +5,62 @@ http://www.rawtherapee.com/forum/viewforum.php?f=10
|
|||||||
Windows
|
Windows
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
The toolchain:
|
||||||
|
|
||||||
|
There is 2 method to compile RawTherapee, and they each rely on different and common packages. They are
|
||||||
|
now referred to METHOD 1 and METHOD 2.
|
||||||
|
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.
|
||||||
|
|
||||||
|
METHOD 1:
|
||||||
|
- MinGW-TDM (http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.1.exe/download)
|
||||||
|
- 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)
|
||||||
|
- Gtkmm2.22 (http://ftp.se.debian.org/pub/gnome/binaries/win32/gtkmm/2.22/)
|
||||||
|
|
||||||
|
METHOD 2:
|
||||||
|
- MinGW-TDM (http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.1.exe/download)
|
||||||
|
- CMake (http://www.cmake.org/cmake/resources/software.html)
|
||||||
|
- Gtkmm2.22 (http://ftp.se.debian.org/pub/gnome/binaries/win32/gtkmm/2.22/)
|
||||||
|
|
||||||
|
Additionnal steps:
|
||||||
|
When all the packages of your preferred method are installed:
|
||||||
|
- set the GTKMM_BASEPATH user or system environment variable to the installation directory of Gtkmm
|
||||||
|
(the Gtkmm's installer can do it for you)
|
||||||
|
- set the MINGW_BASEPATH user or system environment variable to the installation directory of MinGW32
|
||||||
|
You have to restart the console to take this new variables into account
|
||||||
|
- Copy the "Win32CMakeOptions-sample.txt" file located in the root directory of RT's source tree, to "cmo.txt" (e.g.)
|
||||||
|
You can edit that copy to change the compilation flags to your needs, but the default values should be fine.
|
||||||
|
|
||||||
Dependancies:
|
Dependancies:
|
||||||
|
|
||||||
This section explain how to build the libraries needed by RawTherapee, and not provided in other packages.
|
RawTherapee rely on libraries that may not be part of the Gtkmm or MinGW package. There is two ways of installing
|
||||||
|
thoses libraries.
|
||||||
|
|
||||||
|
The simple way:
|
||||||
|
|
||||||
For your convenience, those libraries has been precompiled and are downloadable at :
|
For your convenience, those libraries has been precompiled and are downloadable at :
|
||||||
|
|
||||||
http://www.rawtherapee.com/releases_head/windows/dependancies/
|
http://www.rawtherapee.com/releases_head/windows/dependancies/
|
||||||
|
|
||||||
If you don't find a suitable package for your toolchain, build it yourself if you can or ask a developer
|
If you don't find a suitable package for your toolchain, take the DIY way or ask a developer
|
||||||
to do it for you.
|
to build them for you.
|
||||||
|
|
||||||
Just unpack the content of this archive to the base installation dir of MinGW, and everything
|
Just unpack the content of this archive to the base installation dir of MinGW, and everything
|
||||||
should work fine.
|
should work fine.
|
||||||
|
|
||||||
Requirements:
|
The "Do It Yourself" way:
|
||||||
- MinGW + MSYS
|
|
||||||
Let's say that you have intalled them respectively to "C:\mingw" and "C:\msys".
|
|
||||||
This tutorial assume that you've installed MinGW and MSYS in a path that does not contain spaces
|
|
||||||
|
|
||||||
Open an MSYS console and compile the dependancies in that order:
|
The MSYS package is required to build the libraries. See above for the download link.
|
||||||
|
|
||||||
|
Before building them, look if they are already installed in your Gtkmm and MinGW directories. There should be
|
||||||
|
two versions of the same library in different place.
|
||||||
|
|
||||||
|
Open an MSYS console, that will create a Linux environment, and compile the dependancies in that order:
|
||||||
|
|
||||||
zlib:
|
zlib:
|
||||||
If you have Gtkmm2.22 installed, you can skip this section
|
If you have Gtkmm2.22 installed, you can skip this section
|
||||||
@@ -77,12 +114,15 @@ Windows
|
|||||||
- download: http://libiptcdata.sourceforge.net/
|
- download: http://libiptcdata.sourceforge.net/
|
||||||
- how to build:
|
- how to build:
|
||||||
./configure --prefix=/mingw
|
./configure --prefix=/mingw
|
||||||
edit iptc\main.c and comment out lines 830 up to 859 (libiptcdata-1.0.4)
|
|
||||||
|
Edit the "Makefile" file from the root dir of libiptcdata, and search for "DIST_SUBDIRS ="
|
||||||
|
and "SUBDIRS =". You should only find one line for each search. From those lines, remove "iptc", then
|
||||||
|
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
|
||||||
lcms:
|
lcms:
|
||||||
- download v1.x (2.x is not implemented yet): http://sourceforge.net/projects/lcms/files/
|
- download v1.x (v2.x is not supported yet): http://sourceforge.net/projects/lcms/files/
|
||||||
- how to build:
|
- how to build:
|
||||||
./configure --prefix=/mingw
|
./configure --prefix=/mingw
|
||||||
make
|
make
|
||||||
@@ -93,11 +133,12 @@ Windows
|
|||||||
|
|
||||||
IMPORTANT:
|
IMPORTANT:
|
||||||
1. When all the compilations are done (or even before), don't forget to set the PKG_CONFIG_PATH
|
1. When all the compilations are done (or even before), don't forget to set the PKG_CONFIG_PATH
|
||||||
environment variable to the location of the pkgconfig dir, usually c:\mingw\lib\pkgconfig
|
user or system environment variable to the location of the pkgconfig dir, usually c:\mingw\lib\pkgconfig
|
||||||
|
You have to restart the console to take this new variable into account
|
||||||
2. Make sure that the *.pc files of the dependancies, located in the pkgconfig dir, has the first
|
2. Make sure that the *.pc files of the dependancies, located in the pkgconfig dir, has the first
|
||||||
line like this : prefix=/mingw
|
line like this : prefix=/mingw
|
||||||
|
|
||||||
If everything is well installed, you should see the following lines when running the cmake command (see below) :
|
If everything is well installed, you should see the following lines when running the cmake command (see "Building RT" below) :
|
||||||
-- checking for module 'libiptcdata'
|
-- checking for module 'libiptcdata'
|
||||||
-- found libiptcdata, version 1.0.4
|
-- found libiptcdata, version 1.0.4
|
||||||
-- checking for module 'lcms<=1.99'
|
-- checking for module 'lcms<=1.99'
|
||||||
@@ -111,29 +152,30 @@ Windows
|
|||||||
|
|
||||||
METHOD 1:
|
METHOD 1:
|
||||||
Requirements:
|
Requirements:
|
||||||
- MinGW + MSYS
|
- MinGW + MSYS (FIXME: Do we talk
|
||||||
- CMake
|
- CMake
|
||||||
- GTK and GTKMM development environments
|
- GTK and GTKMM development environments
|
||||||
|
|
||||||
Compile:
|
Compile:
|
||||||
- Start MSYS
|
- Start an MSYS command line interface
|
||||||
- Enter the root directory of the RawTherapee source tree
|
- Enter the root directory of the RawTherapee source tree (type: cd "/C/Absolute/Path/To/RawTherapee_sourceTree")
|
||||||
- Type: cmake -G "MSYS Makefiles" .
|
- Type: cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -Ccmo.txt .
|
||||||
- Type: make install
|
- Type: make install
|
||||||
- You find the compiled program in the release directory
|
- You'll find the compiled program in the subdirectory named like the value of CMAKE_BUILD_TYPE ("Release" in this example)
|
||||||
|
|
||||||
METHOD 2:
|
METHOD 2:
|
||||||
Requirements:
|
Requirements:
|
||||||
- tdm-gcc (http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.1.exe/download)
|
- MinGW-TDM (http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.1.exe/download)
|
||||||
- cmake (http://www.cmake.org/cmake/resources/software.html)
|
- CMake (http://www.cmake.org/cmake/resources/software.html)
|
||||||
- mercurial (http://mercurial.selenic.com/wiki/WindowsInstall)
|
- Mercurial (http://mercurial.selenic.com/wiki/WindowsInstall)
|
||||||
- gtkmm (http://ftp.se.debian.org/pub/gnome/binaries/win32/gtkmm/2.22/)
|
- Gtkmm (http://ftp.se.debian.org/pub/gnome/binaries/win32/gtkmm/2.22/)
|
||||||
|
|
||||||
Compile:
|
Compile:
|
||||||
- Enter the root directory of the RawTherapee source tree
|
- Start a standard DOS command line interface (WIN + "R" -> "cmd")
|
||||||
- Type: cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./release -DBINDIR=. -DDATADIR=. -DLIBDIR=.
|
- Enter the root directory of the RawTherapee source tree (type: cd C:\Absolute\Path\To\RawTherapee_sourceTree)
|
||||||
|
- Type: cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -Ccmo.txt .
|
||||||
- Type: mingw32-make.exe install
|
- Type: mingw32-make.exe install
|
||||||
- You find the compiled program in the "release" directory
|
- You'll find the compiled program in the subdirectory named like the value of CMAKE_BUILD_TYPE ("Release" in this example)
|
||||||
|
|
||||||
Linux
|
Linux
|
||||||
-----
|
-----
|
||||||
@@ -145,7 +187,7 @@ Linux
|
|||||||
- ...did I forget something?
|
- ...did I forget something?
|
||||||
|
|
||||||
On Ubuntu/Debian the requirements can be installed by running:
|
On Ubuntu/Debian the requirements can be installed by running:
|
||||||
sudo apt-get install build-essential cmake libgtk2.0-dev libgtkmm-2.4-dev libtiff-dev libpng-dev libjpeg-dev liblcms-dev libiptcdata-dev merciurial
|
sudo apt-get install build-essential cmake libgtk2.0-dev libgtkmm-2.4-dev libtiff-dev libpng-dev libjpeg-dev liblcms-dev libiptcdata-dev mercurial
|
||||||
|
|
||||||
Compile:
|
Compile:
|
||||||
- Enter the root directory of the RawTherapee source tree
|
- Enter the root directory of the RawTherapee source tree
|
||||||
|
32
Win32CMakeOptions-Sample.txt
Normal file
32
Win32CMakeOptions-Sample.txt
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#set (CMAKE_BUILD_TYPE Release CACHE STRING "Between: None Debug Release RelWithDebInfo MinSizeRel.")
|
||||||
|
set(CMAKE_PREFIX_PATH ./Builds/${CMAKE_BUILD_TYPE} CACHE PATH "Libraries installation path")
|
||||||
|
set(DATADIR . CACHE PATH "Datas installation path")
|
||||||
|
set(BINDIR . CACHE PATH "Binaries installation path")
|
||||||
|
set(LIBDIR . CACHE PATH "Libraries installation path")
|
||||||
|
|
||||||
|
set(CMAKE_PREFIX_PATH $ENV{GTKMM_BASEPATH} $ENV{MINGW_BASEPATH} CACHE STRING "Additional search paths")
|
||||||
|
|
||||||
|
set (BUILD_SHARED OFF CACHE BOOL "Should RT generate shared libraries")
|
||||||
|
set (WITH_RAWZOR ON CACHE BOOL "With Rawzor")
|
||||||
|
set (OPTION_OMP ON CACHE BOOL "Use OpenMP to speedup the preview and batch processing")
|
||||||
|
# set WITH_MYFILE_MMAP to OFF if you experience crash whith 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 "-mwindows -mwin32 -mthreads -march=native" 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 "-DNDEBUG -O2" CACHE STRING "Compiler options for C++ source files and Release target")
|
||||||
|
set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG -Os" CACHE STRING "Compiler options for C++ source files and MinSizeRel target")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Compiler options for C++ source files and RelWithDebInfo target")
|
||||||
|
|
||||||
|
set(CMAKE_C_FLAGS "-mwindows -mwin32 -mthreads -march=native" 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 "-DNDEBUG -O2" CACHE STRING "Compiler options for C source files and Release target")
|
||||||
|
set(CMAKE_C_FLAGS_MINSIZEREL "-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 "-mwindows -mwin32 -mthreads -mthread -march=native -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 "-s -O2" CACHE STRING "Linkage options for the Release target")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-s -Os" CACHE STRING "Linkage options for the MinSizeRel target")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "-O2" CACHE STRING "Linkage options for the RelWithDebInfo target")
|
Reference in New Issue
Block a user