Professional Documents
Culture Documents
Version 0.9
SECTION 1 - INTRODUCTION..................................................................................................................4
1.1 - Purpose of this document...............................................................................................................................................4
1.2 - TODO............................................................................................................................................................................4
SECTION 5 - DEPLOYMENT...................................................................................................................24
5.1 - General........................................................................................................................................................................24
5.2 - Building installers..........................................................................................................................................................27
This document describes various useful information of interest to developers who would be interested in
working on GanttProject source code.
1.2 - TODO
Debian package
> sh j2sdk-1_4_2_07-linux-i586.bin
> ls
j2sdk1.4.2_07/
j2sdk-1_4_2_07-linux-i586.bin
Before starting GanttProject, you have to update your PATH. This can be done by typing the following
lines in your shell:
Alternately, you can add these lines in your .bashrc file (or equivalent for other shells), so they are
executed automatically.
Now Java SDK is correctly installed. To check the java type the following :
>java -version
java version "1.4.2_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-
b05)
Java HotSpot(TM) Client VM (build 1.4.2_07-b05, mixed mode)
You don't NEED to use eclipse in order to work on the GanttProject code. But if you don't know eclipse,
you should give it a try, as it's what the GanttProject developers are using, and it's powerful and open
source software.
Prior to installing Eclipse, be sure you have a Java SDK installed.
It creates a directory in which the Eclipse binary is. To run Eclipse change to eclipse directory and type :
> ./eclipse
This section is for user which already have a working installation of eclipse.
All the snapshots are taken on Eclipse Version: 3.1M7
It is now possible to browse the CVS repository. The source is in the HEAD -> ganttproject. The
repository, in this case, is the distant repository on SourceForge, so it is not surprising that the browsing
is slow.
Of course, as you have used the « anonymous » user name, you may not commit your code to the CVS.
If you wish to be able to commit code, you have to contact the project leader and ask for inclusion of
your sourceforge login in the project developer's list. When the GanttProject admins have registered your
SourceForge login as a GanttProject developper, you may configure the above differently in order to have
write (« commit ») permissions:
– Use your SourceForge login and password instead of « anonymous »
– Use connexion type « extssh » instead of « pserver »
In the future, there will probably be more plugins, that should also appear here if you have correctly
checked them out.
To run project you should be in the Java Perspective. There are several ways to compile and run
GanttProject.
You may compile and run GanttProject as:
• A separate application with no Eclipse knowledge: at the moment the only thing you need to fully
compile GanttProject is to add library "eclipsito.jar" from lib/core. Having this done, you may
continue compiling and running GP in the usual way, by command line for example.
• A runtime workbench: you may run GanttProject as Eclipse's runtime workbench.
• Open Run dialog
N.B.: the profilers configurations that you can see on screenshots is not available by defaut in eclipse. It is
an eclipse plugin you don't need to run GanttProject. You may not have these configurations in your
eclipse version.
• On "Arguments" tab In the combobox "Run an application" select application
"net.sourceforge.ganttproject.GanttProject".
• Clear "Program arguments" field.
To commit changes you have to be able to access CVS in writing. With the anonymous access that is
describe above, you don't have writing access, so you cannot commit your changes. To get a writing
access, you have to contact one of GanttProject administrators whom be competent to allow you such an
access.
Once you have the writing access, you can commit your changes.
The files that have been modified have a '>' in front of their name.
As updating, you can commit, whole project, folders or single files. To commit:
• select the item you want to commit;
• right-click on it and select “Team” -> “Update”;
• enter a comment and validate.
5.1 - GENERAL
Since GanttProject is a plugin and has plugins, you should export GanttProject as a plugin when you want
to deploy it.
Select menu item “File” -> “Export”
In the “Export Options” you can choose “a single ZIP file”, “a directory structure” or “individual Jar
archives for Update site”. The two first would suit, this example shows the process with “a directory
structure”.
As soon as the export is finished, a directory named “plugins” is created with the plug-ins (ganttproject
core plus the other plug-ins you have chosen to export).
Now you can test with eclipsito library if GanttProject will run correctly:
copy the eclipsito.jar file at the same level as “plugins” folder you have just created by exporting
GanttProject;
copy the ganttproject-eclipsito-config.xml file too;
Now you can run GanttProject using the command:
5.2.1 - Windows
Principle
The Windows installer for GanttProject is built with a free software: NSIS. You can find any information
about NSIS at http://nsis.sourceforge.net/ and also download its latest release.
The principle is to write a NSIS script file that, once compiled, will produce a windows installer.
You can find a script file named ganttproject.nsi to build a Windows installer for GanttProject in the
installer folder at the CVS Head of GanttProject.
Select all plug-ins, choose deploy as a directory structure and specify the right destination
After compilation, a exe file will be created, it is the Windows installer for GanttProject!
To get further information about NSIS and NSIS script file format, read the NSIS manual and visit the
NSIS Web site (http://nsis.sourceforge.net/).
This way of creating the GanttProject Windows installer will certainly evolute in the future. So keep the
developers' guide up to date...
Beware: this executes all scripts from the spec file without registering the package in the rpm database.
Check that ganttproject can be launched by a normal user.
# rm -rf /usr/share/ganttproject/
# rm /usr/bin/ganttproject
Now ganttproject can't be launched by a normal user.
5.2.4 - MacOS
Principle
The MacOS software package is an archive containing all the files that the software needs and a
properties file describing how the software has to be run.
Once the package is suitably configured, a double-click on the file will launch the software.
Package architecture
The file contents could be viewed by right-clicking the file and selecting the “Display package content”
option.
The package is organized as follow :
• GanttProject.app
• Contents
• MacOS
• JavaApplicationStub :Java application launcher
• Resources
• Java : folder containing all the needed file to run the software.
• GanttProject.icns : package icon
• Info.plist : package properties list
• PkgInfo : package ID
Package working
The package launch the Java application through the JavaApplicationStub executable. This program is
able to launch a Java program from the package using the options supplied in the properties file Info.plist
It is thus enough to suitably configure the Info.plist file and to include all the needed files for the running
of the software in the Resources/Java folder.
• In /root :
• CFBundleAllowMixedLocalizations Use of several locales
• CFBundleDevelopmentRegion Package language
• CFBundleExecutable File to run being in the MacOS folder
• In /root/Java :
• Arguments Command line arguments being in the args of the application main method
• JVMVersion Needed JVM version
• MainClass Name of the class containing the main method
• VMOptions JVM options
• In /root/Java/ClassPath :
• 0 Path to add at the first position in the classpath
• 1 Path to add at the second position in the classpath
• n Path to add at the nth position in the classpath
• In /root/Java/Properties :
• apple.laf.useScreenMenuBar Property to pass to Java for displaying the menu bar top of the
screen
Resources
The files that are needed to run the software are the Contents/Resources/Java folder into the package.
DMG
Once you have made the app package, you may want to create a dmg file.
Use the disk tools to create a new image which size should be just a little bigger than the app package.
Once the image created, mount the drive and copy the app package into it.
Unmount the drive.
You should have a dmg file in your documents folder by default (if you don't have specified another target
when you have created the image).
- END OF DOCUMENT