I am proud to share with you the steps to compile gvSIG 2.0, which I discovered thanks to some fellows developers, whom I met thanks to the latests Jornadas GvSIG.
Although you can find a full guide on the official documentation, this simple steps will let you customize and compile your own gvSIG2.0 version without much trouble.
First, you have to install some basic dependencies:
#apt-get install maven2 subversion
Next, we create a folder in which we can work:
$mkdir gvSIG; cd gvSIG
Once we have the basic workspace, we download the source code:
$svn co https://joinup.ec.europa.eu/svn/gvsig-desktop/branches/v2_0_0_prep/build/
Before compiling anything, we prepare a basic configuration file:
$ cat > ~/.gvsig.platform.properties << EOF
native_platform=linux
native_distribution=all
native_compiler=gcc4
native_arch=i386
native_libraryType=dynamic
export native_classifier=${native_platform}-${native_distribution}-${native_compiler}-${native_arch}-${native_libraryType}
EOF
The next code can be written on the .bashrc file of your /home folder, but we can also execute it on the console we are working with.
$if [ -f "${HOME}/.gvsig.platform.properties" ]
then
. ${HOME}/.gvsig.platform.properties
export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m -Dnative-classifier=${native_classifier} -Dnative-platform=${native_platform}"
else
export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m"
fi
Once we have the environment ready, we do the first compilation with maven. Patience, it may take long.
$mvn install
Now that we have our first maven compilation, we proceed to use ant to end up setting up the environment. This command will access to the online repository of gvSIG to download the rest of the source code and will compile and generate gvSIG.
$ant svn.checkout.all
Once we have the environment ready, we proceed to prepare the flavor of gvSIG we are going to use. On his post we will use the standard version of gvSIG:
$cd projects/gvsig-standard
$ant svn.checkout.all
Patience, much more patience.
$mvn install
And it’s done. The application is on the products folder. To execute it, we execute the script gvSIG.sh.
If at the start we get the “command java not found” error, we have to specify the environment variable JAVA_HOME:
$export JAVA_HOME=/usr/lib/jvm...
Now you can use your own customized version.
Soon, I will post about how to create plugins.