|
This page is intended for those who want to build Windows installer packages. This is the task of software deployment. For those of you who just want to use Tryton, simply follow the instructions for installing Tryton on Windows. (NB: Unfortunately there is no installer package provides for the server. Thus for installing the server you may want to follow the instructions here.) Different Ways to Build the InstallerFor the impatientYou may somehow safely follow the instructions below. This will get you - a system wide installation of Python 2.5.x
- all requires Python modules installed into this Python installation
- a system wide installation of GTK runtime with some dlls added there
- a system wide installation of NSIS (Nullsoft Scriptable Install System)
- a directory containing the latest stable release of the Tryton client
- a directory containing the latest stable release of the Tryton server including all respective released modules
- a self-contained installer package for the Tryton client including all required GTK files (but no GTK runtime installer)
- a self-contained installer package for the Tryton server, including all modules
If you are unsatisfied with this, you must not be impatient ;-) Your choicesYou have the following choices on how you set up your packaging environment (some of these are not really documented here): - Python: installation to use or place where to install Python
- GTK: use existing runtime installation or a special development installation; include only required files or include the runtime installer
- Run Tryton client/server directly from installed development file (this is: not building an installer, useful mostly for developers); different variants of collecting file (py2exe); building a nsis installer file or not
This is somehow a step-by-step process. We will try do describe here what helps you finding your way ;-) If you are unsure: Just be impatient. Why we choose the GTK+ for Windows Runtime EnvironmentThere are several GTK packages floating around, each of them having some disadvantages: - The "official" GTK+ bundle is quite big (approx. 23 MB), contains a lot of development files which are unused for Python development and is missing some DLLs (as compared to the runtime)
- The installer provided by the Glade/Gtk+ for Windows project is outdated and incomplete.
- The installer provided by the gtk-win project is much more up to date, while missing librsvg and libbz2.
After several tests (including e.g. files from the MinGW project), Hartmut decided to use the GTK+ for Windows Runtime Environment and but other required DLLs into this installation. Downloading and Installing all PrerequisitesWe are providing a helper-script to ease collecting all the required stuff for Windows. Thanks to Hartmut Goebel of Goebel Consult's fame for providing the scripts. - Download and install Python 2.5 from http://www.python.org/download/
- Download and run tryton-install-helper.py.
Usage: tryton-install-helper.py [options] [download_directory]
Options:
-h, --help show this help message and exit
-v, --verbose
-i, --install All files will be downloaded to the download_directory (which defaults to the current dir.) So sou can copy them to another computer if required.
NB: You need to pass the option '--install' to actually get the files installed.
If you have are unsure how to run the script, try this (assuming you save the script to your Desktop):
- Open a command shell and enter the following commands:
cd %HOMEDRIVE%%HOMEPATH%\Desktop
%HOMEDRIVE%
C:\Python25\Python tryton-install-helper.py --help
You will be presented some installer dialogs. If unsure what to fill out, simply keep
the defaults.
- Close the command shell! (%PATH% has been updated during installation, but this shell does not know)
- Both the Tryton client and the Tryton server can be found the current directory.
Creating a Windows Installer for the Tryton Client- Download and install all prerequisites as described above.
- Create an executable from tryton sources
- Change to the tryton source directory, you created with mercurial. (You did this by calling ’hg clone ...’)
C:\TEMP\tryton\> python setup.py py2exe This will create a one-click installer of the Tryton client within the current Tryton source directory.
Creating a Windows Installer for the Tryton Server- Download and install all prerequisites as described above.
- Create an executable from tryton sources
- Change to the tryton source directory, you created with mercurial. (You did this by calling ’hg clone ...’)
C:\TEMP\tryton\> python setup.py py2exe This will create a one-click installer of the Tryton server within the current Tryton source directory.
Troubleshooting- Make sure Python version 2.5 is part of your environment variable PATH. You can check for validity by:
C:\>python -V ... which then should reply something like ”Python 2.5.2”
- Make sure GTK runtime directories \bin and \lib are part of your environment variable PATH.
- Change to the source directory you created in step 1 and run:
C:\TEMP\tryton\> python setup.py build
C:\TEMP\tryton\> python setup.py install - You can verify the success of your setup by changing to your python2.5\Scripts directory and running tryton.
C:\> cd %PYTHON HOME%\Scripts
C:\%PYTHON HOME%\> python tryton
If Tryton opens up and displays all toolbar buttons, you can move on to creating a ”one click installer” for windows. - You can verify the success of your setup by changing to your
python2.5\Scripts directory and running trytond.
C:\> cd %PYTHON HOME%\Scripts
C:\%PYTHON HOME%\> python trytond -c trytond.conf Note: a sample ”trytond.conf” file can be found in the trytond/etc directory of the source clone.
Possible issues of a Tryton client on Windows are: - tryton does not start. A messagebox tells me, a dll can’t be found. Check if GTK runtime \bin and \lib paths can be found in your environment variable PATH. If not, simply add them to PATH, else-wise move them to the first place within PATH.
- Tryton starts but the toolbar images are not shown. Possibly there is another installation making use of GTK runtime libraries among the programs/directories in your PATH. To remove their disturbing effects try the following:
- Move the GTK runtime directories to first place within your PATH environment variable.
- If the above did not help, start tryton using a *.bat file which cleans and manually sets up the environment needed for Tryton.
|