Windows Installer Build Instructions

From PsiWiki

This page describes how to build the Windows Installer for Psi.

Contents

Requirements

In order to generate the sources for the installer a Unix environment is needed. For building the installer, makensis compiler is required from http://nsis.sourceforge.net/ . The compiler is available for Windows, Linux and Mac OS X. To get everything working really fast, a Linux or a Mac OS is needed (with make, python).

On Mac OS X, there is a port of MakeNSIS compiler available in the MacPorts Project. To install:

port install nsis

On Linux (Ubuntu Hardy) there is the NSIS package available in Universe (http://packages.ubuntu.com/hardy/nsis). After enabling universe in /etc/apt/sources.list, all you need to install is:

apt-get install nsis

The compiler binary is named makensis.

Short version

Working on Linux or Mac OS X:

svn checkout http://svn.psi-im.org/win-installer
cd win-installer/trunk
make download_lang download_psi_nightly
chmod u+rwx tools/prep*
make

You will have the installer executable available in the build/ dir.

Download the installer sources

The installer sources are available via SVN from http://svn.psi-im.org/win-installer:

svn checkout http://svn.psi-im.org/win-installer

The latest version is available in trunk. We will refer to this directory as INSTALLER_HOME.

There is a Makefile available in INSTALLER_HOME to facilitate building of the installer on Unix environments.

Download Psi build and translations

The Psi build which should be bundled with the installer and the translations can be downloaded automatically or manually.

Psi build

The .zip archive of the Psi build which should be bundled with the installer should be downloaded and placed in the app/ directory in INSTALLER_HOME.

The Makefile provides a target for downloading the latest Windows nightly build:

make download_psi_nightly

Psi Language Translations

The .qm files with the compiled translations should be placed in app/psi_lang directory in INSTALLER_HOME.

The Makefile provides a target for downloading the latest translations for Psi:

make download_lang

Generate installer files

In order to build the installer, some files must be generated. These files describe the files that will be packed in the installer, such as the Psi resource files (icons, libraries etc.) and the Psi translation files.

All generated files, including the final installer executable, are placed in the build/ directory.

To generate the files, Psi and the translations must be available in the app/ directory. Use the following command to generate all files:

make languages files

Configuration

In INSTALLER_HOME you can find config.nsh. This file has several configuration options that can be changed to tweak the build for different versions of Psi.

Before building the installer, make sure you check this file to have everything set up the way you want it. On Unix environments, the INSTALLER_HOME variable is adjusted automatically on build.

Save the installer sources (optional)

You might not have MakeNSIS compiler available on your Linux/Mac OS X installation. You can also use the Windows version of the compiler but you need to move all the files to Windows first.

Just archive all the files in INSTALLER_HOME, except for the app/ directory which is only used on generation.

Build the installer

In a Windows environment, use UI to compile the installer. Before doing so, make sure you correct the INSTALLER_HOME variable in config.nsh. It should point to the directory where you extracted the archive built before.

On a Unix environment, you only need to do:

make build

You're done. The installer executable is now in the build directory. Congratulations.