Changes between Version 13 and Version 14 of CompileOnWindows
- Timestamp:
- 03/17/09 08:36:23 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CompileOnWindows
v13 v14 10 10 11 11 1. Download the '''OSGeo4W installer''' from [http://download.osgeo.org/osgeo4w/osgeo4w-setup.exe here]. 12 12 13 2. Run the installer. 14 13 15 3. Select Advanced Install, and Next. 16 14 17 4. Set the install directory to c:\OSGeo4W (other directories or fine if there are no spaces in the path but make sure to adjust the instructions below (?)) 18 15 19 5. Select '''grass''' from the desktop section (this is a binary but we'll compile from source later). 20 16 21 6. Also select '''msys''' from the command line section and '''libxdr''' from libs 22 17 23 7. Click next, the selected packages and their required subpackages will be downloaded and installed automatically. 18 24 … … 20 26 21 27 1. Run msys (there should be an icon on the desktop) 28 22 29 2. type: 23 30 {{{ … … 25 32 }}} 26 33 3. Open c:\osgeo4w\apps\msys\etc\fstab.sample 27 4. Add the line below and save as fstab 34 35 4. Add the line below to the end of the file and save as fstab 28 36 {{{ 29 37 c:\osgeo4w\ /osgeo4w 30 38 }}} 31 39 5. Download the MinGW packages: 32 '''mingw32-make''' from [http://downloads.sourceforge.net/mingw/mingw32-make-3.81-20080326-3.tar.gz here]33 '''gcc-core''' from [http://downloads.sourceforge.net/mingw/gcc-core-3.4.5-20060117-3.tar.gz here]34 '''gcc-g++''' from [http://downloads.sourceforge.net/mingw/gcc-g++-3.4.5-20060117-3.tar.gz here]35 '''w32api''' from [http://downloads.sourceforge.net/mingw/w32api-3.13-mingw32-dev.tar.gz here]36 '''mingw-utils''' from [http://downloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz here]37 38 Unpack to c:\osgeo4w40 * '''mingw32-make''' from [http://downloads.sourceforge.net/mingw/mingw32-make-3.81-20080326-3.tar.gz here] 41 * '''gcc-core''' from [http://downloads.sourceforge.net/mingw/gcc-core-3.4.5-20060117-3.tar.gz here] 42 * '''gcc-g++''' from [http://downloads.sourceforge.net/mingw/gcc-g++-3.4.5-20060117-3.tar.gz here] 43 * '''w32api''' from [http://downloads.sourceforge.net/mingw/w32api-3.13-mingw32-dev.tar.gz here] 44 * '''mingw-utils''' from [http://downloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz here] 45 46 6. Unpack to c:\osgeo4w 39 47 40 48 === Flex & Bison === 41 49 42 50 Download: 43 '''flex''' from [http://downloads.sourceforge.net/gnuwin32/flex-2.5.4a-1-bin.zip here]44 '''bison''' from [http://downloads.sourceforge.net/gnuwin32/bison-2.1-bin.zip here]45 '''bison-deps''' from [http://downloads.sourceforge.net/gnuwin32/bison-2.1-dep.zip here]46 47 Unpack all to c:\osgeo4w51 * '''flex''' from [http://downloads.sourceforge.net/gnuwin32/flex-2.5.4a-1-bin.zip here] 52 * '''bison''' from [http://downloads.sourceforge.net/gnuwin32/bison-2.1-bin.zip here] 53 * '''bison-deps''' from [http://downloads.sourceforge.net/gnuwin32/bison-2.1-dep.zip here] 54 55 Unpack all to c:\osgeo4w 48 56 49 57 === PDCurses === 50 58 51 Download PDCurses from [http://downloads.sourceforge.net/pdcurses/PDCurses-3.3.tar.gz here] 52 53 Unpack to c:\osgeo4w\usr\src\ 54 open c:\osgeo4w\usr\src\PDCurses-3.3\win32\mingwin32.mak 55 at line 80 replace 59 1. Download PDCurses from [http://downloads.sourceforge.net/pdcurses/PDCurses-3.3.tar.gz here] 60 61 2. Unpack to c:\osgeo4w\usr\src\ 62 63 3. open c:\osgeo4w\usr\src\PDCurses-3.3\win32\mingwin32.mak 64 65 4. at line 80 replace 56 66 {{{ 57 67 -copy 58 68 }}} 59 with69 with 60 70 {{{ 61 71 -cp 62 72 }}} 63 73 64 Run msys (from desktop icon) and at the prompt type: 65 66 {{{ 67 cd /osgeo4w/usr/src/PDCurses-3.3/win32 68 make 69 install libcurses.a /osgeo4w/lib 70 install pdcurses.dll /osgeo4w/bin 71 cd .. 72 install -m 644 curses.h /osgeo4w/include 74 5. Run msys (from desktop icon) and at the prompt type: 75 {{{ 76 cd /osgeo4w/usr/src/PDCurses-3.3/win32 77 make 78 install libcurses.a /osgeo4w/lib 79 install pdcurses.dll /osgeo4w/bin 80 cd .. 81 install -m 644 curses.h /osgeo4w/include 73 82 }}} 74 83 75 84 === Zlib === 76 85 77 Download '''zlib'' from [http://www.zlib.net/zlib-1.2.3.tar.gz here] 78 79 Unpack to c:\osgeo4w\usr\src\ 80 Open c:\osgeo4w\usr\src\zlib-1.2.3\win32\Makefile.gcc 81 82 Replace line 102 with: 83 84 {{{ 85 INCLUDE_PATH=/osgeo4w/include 86 LIBRARY_PATH=/osgeo4w/lib 87 SHARED_LIBRARY_PATH=/osgeo4w/bin 88 }}} 89 90 At lines 109-110 delete: 91 92 {{{ 93 -@if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH) 94 -@if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH) 95 }}} 96 97 After line 111 add: 98 99 {{{ 100 -$(INSTALL) $(SHAREDLIB) $(SHARED_LIBRARY_PATH) 101 }}} 102 103 After line 118 add: 104 105 {{{ 106 -$(RM) $(SHARED_LIBRARY_PATH)/$(SHAREDLIB) 107 }}} 108 109 Run msys (from desktop icon) and at the prompt type: 110 111 {{{ 112 cd /osgeo4w/usr/src/zlib-1.2.3 113 make -f win32/Makefile.gcc 114 make install -f win32/Makefile.gcc 86 1. Download '''zlib'' from [http://www.zlib.net/zlib-1.2.3.tar.gz here] 87 88 2. Unpack to c:\osgeo4w\usr\src\ 89 90 3. Open c:\osgeo4w\usr\src\zlib-1.2.3\win32\Makefile.gcc 91 92 4. Replace line 102 with: 93 {{{ 94 INCLUDE_PATH=/osgeo4w/include 95 LIBRARY_PATH=/osgeo4w/lib 96 SHARED_LIBRARY_PATH=/osgeo4w/bin 97 }}} 98 5. At lines 109-110 delete: 99 {{{ 100 -@if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH) 101 -@if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH) 102 }}} 103 6. After line 111 add: 104 {{{ 105 -$(INSTALL) $(SHAREDLIB) $(SHARED_LIBRARY_PATH) 106 }}} 107 7. After line 118 add: 108 {{{ 109 -$(RM) $(SHARED_LIBRARY_PATH)/$(SHAREDLIB) 110 }}} 111 8. Run msys (from desktop icon) and at the prompt type: 112 {{{ 113 cd /osgeo4w/usr/src/zlib-1.2.3 114 make -f win32/Makefile.gcc 115 make install -f win32/Makefile.gcc 115 116 }}} 116 117 117 118 (As an aside, we could probably put the following files into a zlib-headers package: 118 /osgeo4w/include/zlib.h119 /osgeo4w/include/zconf.h120 /osgeo4w/bin/zlib1.dll121 /osgeo4w/lib/libz.a122 /osgeo4w/lib/libzdll.a)119 * /osgeo4w/include/zlib.h 120 * /osgeo4w/include/zconf.h 121 * /osgeo4w/bin/zlib1.dll 122 * /osgeo4w/lib/libz.a 123 * /osgeo4w/lib/libzdll.a) 123 124 124 125 === Regex === 125 126 126 Download regex from [http://downloads.sourceforge.net/gnuwin32/regex-2.7-bin.zip here] 127 Unpack to c:\osgeo4w 127 1. Download regex from [http://downloads.sourceforge.net/gnuwin32/regex-2.7-bin.zip here] 128 129 2. Unpack to c:\osgeo4w 128 130 129 131 === Libjpeg === 130 132 131 Download libjpeg from [http://www.ijg.org/files/jpegsrc.v6b.tar.gz here]132 Unpack to c:\osgeo4w\usr\src 133 134 In MSYS console, type: 135 133 1. Download libjpeg from [http://www.ijg.org/files/jpegsrc.v6b.tar.gz here] 134 135 2. Unpack to c:\osgeo4w\usr\src 136 137 3. In MSYS console, type: 136 138 {{{ 137 139 cd /osgeo4w/usr/src/jpeg-6b … … 141 143 make install 142 144 }}} 143 144 Because make procedure doesn't create the shared library (even if enabled by configure), we need to build it manually: 145 4. Because make procedure doesn't create the shared library (even if enabled by configure), we need to build it manually: 145 146 (As a hint, you can copy the below and paste int msys with Shift+Insert) 146 147 {{{ … … 179 180 180 181 (Again as an aside, we could put the following into a jpeg-headers package (with proper attributes?): 181 /osgeo4w/lib/libjpeg.a182 /osgeo4w/bin/libjpeg.dll183 /osgeo4w/bin/cjpeg.exe184 /osgeo4w/bin/djpeg.exe185 /osgeo4w/bin/jpegtran.exe186 /osgeo4w/bin/rdjpgcom.exe187 /osgeo4w/bin/wrjpgcom.exe)182 * /osgeo4w/lib/libjpeg.a 183 * /osgeo4w/bin/libjpeg.dll 184 * /osgeo4w/bin/cjpeg.exe 185 * /osgeo4w/bin/djpeg.exe 186 * /osgeo4w/bin/jpegtran.exe 187 * /osgeo4w/bin/rdjpgcom.exe 188 * /osgeo4w/bin/wrjpgcom.exe) 188 189 189 190 === PostgreSQL === 190 191 191 Download pgsql from [http://ftp2.it.postgresql.org/mirrors/postgres/source/v8.3.1/postgresql-8.3.6.tar.gz here] 192 Unpack to c:\osgeo4w 193 open c:\osgeo4w\postgresql-8.3.6\src\test\regress\pg_regress.c 194 At line 51 195 change: 196 char *bindir = PGBINDIR; 197 char *libdir = LIBDIR; 198 char *datadir = PGSHAREDIR; 199 200 to: 201 char *bindir = "/osgeo4w/apps/pgsql/bin"; 202 char *libdir = "/osgeo4w/apps/pgsql/lib"; 203 char *datadir = "/osgeo4w/apps/pgsql/share"; 204 205 In msys console type: 206 192 1. Download pgsql from [http://ftp2.it.postgresql.org/mirrors/postgres/source/v8.3.1/postgresql-8.3.6.tar.gz here] 193 194 2. Unpack to c:\osgeo4w 195 196 3. Open c:\osgeo4w\postgresql-8.3.6\src\test\regress\pg_regress.c 197 198 4. At line 51 change: 199 {{{ 200 char *bindir = PGBINDIR; 201 char *libdir = LIBDIR; 202 char *datadir = PGSHAREDIR; 203 }}} 204 to: 205 {{{ 206 char *bindir = "/osgeo4w/apps/pgsql/bin"; 207 char *libdir = "/osgeo4w/apps/pgsql/lib"; 208 char *datadir = "/osgeo4w/apps/pgsql/share"; 209 }}} 210 5. In the msys console type: 207 211 {{{ 208 212 cd /osgeo4w/postgresql-8.3.6 … … 216 220 217 221 === SQLite === 218 Download '''sqlite3''' from [http://www.sqlite.org/sqlite-amalgamation-3.5.9.tar.gz here] 219 Unpack to c:\osgeo4w\usr\src 222 223 1. Download '''sqlite3''' from [http://www.sqlite.org/sqlite-amalgamation-3.5.9.tar.gz here] 224 225 2. Unpack to c:\osgeo4w\usr\src 220 226 221 227 {{{ … … 227 233 === GDAL === 228 234 229 '''Untested''' 230 231 Get gdal <http://download.osgeo.org/gdal/gdal-1.5.2.tar.gz> 232 Unpack to c:\osgeo4w\usr\src 233 Open c:\osgeo4w\usr\src\gdal-1.5.2\configure 234 At line 23832 replace: 235 235 '''Untested: so far gdal-1.5.2 won't compile, perhaps try a newer version''' 236 237 1. Download '''gdal''' from [http://download.osgeo.org/gdal/gdal-1.5.2.tar.gz here] 238 239 2. Unpack to c:\osgeo4w\usr\src 240 241 3. Open c:\osgeo4w\usr\src\gdal-1.5.2\configure 242 243 4. At line 23832 replace: 236 244 {{{ 237 245 expat_lib_flags="-L$expat_prefix/lib -lexpat" 238 246 }}} 239 with:247 with: 240 248 {{{ 241 249 LIBS="$LIBS -L$expat_prefix/lib -lexpat" 242 250 }}} 243 244 In MSYS console, type: 251 5. In MSYS console, type: 245 252 {{{ 246 253 cd /usr/local/src/gdal-1.5.2 … … 250 257 --with-pg=/osgeo4w/apps/pgsql/bin/pg_config.exe 251 258 }}} 252 Open c:\msys\local\src\gdal-1.5.2\GNUmakefile253 After line 4 add:259 6. Open c:\msys\local\src\gdal-1.5.2\GNUmakefile 260 7. After line 4 add: 254 261 {{{ 255 262 GDAL_ROOT=. 256 263 }}} 257 Finally build and install GDAL:264 8. Finally build and install GDAL: 258 265 {{{ 259 266 make -f GNUmakefile … … 265 272 '''Untested''' 266 273 267 Download Tcl from [http://prdownloads.sourceforge.net/tcl/tcl8.5.2-src.tar.gz here] 268 Download Tk from [http://prdownloads.sourceforge.net/tcl/tk8.5.2-src.tar.gz here] 269 Unpack both to c:\osgeo4w\usr\src 270 In the msys console type: 274 1. Download Tcl from [http://prdownloads.sourceforge.net/tcl/tcl8.5.2-src.tar.gz here] 275 276 2. Download Tk from [http://prdownloads.sourceforge.net/tcl/tk8.5.2-src.tar.gz here] 277 278 3. Unpack both to c:\osgeo4w\usr\src 279 280 4. In the msys console type: 271 281 {{{ 272 282 cd /osgeo4w/usr/src/tcl8.5.2/win … … 286 296 === Compiling and Installing GRASS (6.4.0) === 287 297 288 * Download the latest GRASS 6.4.0 source code from [http://grass.osgeo.org/grass64/source/snapshot/ here]. 289 * Unpack to c:\osgeo4w\usr\src 290 * Download the installer script '''package.sh''' from [http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/mswindows/osgeo4w/package.sh?format=raw here] and put in c:\osgeo4w\usr\src\grass-6.4xxx 291 * Open package.sh and at line 12: 298 1. Download the latest GRASS 6.4.0 source code from [http://grass.osgeo.org/grass64/source/snapshot/ here]. 299 300 2. Unpack to c:\osgeo4w\usr\src 301 302 3. Download the installer script '''package.sh''' from [http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/mswindows/osgeo4w/package.sh?format=raw here] and put in c:\osgeo4w\usr\src\grass-6.4xxx 303 304 4. Open package.sh and at line 12: 292 305 Change: 293 306 {{{ … … 300 313 --with-includes=/c/OSGeo4W/include \ 301 314 }}} 302 303 To compile, type in MSYS console: 304 315 5. To compile, type in MSYS console: 305 316 {{{ 306 317 export PATH="/osgeo4w/bin:/osgeo4w/apps/tcl-tk/bin:/osgeo4w/apps/sqlite/bin:/osgeo4w/apps/pgsql/lib:$PATH"
