Changes between Version 13 and Version 14 of CompileOnWindows


Ignore:
Timestamp:
Mar 17, 2009, 8:36:23 AM (15 years ago)
Author:
cnielsen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CompileOnWindows

    v13 v14  
    1010
    11111. Download the '''OSGeo4W installer''' from [http://download.osgeo.org/osgeo4w/osgeo4w-setup.exe here].
     12
    12132. Run the installer.
     14
    13153. Select Advanced Install, and Next.
     16
    14174. 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
    15195. Select '''grass''' from the desktop section (this is a binary but we'll compile from source later).
     20
    16216. Also select '''msys''' from the command line section and '''libxdr''' from libs
     22
    17237. Click next, the selected packages and their required subpackages will be downloaded and installed automatically.
    1824
     
    2026
    21271. Run msys (there should be an icon on the desktop)
     28
    22292. type:
    2330{{{
     
    2532}}}
    26333. Open c:\osgeo4w\apps\msys\etc\fstab.sample
    27 4. Add the line below and save as fstab
     34
     354. Add the line below to the end of the file and save as fstab
    2836{{{
    2937c:\osgeo4w\     /osgeo4w
    3038}}}
    31395. 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:\osgeo4w
     40 * '''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
     466. Unpack to c:\osgeo4w
    3947
    4048=== Flex & Bison ===
    4149
    4250Download:
    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:\osgeo4w
     51 * '''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
     55Unpack all to c:\osgeo4w
    4856
    4957=== PDCurses ===
    5058
    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
     591. Download PDCurses from [http://downloads.sourceforge.net/pdcurses/PDCurses-3.3.tar.gz here]
     60
     612. Unpack to c:\osgeo4w\usr\src\
     62
     633. open c:\osgeo4w\usr\src\PDCurses-3.3\win32\mingwin32.mak
     64
     654. at line 80 replace
    5666{{{
    5767-copy
    5868}}}
    59  with
     69with
    6070{{{
    6171-cp
    6272}}}
    6373
    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
     745. Run msys (from desktop icon) and at the prompt type:
     75{{{
     76cd /osgeo4w/usr/src/PDCurses-3.3/win32
     77make
     78install libcurses.a /osgeo4w/lib
     79install pdcurses.dll /osgeo4w/bin
     80cd ..
     81install -m 644 curses.h /osgeo4w/include
    7382}}}
    7483
    7584=== Zlib ===
    7685
    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
     861. Download '''zlib'' from [http://www.zlib.net/zlib-1.2.3.tar.gz here]
     87
     882. Unpack to c:\osgeo4w\usr\src\
     89
     903. Open c:\osgeo4w\usr\src\zlib-1.2.3\win32\Makefile.gcc
     91
     924. Replace line 102 with:
     93{{{
     94INCLUDE_PATH=/osgeo4w/include
     95LIBRARY_PATH=/osgeo4w/lib
     96SHARED_LIBRARY_PATH=/osgeo4w/bin
     97}}}
     985. 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}}}
     1036. After line 111 add:
     104{{{
     105-$(INSTALL) $(SHAREDLIB) $(SHARED_LIBRARY_PATH)
     106}}}
     1077. After line 118 add:
     108{{{
     109-$(RM) $(SHARED_LIBRARY_PATH)/$(SHAREDLIB)
     110}}}
     1118. Run msys (from desktop icon) and at the prompt type:
     112{{{
     113cd /osgeo4w/usr/src/zlib-1.2.3
     114make -f win32/Makefile.gcc
     115make install -f win32/Makefile.gcc
    115116}}}
    116117
    117118(As an aside, we could probably put the following files into a zlib-headers package:
    118    /osgeo4w/include/zlib.h
    119    /osgeo4w/include/zconf.h
    120    /osgeo4w/bin/zlib1.dll
    121    /osgeo4w/lib/libz.a
    122    /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)
    123124
    124125=== Regex ===
    125126
    126 Download regex from [http://downloads.sourceforge.net/gnuwin32/regex-2.7-bin.zip here]
    127     Unpack to c:\osgeo4w
     1271. Download regex from [http://downloads.sourceforge.net/gnuwin32/regex-2.7-bin.zip here]
     128
     1292. Unpack to c:\osgeo4w
    128130
    129131=== Libjpeg ===
    130132
    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 
     1331. Download libjpeg from [http://www.ijg.org/files/jpegsrc.v6b.tar.gz here]
     134
     1352. Unpack to c:\osgeo4w\usr\src
     136
     1373. In MSYS console, type:
    136138{{{
    137139cd /osgeo4w/usr/src/jpeg-6b
     
    141143make install
    142144}}}
    143 
    144 Because make procedure doesn't create the shared library (even if enabled by configure), we need to build it manually:
     1454. Because make procedure doesn't create the shared library (even if enabled by configure), we need to build it manually:
    145146(As a hint, you can copy the below and paste int msys with Shift+Insert)
    146147{{{
     
    179180
    180181(Again as an aside, we could put the following into a jpeg-headers package (with proper attributes?):
    181    /osgeo4w/lib/libjpeg.a
    182    /osgeo4w/bin/libjpeg.dll
    183    /osgeo4w/bin/cjpeg.exe
    184    /osgeo4w/bin/djpeg.exe
    185    /osgeo4w/bin/jpegtran.exe
    186    /osgeo4w/bin/rdjpgcom.exe
    187    /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)
    188189
    189190=== PostgreSQL ===
    190191
    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 
     1921. Download pgsql from [http://ftp2.it.postgresql.org/mirrors/postgres/source/v8.3.1/postgresql-8.3.6.tar.gz here]
     193
     1942. Unpack to c:\osgeo4w
     195
     1963. Open c:\osgeo4w\postgresql-8.3.6\src\test\regress\pg_regress.c
     197
     1984. At line 51 change:
     199{{{
     200char       *bindir = PGBINDIR;
     201char       *libdir = LIBDIR;
     202char       *datadir = PGSHAREDIR;
     203}}}
     204to:
     205{{{
     206char       *bindir = "/osgeo4w/apps/pgsql/bin";
     207char       *libdir = "/osgeo4w/apps/pgsql/lib";
     208char       *datadir = "/osgeo4w/apps/pgsql/share";
     209}}}     
     2105. In the msys console type:
    207211{{{
    208212cd /osgeo4w/postgresql-8.3.6
     
    216220
    217221=== 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
     2231. Download '''sqlite3''' from [http://www.sqlite.org/sqlite-amalgamation-3.5.9.tar.gz here]
     224
     2252. Unpack to c:\osgeo4w\usr\src
    220226
    221227{{{
     
    227233=== GDAL ===
    228234
    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
     2371. Download '''gdal''' from [http://download.osgeo.org/gdal/gdal-1.5.2.tar.gz here]
     238
     2392. Unpack to c:\osgeo4w\usr\src
     240
     2413. Open c:\osgeo4w\usr\src\gdal-1.5.2\configure
     242
     2434. At line 23832 replace:
    236244{{{
    237245expat_lib_flags="-L$expat_prefix/lib -lexpat"
    238246}}}
    239     with:
     247with:
    240248{{{
    241249LIBS="$LIBS -L$expat_prefix/lib -lexpat"
    242250}}}
    243 
    244     In MSYS console, type:
     2515. In MSYS console, type:
    245252{{{
    246253cd /usr/local/src/gdal-1.5.2
     
    250257--with-pg=/osgeo4w/apps/pgsql/bin/pg_config.exe
    251258}}}     
    252     Open c:\msys\local\src\gdal-1.5.2\GNUmakefile
    253     After line 4 add:
     2596. Open c:\msys\local\src\gdal-1.5.2\GNUmakefile
     2607. After line 4 add:
    254261{{{
    255262    GDAL_ROOT=.
    256263}}}
    257     Finally build and install GDAL:
     2648. Finally build and install GDAL:
    258265{{{
    259266make -f GNUmakefile
     
    265272'''Untested'''
    266273
    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:
     2741. Download Tcl from [http://prdownloads.sourceforge.net/tcl/tcl8.5.2-src.tar.gz here]
     275
     2762. Download Tk from [http://prdownloads.sourceforge.net/tcl/tk8.5.2-src.tar.gz here]
     277
     2783. Unpack both to c:\osgeo4w\usr\src
     279
     2804. In the msys console type:
    271281{{{
    272282cd /osgeo4w/usr/src/tcl8.5.2/win
     
    286296=== Compiling and Installing GRASS (6.4.0) ===
    287297
    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:
     2981. Download the latest GRASS 6.4.0 source code from [http://grass.osgeo.org/grass64/source/snapshot/ here].
     299
     3002. Unpack to c:\osgeo4w\usr\src
     301
     3023. 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
     3044. Open package.sh and at line 12:
    292305Change:
    293306{{{
     
    300313--with-includes=/c/OSGeo4W/include \
    301314}}}
    302 
    303 To compile, type in MSYS console:
    304 
     3155. To compile, type in MSYS console:
    305316{{{
    306317export PATH="/osgeo4w/bin:/osgeo4w/apps/tcl-tk/bin:/osgeo4w/apps/sqlite/bin:/osgeo4w/apps/pgsql/lib:$PATH"