Statistics
| Revision:

gvsig-raster / org.gvsig.raster.gdal / trunk / org.gvsig.raster.gdal / org.gvsig.raster.gdal.jni / readme.txt @ 2453

History | View | Annotate | Download (2.66 KB)

1
How to compile libjni-gdal
2
--------------------------
3

    
4
General Requirements
5
--------------------
6

    
7
Make sure you have a directory .m2 in your $HOME. In this directory there should be a file settings.xml. This step is only necessary if you have to deploy files.
8

    
9
<?xml version="1.0" encoding="UTF-8"?>
10

    
11
<settings xmlns="http://maven.apache.org/POM/4.0.0" 
12
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
13
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
14
                        http://maven.apache.org/xsd/settings-1.0.0.xsd">
15
    <servers>
16
        <server>
17
            <id>gvsig-repository</id>
18
            <username>[USERNAME]</username>
19
            <password>[PASSWORD]</password>
20
            <filePermissions>666</filePermissions>
21
	    <directoryPermissions>777</directoryPermissions>
22
        </server>
23
    </servers>
24
</settings>
25

    
26
Linux
27
-----
28

    
29
Installed programs
30

    
31
cmake (apt-get install cmake)
32
maven (minimum version 2.2.1. This version is available in build directory)
33
ant (apt-get install ant)
34

    
35
Open a system console and set variable JAVA_HOME with a right value.
36

    
37
ej: export JAVA_HOME=[Path_to_JDK]
38

    
39
Launch the command to compile:
40

    
41
mvn install -Dnative-arch=[ARCHITECTURE] -Dnative-distribution=[DISTRIBUTION] -Pjni-devel -Dmaven.test.skip -Dnative-classifier=[CLASSIFIER]
42

    
43
ARCHITECTURE = "X86_64", "i386", ...
44
DISTRIBUTION = "nt", "Ubuntu-9.10", "10.5", ...
45
CLASSIFIER = linux-Ubuntu-9.10-gcc4-X86_64-dynamic
46

    
47
Example:
48
mvn install -Dnative-arch="X86_64" -Dnative-distribution="Ubuntu-9.10" -Pjni-devel -Dmaven.test.skip -Dnative-classifier=linux-Ubuntu-9.10-gcc4-X86_64-dynamic
49

    
50
Windows
51
-------
52

    
53
Installed programs
54

    
55
Visual Studio 2005 (vs8)
56
cmake
57
maven (minimum version 2.2.1. This version is available in build directory)
58
ant
59

    
60
Make sure you have the right value in your JAVA_HOME variable
61

    
62
libjni-gdal needs a GDAL SDK to be compiled. This SDK is in the maven repository. The pom.xml contains
63
the version of GDAL. You should check the version.
64

    
65
<dependency>
66
  <groupId>org.gdal</groupId>
67
  <artifactId>gdal</artifactId>
68
  <version>1.7.1</version>
69
  <classifier>${native-classifier}</classifier>
70
  <type>tar.gz</type>
71
</dependency>
72

    
73
The binaries of this version will be downloaded from maven repository. 
74
https://devel.gvsig.org/m2repo/j2se
75

    
76
Launch the command to compile:
77

    
78
mvn install -Dnative-arch=[ARCHITECTURE] -Dnative-distribution=[DISTRIBUTION] -Pjni-devel -Dmaven.test.skip -Dnative-classifier=[CLASSIFIER]
79

    
80
ARCHITECTURE = "X86_64", "i386", ...
81
DISTRIBUTION = "nt", "Ubuntu-9.10", "10.5", ...
82
CLASSIFIER = win-nt-gcc4-vs8-i386-dynamic
83

    
84
Example:
85
mvn install -Dnative-arch="i386" -Dnative-distribution="win-nt" -Pjni-devel -Dmaven.test.skip -Dnative-classifier=win-nt-gcc4-vs8-i386-dynamic
86