forked from LuminanceHDR/LuminanceHDR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
250 lines (179 loc) · 10.4 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
This is the INSTALL file for Luminance HDR
-------------------------------------------------------------------
Copyright (C) 2006-2010, Giuseppe Rota <[email protected]>
2010-2017, Davide Anastasia <[email protected]>
Franco Comida <[email protected]>
Daniel Kaneider <[email protected]>
Version: 2017-07-01
Webpage: http://qtpfsgui.sourceforge.net
GitHub: http://github.com/LuminanceHDR/LuminanceHDR
Sourceforge: http://sourceforge.net/projects/qtpfsgui
Contents
---------
1. Basic compilation of the sources
2. Internationalization
3. Dependencies
4. Platform Notes
5. Enabling Unit Test compilation
6. Note for Packagers
The build system is based on CMake (http://www.cmake.org/).
The build description is contained in the CMakeLists.txt file.
1. Basic compilation of the sources
-------------------------------------------------------------------
To compile from source execute the following command from an EMPTY folder:
> cmake <luminance source code directory>
to generate the Makefile. We strongly suggest to use an EMPTY folder OUTSIDE the source
directory.
It is also possible to generate specific project files for well known IDEs (Visual Studio,
Xcode and so on). Please, refer to CMake's manual for all the available options.
CMake will also check whether all the dependecies are available or not and it will show
a message accordingly.
Then execute the command:
> make
to compile the source code.
Finally execute (as root) the command:
> make install
to install the luminance executable in /usr/local/bin (if not differently specified during
the configuration command). This last step will also install the icon, the desktop file,
the html documentation and the "qm" translation files used for internationalization.
2. Internationalization
-------------------------------------------------------------------
Luminance HDR source are shipped with updated translation files for internationalization.
These file are stored inside the folder "i18n". Should you make a change inside the source code
(in particular on the UI), you need to update them.
Enabling updating of translations is performed issuing the following command:
> cmake -DUPDATE_TRANSLATIONS=ON .
if the current working directory (please, refer to 1. of this file) has already been
built, otherwise:
> cmake -DUPDATE_TRANSLATIONS=ON <luminance source code directory>
This command will regenerate the Makefile for translation update. Then:
> make
will update every .ts file.
To bring back the working folder to the original "building mode", you must use this command:
> cmake -DUPDATE_TRANSLATIONS=OFF .
and then
> make
to build correctly the whole source directory.
3. Dependencies
-------------------------------------------------------------------
Luminance has 12 dependencies (eleven are mandatory, one is optional):
1) Qt5 (http://qt-project.org)
Qt5 is the heart of the the graphical user interface (GUI).
2) exiv2 (www.exiv2.org)
libexiv2 is a C/C++ library used to extract EXIF tags from LDR and RAW image files, and it is
required in order to extract the aperture, exposure-time and ISO tags from the input
images (and for other EXIF-related functionalities).
3) fftw3 (www.fftw.org)
FFTW is required by the fast implementation of various tonemapping algorithm and anti-ghosting feature.
Luminance HDR requires the "float" version of fftw3 (usually called fftw3f or fftw3-single on MacPorts).
4) libtiff (http://www.remotesensing.org/libtiff)
libtiff is required because of the tiff load/save feature.
5) libjpeg (http://libjpeg.sourceforge.net/)
libjpeg is required because of the jpeg load/save feature.
6) libpng (http://libpng.org/)
libpng is required because of the png save feature.
7) OpenEXR (www.openexr.com)
OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light &
Magic for use in computer imaging applications. The package is also known as *ilmbase*
in some GNU/Linux distributions.
8) Gnu Gsl (http://www.gnu.org/software/gsl/)
Gnu GSL is required because Mantiuk08 TMO uses this library.
9) LibRAW (http://www.libraw.org/)
Used to read the vast majority of RAW file on the market.
10) LCMS2 (http://www.littlecms.com/)
Luminance HDR color management engine.
11) Boost (http://www.boost.org/)
Boost provides free peer-reviewed portable C++ source libraries used inside Luminance HDR project.
12) cfitsio (Optional) (http://heasarc.gsfc.nasa.gov/fitsio/)
CFITSIO is a library of C and Fortran subroutines for reading and writing data files in FITS
(Flexible Image Transport System) data format.
Luminance HDR can optionally support this file format commonly used by the astrophotographers community.
The build system will automatically detect the presence of the library in the system enabling proper support
for astronomical image processing.
3 Platform Notes
-------------------------------------------------------------------
Windows:
Currently, Luminance HDR can be compiled using Microsoft Visual Studio. It either works
using precompiled libraries (supplied at http://sourceforge.net/projects/qtpfsgui/files/DEPs/
for different versions of Visual Studio) or building every dependency and Luminance itself using a script file
(build_files/platforms/msvc/getDependencies.cmd.
More information can be found inside build_files/platforms/msvc/README.txt).
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GNU/Linux:
On GNU/Linux you have to compile the code and you need the aforementioned packages
(and the *devel* or *dev* ones, depending on the distribution's naming convention).
CMake will guide you to correctly understand which dependency are missing and which are not.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MacOS-X:
For assistance with the MacOS-X Build, contact [email protected]
On MacOS-X, all the dependecies can be obtained using MacPorts, except LibRAW that
must be compiled from source.
Qt5 which must be downloaded from the official website of the Qt project.
If you install Qt/5.9 into ~/Qt/5.9, generate the project with:
$ export QT=~/Qt/5.9/clang_64
$ cd LuminanceHDR
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_PREFIX_PATH=$(echo $QT/lib/cmake/* | sed -Ee 's$ $;$g')
$ make
Caution 1:
If you crash on start up with a message about libz.1.2.8.dylib, modify the executable as follows:
$ install_name_tool -change @loader_path/libz.1.2.8.dylib @loader_path/libz.1.dylib Luminance\ HDR\ 2.5.1.app/Contents/MacOS/Luminance\ HDR\ 2.5.1
Caution 2:
If you built libboost from source, you may encounter errors from macdeployqt about missing libraries.
Copy the boost libraries to /usr/lib
$ sudo cp /usr/local/*boost*.dylib /usr/lib
Copy Qt frameworks and dynamic libraries into the bundle:
$ $QT/bin/macdeployqt Luminance\ HDR\ 2.5.1.app/ -executable=Luminance\ HDR\ 2.5.1.app/Contents/MacOS/luminance-hdr-cli -no-strip -always-overwrite
Caution: This may produce the following warnings (which you may ignore) such as:
WARNING: Plugin "libqsqlodbc.dylib" uses private API and is not Mac App store compliant.
WARNING: Plugin "libqsqlpsql.dylib" uses private API and is not Mac App store compliant.
ERROR: no file at "/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib"
ERROR: no file at "/usr/local/lib/libpq.5.dylib"
If you wish to make a DMG (optional)
$ hdiutil create -ov -srcfolder Luminance\ HDR\ 2.5.1.app Luminance\ HDR\ 2.5.1.dmg
If you wish to build with an earlier version of the MacOS-X Platform SDK (eg 10.9), use the following:
+----------------------------------------------------+
| You can obtain legacy SDKs here: |
| https://github.com/phracker/MacOSX-SDKs/releases |
+----------------------------------------------------+
$ export QT=~/Qt/5.9/clang_64
$ export MACOSX_DEPLOYMENT_TARGET="10.9"
$ export CMAKE_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"
$ cmake .. -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="10.9" \
-DCMAKE_PREFIX_PATH=$(echo $QT/lib/cmake/* | sed -Ee 's$ $;$g')
$ make
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
4. Enabling Unit Test compilation
-------------------------------------------------------------------
In order to enable the compilation of our testing code pass -DENABLE_UNIT_TEST=ON option to cmake.
Google's framework 'gtest' must be installed in your system, the resulting test executables
will be placed under <BUILD_ROOT>/test where <BUILD_ROOT> is your building root directory.
5. Note for Packagers
-------------------------------------------------------------------
Luminance's default installation prefix is "/usr/local". You can execute:
> cmake -DCMAKE_INSTALL_PREFIX=/usr
before running make in order to modify the default CMAKE_INSTALL_PREFIX.
Icon luminance-hdr.png will be installed in ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps.
You may need to run update-desktop-database in case Luminance's entry doesn't show up
in the graphical menus.
Translation files will be installed inside ${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/i18n
Help files will be installed inside ${CMAKE_INSTALL_PREFIX}/share/luminance-hdr/help
Running:
> cmake -DCMAKE_BUILD_TYPE={Debug,Release,RelWithDebInfo}
creates a Makefile that builds Luminance with different debug levels. It is strongly
suggest to use *RelWithDebInfo*: this option will leave inside the final executable all
the info necessary for a proper debug but at the same time will optimize the code as much
as possible for good performance.
The Windows EXE is currently build using Microsoft Visual Studio.
In GNU/Linux you have to compile the code and you need the packages mentioned in Section 3
(and the *devel* or *dev* ones, depending on the distribution's naming convention).
If you want to compile the sources in windows, you need to have a compiled version of all
the dependencies.
Building Luminance from sources on Mac OS X can be performed creating a Makefile or an Xcode
project using CMake. By default, CMake creates a Makefile on Mac OS X.
OpenMP is only available if compiling with GCC 4.3 or newer or with Microsoft Visual Studio
(CMake will correctly find the right option for OpenMP accordingly to your compiler).
Optimisation note: the default compiler flags include SSE2 and [Linux only] OpenMP.
SSE2 is only available on recent CPUs (Pentium 4, Pentium-M or newer).