Changes between Version 4 and Version 5 of GdalOgrInJavaBuildInstructions


Ignore:
Timestamp:
Jan 30, 2011, 12:00:51 PM (13 years ago)
Author:
warmerdam
Comment:

further updates, not yet finished.

Legend:

Unmodified
Added
Removed
Modified
  • GdalOgrInJavaBuildInstructions

    v4 v5  
    1717
    1818
    19 == Apache Ant ==
     19== Install Apache Ant ==
    2020
    2121[http://ant.apache.org/bindownload.cgi]
    2222
    2323Binary distributions are available, so compiling isn't necessary.
    24 
    25 ''I don't think ANT is really needed, perhaps remove this step...''
    2624
    2725== Set up environment variables ==
     
    3331c. Do the same for PATH. Ensure that "''<java-dir>''\bin" and "''<ant-dir>''\bin" are included in PATH.
    3432
    35 == Compile GDAL ==
     33== Download and Configure GDAL ==
    3634
    3735[http://trac.osgeo.org/gdal/wiki/DownloadSource]
    3836
    39 Adjust the SWIG macro in <''gdal-dir''>\nmake.opt to point to C:\OSGeo4W\apps\swigwin\swig.exe if using the OSGeo4W provided version of swig.
    40 
    41 Otherwise build GDAL normally.
    42 
    43 == Configure Swig Bindings ==
    44 
    45 In ''<gdal-dir>''\swig\java, edit the java.opt file pointing it to your correct JDK location.   Also update the JAVA_INCLUDE to reference the win32 directory.
     37Follow normal steps to configure GDAL by modifying <''gdal-dir''>\nmake.opt.  In addition to normal steps ensure that the SWIG, JAVA and ANT related definitions are set appropriately.   Perhaps something like:
    4638
    4739{{{
     
    5244JAR=$(JAVA_HOME)/bin/jar
    5345JAVA_INCLUDE=-I$(JAVA_HOME)\include -I$(JAVA_HOME)\include\win32
     46
     47ANT_HOME=C:\apache-ant-1.8.2
     48
     49SWIG=C:\OSGeo4W\apps\swigwin\swig.exe
    5450}}}
    5551
    56 c. In ''<gdal-dir>''\swig, run "nmake -f makefile.vc java".
     52== Compile GDAL ==
     53
     54See BuildingOnWindows for details on configuring and building GDAL on windows.
     55
     56{{{
     57nmake /f makefile.vc
     58}}}
     59
     60== Build Java Bindings ==
     61
     62This step will run SWIG to generate the Java bindings, use nmake/cl.exe to build the C++ side of the Java bindings and ANT/javac to compile the java side of the bindings.
     63
     64{{
     65cd swig
     66nmake /f makefile.vc java
     67}}}
     68
     69== Install components ==
     70
     71
    5772
    5873d. Move the following files from ''<gdal-dir>''\swig\java to ''<gdal-dir>''\swig\java\apps: