Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

README.WIN32 6.8 KB

You have to be logged in to leave a comment. Sign In
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
  1. ////
  2. $Id$
  3. ////
  4. ** HOWTO install GMT5 on Windows using CMake **
  5. == Runtime dependencies
  6. Ghostscript
  7. ===========
  8. Install a recent Ghostscript version. We recommend the 32 bit version from
  9. http://www.ghostscript.com/download/gsdnld.html
  10. == Build dependencies
  11. Microsoft Windows SDK
  12. =====================
  13. Note: You don't need Visual Studio 2010. Be aware, that Visual Studio 2010
  14. Express cannot compile x64 binaries. You need the Windows SDK for that.
  15. Download and install Microsofts free SDK for Windows, e.g. v7.1:
  16. http://www.microsoft.com/download/en/details.aspx?id=8279
  17. CMake
  18. =====
  19. Install CMake and select option to add CMake to the system PATH.
  20. http://www.cmake.org/cmake/resources/software.html
  21. Subversion
  22. ==========
  23. You need to install Subversion in order to fetch the sources. Make sure svn is
  24. in the PATH. A Windows version is available here: http://alagazam.net/
  25. netCDF
  26. ======
  27. Update: Unidata officially provides CMake support since netCDF 4.3.0
  28. (http://www.unidata.ucar.edu/software/netcdf/docs/netCDF-CMake.html).
  29. Compiling netCDF from scratch on Windows is not an easy task since you need a
  30. lot of dependencies. You could either install a prepackaged development build
  31. from http://www.gfd-dennou.org/arch/ucar/netcdf/contrib/win32/. For instance
  32. netcdf-4.1.1-win32-bin.zip, and hope that it works. Most certainly it will
  33. just not. Hence, we suggest you build netCDF yourself.
  34. Note: In the following examples we assume that dependent libraries are
  35. installed in sudirectories of z:\software\ any other directory is fine
  36. though.
  37. Obtain the CMake bundled sources of netCDF via subversion from
  38. svn://gmtserver.soest.hawaii.edu/gmt5/sandbox/win32-dev/netcdf-4.1.3 and follow
  39. the instructions in README.CMake in the netcdf-4.1.3 directory.
  40. [...]
  41. OK, well done. You successfully finished installing all required dependencies
  42. for GMT. If you don't need PCRE and GDAL than you are all ready to build GMT!
  43. PCRE (optional)
  44. ===============
  45. Get PCRE from http://www.pcre.org/ and extract pcre-8.30.zip in
  46. z:\software\src\pcre-8.30\
  47. - Open the SDK Command Prompt:
  48. cd z:\software\src\pcre-8.30\
  49. mkdir build
  50. cd build
  51. cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=z:\software -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON ..
  52. nmake install
  53. - Check if you can run 'pcregrep' from the command prompt.
  54. GDAL (optional)
  55. ===============
  56. We assume that you already installed HDF4, HDF5, cURL, netCDF to z:\software.
  57. If that is not the case get the sources of netCDF for Windows from
  58. svn://gmtserver.soest.hawaii.edu/gmt5/sandbox/win32-dev/netcdf-4.1.3
  59. and follow the instructions in README.CMake in the source directory.
  60. Now that all dependent libraries are available we can proceed with GDAL. In
  61. the following we assume that the target install directory for GDAL is
  62. z:\software as well.
  63. - Get the GDAL sources from http://trac.osgeo.org/gdal/wiki/DownloadSource
  64. - Extract gdal190.zip in z:\software\src\gdal-1.9.0
  65. - Create a file z:\software\src\gdal-1.9.0\nmake.local with the following
  66. content:
  67. LAPACK (optional)
  68. =================
  69. You need to install MinGW/MSYS and run the cmake from within the MSYS shell.
  70. Path to the gfortran compiler must also be adapted to ones particular case.
  71. Note also that the liblapack.dll will introduce by itself new dependencies on:
  72. libblas.dll, libgfortran-3.dll, libgcc_s_seh-1.dll and libquadmath-0.dll
  73. It's up to the user to make all these dependencies available to the system at runtime.
  74. Get LAPACK from http://netlib.org/lapack/lapack.tgz and extract lapack.tgz in
  75. z:\software\lapack-3.5.0\
  76. cd z:\software\lapack-3.5.0\
  77. mkdir build
  78. cd build
  79. cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=z:\software -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_GNUtoMS=ON -DCMAKE_Fortran_COMPILER=C:/MinGW64/mingw64/bin/gfortran.exe ..
  80. nmake install
  81. --------8<-------------------------------------------------------
  82. MSVC_VER = 1600
  83. WARNFLAGS = /w
  84. WIN64 = YES
  85. GDAL_HOME = z:\software
  86. HDF4_PLUGIN = NO
  87. HDF4_DIR = "c:\Program Files\HDF Group\HDF4\4.2.7"
  88. HDF4_LIB = /LIBPATH:$(HDF4_DIR)\lib hdfdll.lib mfhdfdll.lib
  89. HDF5_PLUGIN = NO
  90. HDF5_DIR = "c:\Program Files\HDF Group\HDF5\1.8.8"
  91. HDF5_LIB = /LIBPATH:$(HDF5_DIR)\lib hdf5dll.lib
  92. PCIDSK_SETTING = OLD
  93. NETCDF_PLUGIN = NO
  94. NETCDF_SETTING = yes
  95. NETCDF_LIB = z:\software\lib\netcdf.lib
  96. NETCDF_INC_DIR = z:\software\include
  97. NETCDF_HAS_NC4 = yes
  98. CURL_DIR = z:\software
  99. CURL_INC = -I$(CURL_DIR)\include
  100. CURL_LIB = $(CURL_DIR)\lib\libcurl_imp.lib Ws2_32.lib
  101. ------------------------------------------------------->8--------
  102. Change the options according to your local setup. If unsure check the defaults
  103. in nmake.opt.
  104. - Open Windows SDK Command Prompt
  105. cd z:\software\src\gdal-1.9.0\
  106. nmake /f makefile.vc
  107. nmake /f makefile.vc devinstall
  108. - Make sure z:\software\bin is in the PATH and type 'ogr2ogr'.
  109. It should greet you with usage information if everything is fine.
  110. NSIS (optional)
  111. ================
  112. You also need to install NSIS (Nullsoft Scriptable Install System) if you want
  113. to bundle GMT with all dependent DLLs and create a Windows intaller.
  114. Download from http://nsis.sourceforge.net/
  115. == Building GMT5
  116. Finally we are ready to compile GMT5.
  117. - Get GMT and GSHHG (Shoreline Database) from http://gmt.soest.hawaii.edu/
  118. - In the source tree copy cmake/ConfigUserTemplate.cmake to
  119. cmake/ConfigUser.cmake and edit the file according to your demands. This is
  120. an example:
  121. set (CMAKE_INSTALL_PREFIX z:/software/gmt5msc)
  122. set (GSHHG_ROOT z:/software/src/gshhg-gmt)
  123. set (NETCDF_ROOT z:/software)
  124. set (GDAL_ROOT z:/software)
  125. set (PCRE_ROOT z:/software)
  126. - Open Windows SDK Command Prompt
  127. set PATH=%PATH%;z:\software\bin
  128. mkdir build
  129. cd build
  130. cmake -G "NMake Makefiles" ..
  131. nmake
  132. nmake docs_html
  133. nmake install
  134. - Typing 'gmt' should get you with a short message. You need to set your PATH
  135. to the directory specified in CMAKE_INSTALL_PREFIX:
  136. set PATH=%PATH%;z:\software\gmt5msc\bin
  137. Congratulations you managed to install GMT5 on your machine!
  138. Packaging with NSIS (optional)
  139. ==============================
  140. Note: If you just want to create a GMT package you do not need to 'nmake
  141. install' above.
  142. CPack supports stand-alone ZIP archives and NSIS installers on Windows. After
  143. building GMT run:
  144. nmake package
  145. This will create both a ZIP archive and NSIS installer. If there are no issues
  146. then you will obtain three files, e.g.:
  147. GMT-5.x.x-win64-Documentation.zip
  148. GMT-5.x.x-win64-Runtime.zip
  149. GMT-5.x.x-win64.exe
  150. Dependency walking takes a long time so be patient. You can save some time if
  151. you are only interested in one of the two package options. Invoke CPack
  152. instead:
  153. cpack -G <ZIP|NSIS>
  154. The software packages are self contained and already include all dependent
  155. DLLs (netCDF, GDAL, PCRE, ...).
  156. Enjoy!
  157. The GMT Team
  158. ////
  159. vim: ft=asciidoc tw=78 et ts=2 sts=2 sw=2 autoindent smartindent
  160. ////
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...