Conventional ".exe installer"
Building a new Gpg4win installer package is mostly automized. The build procedure can be executed on a GNU/Linux system or within a virtual maschine also on Windows and other systems.
What you need is:
- Build Gpg4win on GNU/Linux:
In principle, any current GNU/Linux system is sufficient as the base system. Some minor adaptions might be necessary though. The specific GNU/Linux guide is tested with a Debian GNU/Linux 'Etch' 4.0 system.
Furthermore, you need at least 503 MByte on your harddisk and a acceptable fast internet connection for downloading about 60 MBytes. -
Build Gpg4win on Windows:
In principle, any current Windows system is sufficient as the base system. Some minor adaptions might be necessary though. The specific Windows guide is tested with Windows XP SP2.
Furthermore, you need at least 1.5 GByte on your harddisk and a acceptable fast internet connection for downloading about 360 MBytes.
MSI Installer
Attention: The Gpg4win MSI Installer is only supported since Gpg4win 1.9.0beta.What you need is:
- A complete conventional installer as described above with the same version and the contents as you want for the MSI package.
- Perl 5 on the GNU/Linux System.
On Debian GNU/Linux 4.0 you can install Perl 5 this way:
# apt-get install perl - A Windows XP SP2 system, with the following tools installed.
- Windows Installer XML (WiX) toolset Version 3.0. This can be downloaded from http://wix.sourceforge.net/.
- WiX requires the .NET Framework. Successfully tested is .NET 2.0
- Finally, you need a method to access the file tree where your built your conventional installer from your Windows system These could done via a SMB network connection or simply by transferring the whole file tree to Windows (attention: it is a couple of 100 MBytes). See also the section below.
Now you need to execute the following steps:
- Change into the src/ directory of the Gpg4win source code where you built the
conventional installer before (compare
Build Gpg4win under GNU/Linux):
$ cd src - Execute make-msi.pl to create the required WiX source files:
$ make msi - No change into the same directory ("src") on the Windows system
and execute script "make-msi.bat" to create the MSI package:
> make-msi.bat gpg4win-Version.wix
or > make-msi.bat gpg4win-light-Version.wixwhere "Version" is the complete version number of the just created concentional installer, e.g. "1.9.0-svn595". You will find the resulting .wix files in the same directory.
This routine assumes that WiX is installed in a default location. In case it is not, you need to adapt the search path (PATH system variable).
- The MSI package is not ready and stored as file "gpg4win.msi".
You can install it in the following way:
> msiexec /i gpg4win.msi
and also de-install it:
> msiexec /x gpg4win.msi
How to access the Gpg4win build files from Windows
The WiX software requires access to the file tree where the conventional intaller was created. This is possible in many ways of which three opportunities are illustrated here. These are not step-by-step preocedures and thus need to be adapted for your individual environment.- Mounting a virtual ext3 build partition:
If you build Gpg4win as described on the der special guide for Windows in a virtual GNU/Linux system, then the required file tree is located inside a hard disk image named
build.img
. It can be accessed directly from Windows with the free tools ext2fsd and FileDisk.If ext2fsd and FileDisk are installed as described, you can mount the build partition after shutdown of the virtual GNU/Linux with this command:
filedisk /mount 0 C:\path\to\build.img H:
Of course 'C:\path\to\build.img' needs to be replaced with the actial path to the image file. Now the build partition is available as drive H: on your Windows system.
- Ubuntu with VirtualBox and Samba:
You can run Windows XP as a virtual maschine under VirtualBox laufen and access the file tree via SMB by running a Smaba server on the Linux host system. Der file tree is accessable as a so-called "Share" (e.g. via the right mouse button menu for the respective folder "gpg4win" in Nautilus). After this, the network share can be a made available in Windows:
> net use H: \\10.0.2.2\gpg4win
Where H: is the drive letter to use and gpg4win the name of the network share. - Using the archive tool "tar":
A list of all required files is stored in the file make-msi.files by the script make-msi.pl. This list can now be used to pack all required files for transport:
$ cd gpg4win
$ tar -T src/gpg4win-Version.files cjf gpg4win-msi.tar.bz2where "Version" should be the complete version numbe of the current installer, e.g. "1.9.0-svn595". You will find the respective .files files in directory "src".
Additional to gpg4win-msi.tar.bz you need src/gpg4win-Version.wix and src/make-msi.bat on your Windows system. You should store them in the respective src/ directory.