annotate INSTALL @ 366:68fd4de63eae

create temporary files file a given extension
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 07 Feb 2013 09:32:53 +0100
parents 238134081136
children 1da6ec6038f5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
1 Orthanc - A Lightweight, RESTful DICOM Server
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
2 =============================================
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
3
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
4
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
5 Dependencies
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
6 ------------
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
7
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
8 1) CMake: Orthanc uses CMake (http://www.cmake.org/) to automate its
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
9 building process.
7
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
10
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
11 2) Python: Some code is autogenerated through Python
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
12 (http://www.python.org/).
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
13
7
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
14 3) Mercurial: To use the cutting edge code, a Mercurial client must be
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
15 installed (http://mercurial.selenic.com/). We recommand TortoiseHg.
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
16
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
17 W) 7-Zip: For the native build under Windows, the 7-Zip tool is used
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
18 to uncompress the third-party packages (http://www.7-zip.org/).
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
19
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
20 You thus have to download and install CMake, Python, Mercurial and
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
21 possibly 7-Zip first. The path to their executable must be in the
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
22 "PATH" environment variable.
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
23
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
24 The other third party dependencies are automatically downloaded by the
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
25 CMake scripts. The downloaded packages are stored in the
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
26 "ThirdPartyDownloads" directory.
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
27
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
28
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
29 Building Orthanc at a glance
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
30 ----------------------------
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
31
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
32 To build Orthanc, you must:
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
33
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
34 1) Download the source code (either using Mercurial, or through the
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
35 released versions). For the examples below, we assume the source
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
36 directory is "~/Orthanc".
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
37
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
38 2) Create a build directory. For the examples below, we assume the
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
39 build directory is "~/OrthancBuild".
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
40
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
41
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
42
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
43 Native Linux Compilation
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
44 ------------------------
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
45
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
46 To build binaries with debug information:
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
47
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
48 # cd ~/OrthancBuild
292
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 291
diff changeset
49 # cmake -DCMAKE_BUILD_TYPE=Debug ~/Orthanc
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
50 # make
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
51 # make doc
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
52
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
53
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
54 To build a release version:
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
55
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
56 # cd ~/OrthancBuild
292
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 291
diff changeset
57 # cmake -DCMAKE_BUILD_TYPE=Release ~/Orthanc
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
58 # make
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
59 # make doc
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
60
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
61
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
62 Under Linux, you have the possibility to dynamically link Orthanc
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
63 against the shared libraries of your system, provided their version is
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
64 recent enough. This greatly speeds up the compilation:
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
65
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
66 # cd ~/OrthancBuild
292
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 291
diff changeset
67 # cmake -DSTATIC_BUILD=OFF -DCMAKE_BUILD_TYPE=Debug ~/Orthanc
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
68 # make
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
69
287
471df5fecb1e simplification to cmake for dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 74
diff changeset
70
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
71
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
72 Cross-Compilation for Windows under Linux
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
73 -----------------------------------------
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
74
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
75 To cross-compile Windows binaries under Linux using MinGW, please use
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
76 the following command:
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
77
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
78 # cd ~/OrthancBuild
292
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 291
diff changeset
79 # cmake -DCMAKE_TOOLCHAIN_FILE=~/Orthanc/Resources/MinGWToolchain.cmake -DSTANDALONE_BUILD=ON -DCMAKE_BUILD_TYPE=Debug ~/Orthanc
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
80 # make
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
81
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
82
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
83
7
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
84 Native Windows build with MinGW (VERY SLOW)
13
7908a4c25a18 preparation for release
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 7
diff changeset
85 -------------------------------------------
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
86
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
87 # cd [...]\OrthancBuild
292
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 291
diff changeset
88 # cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug [...]\Orthanc
2
67a6978503b7 fixing Windows build
Jodogne@Laptop
parents: 0
diff changeset
89 # mingw32-make
7
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
90
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
91
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
92
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
93 Native Windows build with Microsoft Visual Studio 2005
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
94 ------------------------------------------------------
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
95
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
96 # cd [...]\OrthancBuild
291
4d7469f72a0b embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 288
diff changeset
97 # cmake -DSTANDALONE_BUILD=ON -G "Visual Studio 8 2005" [...]\Orthanc
7
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
98
57
4bc019d2f969 renaming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 48
diff changeset
99 Then open the "[...]/OrthancBuild/Orthanc.sln" with Visual Studio.
7
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
100
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
101 NOTES:
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
102 * More recent versions of Visual Studio should also work.
74
09718f2fc5cb silent unzip
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 57
diff changeset
103 * You will have to install the Platform SDK (version 6 or above) for
09718f2fc5cb silent unzip
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 57
diff changeset
104 Visual Studio 2005:
7
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2
diff changeset
105 http://en.wikipedia.org/wiki/Microsoft_Windows_SDK.
13
7908a4c25a18 preparation for release
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 7
diff changeset
106 Read the CMake FAQ: http://goo.gl/By90B
288
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 287
diff changeset
107
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 287
diff changeset
108
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 287
diff changeset
109
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 287
diff changeset
110 Debian/Ubuntu specific
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 287
diff changeset
111 ----------------------
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 287
diff changeset
112
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 287
diff changeset
113 When dynamically linking against the system libraries, you have to
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 287
diff changeset
114 manually add the "wrap" and "oflog" libraries at the configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 287
diff changeset
115 time (because of a packaging error in "libdcmtk"):
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 287
diff changeset
116
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 287
diff changeset
117 # cd ~/OrthancBuild
292
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 291
diff changeset
118 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" -DSTATIC_BUILD=OFF -DCMAKE_BUILD_TYPE=Debug ~/Orthanc
288
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 287
diff changeset
119 # make
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 287
diff changeset
120
302
238134081136 modification of dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 292
diff changeset
121
238134081136 modification of dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 292
diff changeset
122
238134081136 modification of dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 292
diff changeset
123 Using ccache
238134081136 modification of dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 292
diff changeset
124 ------------
238134081136 modification of dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 292
diff changeset
125
238134081136 modification of dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 292
diff changeset
126 Under Linux, you have the opportunity to use "ccache" to dramatically
238134081136 modification of dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 292
diff changeset
127 decrease the compilation time when rebuilding Orthanc. This is
238134081136 modification of dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 292
diff changeset
128 especially useful for developers. Under Debian/Ubuntu, you would use:
238134081136 modification of dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 292
diff changeset
129
238134081136 modification of dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 292
diff changeset
130 # CC="ccache gcc" CXX="ccache g++" cmake "-DDCMTK_LIBRARIES=wrap;oflog" \
238134081136 modification of dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 292
diff changeset
131 -DSTATIC_BUILD=OFF -DCMAKE_BUILD_TYPE=Debug ~/Orthanc
238134081136 modification of dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 292
diff changeset
132