Personal tools
gvSIG Desktop
gvSIG Desktop

Cached time 11/21/13 11:24:39 Clear cache and reload

 

Prerequisites

You have to install the application used to create gvSIG installers in your computer: InstallJammer.

Go to http://www.installjammer.com and download the last final available version. The last version tested in the project has been the 1.2.15, but it had a bug in the installation of links (needed for native libraries), so the last 1.2 hourly build with that bug solved has been used.

Once installed, get sure the installjammer application (the installjammer executable itself, not a link) is available in your execution PATH.

Install build preparation steps

  1. If necessary, update value of the package.info.state parameter in the paramers section of the pom.xml files of each plugin.

  2. Update your workspace projects and clean, compile and install everything (mvn clean + mvn install). All external projects (org.gvsig.maven.base, org.gvsig.tools, etc.) must have been deployed in their last version previosly.

  3. Launch gvSIG and perform a quick test.

  4. Install the JRE plugin from jre_6_windows_i586 from the addons nanager.

  5. Just in case you have created a previous build and you still have the generated add-on packages, remove everything into your build/product/install folder.

  6. The gvSIG launchers for windows are still not generated automatically, so you should regenerate them with the Launch4J tool. Open the xml files located in build/projects/gvsig-standard/gvsig-standard-installer/src/main/launch4j with the Launch4J utility, update version and build numbers and regenerate the .exe files.

  7. In case there have changes (new files in fwAndami, libCorePlugin or any other change in the online installer content) use the InstallJammer application to check that all the necessary files are included.

  8. Generate the gvSIG installer and all the plugins add-ons: launch the goal mvn-create-installer from the build.xml of the gvsig-standard project available into build/projects/gvsig-standard.

    Once the process is finished, you will have the following artifacts:

    • gvSIG installers in: build/projects/gvsig-standard/gvsig-standard-installer/target/installjammer/output
    • add-on packages in: build/product/install/pool

    If there is an error while the process is generating the installers (at the end of the process), take a look at the InstallJammer configuration maintenance section.

  9. From the command line, define the following environment variables:

    USER=[downloads.gvsig.org user]
    BUILD_NUMBER=2043
    
  10. Upload the installers to downloads.gvsig.org: copy the installers to /srv/download/gvsig-desktop/dists/2.0.0/builds/$BUILD_NUMBER/. Ex:

    ssh $USER@downloads.gvsig.org "cd /srv/download/gvsig-desktop/dists/2.0.0/builds; mkdir $BUILD_NUMBER"
    scp build/projects/gvsig-standard/gvsig-standard-installer/target/installjammer/output/* \
      $USER@downloads.gvsig.org:/srv/download/gvsig-desktop/dists/2.0.0/builds/$BUILD_NUMBER/
    
  11. Generate if needed the add-on packages of plugins not included into the gvsig-standard project group, like:

    • CRS
    • Raster
    • Geoprocessing
    • Thematic Maps
    • Etc...
  12. Upload the add-on packages to /srv/download/gvsig-desktop/pool. Ex:

    tar cvzfC upload.tar.gz build/product/install/ pool
    scp upload.tar.gz $USER@downloads.gvsig.org:/srv/download/gvsig-desktop
    ssh $USER@downloads.gvsig.org "cd /srv/download/gvsig-desktop; tar xvzf upload.tar.gz; rm upload.tar.gz"
    
  13. Create the distribution for the build. Replace STATE and BUILD_NUMBER by the values of the distribution.

    ssh $USER@downloads.gvsig.org "cd /srv/download/gvsig-desktop/dists/2.0.0; ../gvspkg mkdist --state STATE --build BUILD_NUMBER"
    
  14. Install and perform a quick test of the generated installers, downloading all add-ons and checking some basic functionalities (linux, windows, ...).

  15. If everything is OK, commit all changes in the buildNumber.properties files of each project. Else, solve any found problems and return to the first step.

  16. Create a tag of the files included into the install build, with the build number in the tag name. Take into account that some of the project will be located in other svn repositories. You will have to create a tag into each of them, appart from the one in the gvsig-desktop project repository [1].

    To create the tag, if you use the subclipse eclipse plugin, follow those steps (should be very similar if you use subversive instead):

    1. Select in your package explorer, project explorer or navigator, the projects to create the tag with.
    2. Click over them with the right button and select the option Team > Branch/Tag...
    3. In the Copy to URL: field put the URL to the tag to create. Ex: https://devel.gvsig.org/svn/gvsig-desktop/tags/v2_0_0_Build_2043. Check also the Create any intermediary folders that are missing and Preserve folder structure. The last one will put the projects into the tag with the same structure as the main branch (frameworks/_fwandami, libraries/libCompat, etc.).
    4. In the Create copy in the repository from: select the Working copy option. This way the tag will be created from the files you have into your workspace, so the tag won¡t contain any changes commited by other people while you where performing the build process.
    5. In the tag comment, put something about the build being created, like: gvSIG 2.0.0 build 2043.

    Sadly, the subversion server might sometimes cut the connection so the tag process may stop in the middle. In that case, you will have some of the projects already available in the tag.

    As the process follows the order of the projects in your package or project explorer, look in the svn log for the project where the error was produced, deselect the projects (already tagged) in your package/project explorer view listed before that project and start again with the previous steps.

  17. Refresh the plone download page cache:

  18. Create the notice ticket in the gvsig-desktop project tracker.

Note

TODO

  1. Perform a deploy of the projects included into the build, through the mvn-deploy-release (this is the same as the mvn-deploy one, but also generates and uploads the javadocs jar files) command in gvsig-standard.

  2. Only if there are changes in the API or other important changes generate or update the project's maven sites. As the command is still not available in the gvsig-standard ant configuration, you must call it from the command line: mvn site-deploy.

    One way would be to launch the mvn site-deploy goal into the gvsig-standard-project, but the maven site plugin knows about multimodule projects, and it would try to create a main site also for the gvsig-standard-project, which could take forever to finish.

    Another way to do it is to use some script to launch the mvn site-deploy goal for each project. You need to have mvn available into your execution path. As an example, into your workspace folder, launch the following command:

    for i in lib* org* _fwAndami app* ext*; do cd $i; mvn site-deploy; cd ..; done     
    
[1]That last sentence will change when those external projects generate add-on packages by itselfs.

JCRS

The JCRS related projects are not included anymore in the gvsig-standard build process.

As it has few changes and depends on native libraries, the packages for each platform will have to be created when there are changes in the CRS projects.

If you want to compile or create installers of the JCRS plugin, use the gvsig-jcrs group available into build/projects. With that group you will be able to work with all the CRS related projects at once: checking out, compiling, generating package installers, ....

The natives are selected depending on two things:

  • The values configured into the $HOME/.gvsig.platform.properties file. Look for available values in the Maven initial configuration document.
  • Your current platform, which activates a profile on each project with native dependencies selecting the required version of them, as may be different for each platform.

Taking this into account, how can you get all native dependencies for the supported platforms? There are two ways to do it:

  • Manually: change the $HOME/.gvsig.platform.properties once for each platform and compile each project with native dependencies deactivating your platform profile and activating the one desired:

    mvn -P linux-profile,\!windows-profile compile
    

    Take into account that if you launch the previous command in the console, the $HOME/.gvsig.platform.properties file is read on each login shell. Another way to change the platform properties for maven is to set them in the MAVEN_OPTS environment variable:

    export MAVEN_OPTS='-Xmx384M -XX:MaxPermSize=64m -Dnative-classifier=linux-all-gcc4-i386-dynamic'
    
  • Automatically: use the script build/projects/gvsig-jcrs/prepare-all-platforms.sh, which will perform all required steps in the JNI projects.

InstallJammer configuration maintenance

Launch installjammer

Once installed, you can open the InstallJammer GUI by running the installjammer executable. As the gvSIG installer configuration uses variables to point to the local paths, you must run installjammer like this:

installjammer -DBaseDir [PATH_TO_GVSIG] \
              -DBaseNativeLibsDir $HOME/.depman \
              -DLini386NativeLibsDir $HOME/.depman/lib \
              -DWini386NativeLibsDir $HOME/.depman/bin \
              -DInstallVersion 2.0.0.2025 \
              -DVersion 2.0.0 \
              --

Deleted or new files and folders

InstallJammer, by default, includes all the new files available in the folders to include in the installation, but fails if any of the previous available files is not available anymore.

That might be useful most of the times, so if you add a file you don't need to update the installjammer configuration. Also if you forgot to install a file or folder, it fails so you can correct it.

But there are times when you want that explicit change:

  • Delete a file or change it with another one with another name (ex: a new library version). If this is the case you must open the InstallJammer gui and remove the old file in the Groups and Files section.
  • There is a new file or folder you don't want to be included by default. For example, when a new plugin is added, as the gvSIG/extensiones is added to the installation with some plugins to be included, the new one would be included too. You must open the InstallJammer gui and uncheck the new file or folder in the Groups and Files section.

Plugins de gvSIG incluidos en el InstallJammer

En el instalable que se genera con el el InstallJammer se deberan incluir los siguientes plugins de gvSIG:

  • org.gvsig.coreplugin
  • org.gvsig.installer.app.extension

Modificación del lanzador de la aplicación para windows

Puede ser necesario modificar de alguna manera el lanzador de la aplicacion para windows gvsig-desktop.exe para lo cual se deben seguir los siguientes pasos:

  1. Descargar la aplicación launch4j de http://launch4j.sourceforge.net/
  2. Descomprimirlo y ejecutarlo.
  3. Abrir el archivo /build/projects/gvsig-standard/gvsig-standard-installer/src/main/launch4j/gvsig.xml
  4. En la pestaña Basic se deben cambiar las rutas absolutas que figuran en los campos Output file, Jar e Icon por las que correspondan con nuestro workspace. Concretamente:
    • Output file debe apuntar a nuestro_workspace/build/product/gvsig-desktop.exe
    • Jar debe apuntar al jar de andami en nuestro_workspace/build/product/lib/org.gvsig.andami-2.0-SNAPSHOT.jar
    • Icon debe apuntar a nuestro_workspace/build/product/gvSIG.ico
  5. En la pestaña Classpath se debe tener seleccionado el checkbox Custom classpath, en el campo Main class debe figurar org.gvsig.andami.Launcher y en el Classpath únicamente el jar de andami ./lib/org.gvsig.andami-2.0-SNAPSHOT.jar
  6. En la pestaña Header en Header type se debe seleccionar la opción GUI.
  7. En la pestaña Single instance no debemos seleccionar nada para que se puedan tener múltiples instancias de la aplicación ejecutándose al mismo tiempo.
  8. En la pestaña Version Info se pueden cambiar los campos File version, Free form, File description, Product version y, de nuevo, Free form pero esta vez de la sección Additional information, por lo que corresponda a la versión y número de build que vamos a generar.
  9. Hacer el resto de modificaciones que necesitemos.
  10. Salvar la configuración.
  11. Generar el ejecutable pulsando el icono con forma de engranaje Build wrapper.
  12. Si todo ha ido bien, este proceso habrá dejado el archivo gvsig-desktop.exe en la ruta que habíamos seleccionado en Output file.
  13. En algún momento de la instalación de la aplicación, se lanza también el instalador de complementos de gvSIG para lo cual generamos otro ejecutable gvsig-package-installer.exe. Para modificar dicho ejecutable podemos repetir estos mismos pasos teniendo en cuenta que:
    • el archivo de configuración que debemos abrir es /build/projects/gvsig-standard/gvsig-standard-installer/src/main/launch4j/gvsig_package_installer.xml y
    • que el Output file debe ser nuestro_workspace/build/product/gvsig-package-installer.exe

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: