Create Windows installer

This page explains how an installer for Windows system could be created. It will contain all the required dependencies. The archive is enough to create a portable version. The real installer unpacks everything in a directory and also creates some shortcuts.


| Top |

You need to have a system where GCstar could run outside of the folder created by the installer created here.

You can follow instructions here to install ActiveState Perl (5.8.8 Build 822 has been used for 1st creation, other versions have not been tested yet) and Gtk+. Then you have to also install the Perl modules as explained on the same page using ppm.

Another way is to follow the instructions on this page:

You will be able to create your own PPMs and then have a more recent version of Gtk2-Perl.

There is a few Perl modules that will be required for other operations. You can install them using Perl Package Manager included with ActiveState Perl. Here they are:

  • PAR
  • PAR::Dist
  • Module::ScanDeps
  • Getopt::ArgvFile
  • Getopt::Long
  • Win32::Exe
  • FindBin
  • Unicode::Normalize

You also need to install all the Perl modules GCstar needs. Follow the instructions to install missing modules. Even the optional ones should be installed. Juste note that some of them don’t exist for Windows systems and should be ignored. Most of the time, an alternative exists and is used by GCstar.

You can’t (and don’t have to) install:

  • DataTime::Format::Strptime
  • Gtk2::Spell
  • Gnome2::VFS

Creating stand-alone exe

| Top |

The .exe is generated using PAR Packer. Some versions contain bugs. If you are using ActiveState 5.8.8 Build 822, you need to manually install it as explained in this email

If it complains about missing modules, install them with ppm as for GCstar’s dependencies.

You also need to patch a file in the Perl modules you installed. As for Par::Packer, it may have been fixed in other versions. Use this patch.

Extract the GCstar sources in a folder. Then using a command prompt, go into the bin folder.

The command to launch is this one:

C:\Perl\bin\pp -o gcstar.exe -B -M Glib::Object::Subclass  -M locale -M Digest::MD5 -M MIME::Base64 -M LWP -M LWP::Simple -M LWP::UserAgent -M Net::SMTP -M URI::Escape   -M HTTP::Cookies::Netscape -M HTML::Entities -M Gtk2::SimpleList -M Text::Wrap -M XML::Simple -M MP3::Info -M Archive::Tar -M Archive::Zip -M Compress::Zlib -M Time::Piece -M Ogg::Vorbis::Header::PurePerl -a "..\lib\gcstar;lib" -a "..\share\gcstar;share" --link=C:\Perl\site\lib\auto\Cairo\Cairo.dll  --link=C:\Perl\site\lib\auto\Glib\Glib.dll --link=C:\Perl\site\lib\auto\Gtk2\Gtk2.dll -vvv -g --icon=..\share\gcstar\icons\GCstar.ico  --info=”ProductName=GCstar;ProductVersion=1.7.1;FileVersion=1.7.1;FileDescription=GCstar, Personal Collections Manager;Comments=;LegalCopyright=GNU GPL”  gcstar

It uses the default path for Perl‘s installation. You may have to replace all the occurences of C:\Perl with the path where you installed it.

If everything was fine, you should have a gcstar.exe file in the same folder. To test it, you need to follow next step.

Prepare all required files

| Top |

You need to create a usr folder where you extracted the GCstar’s sources. In this folder, you need to copy what Gtk2 installed on your disk.

Actually, not all of the files are required. As an example, here is the list of files added to the ones for 1.3.2 archive that was created:

List of files in usr

Maybe some of them are not really required. You should take care of the lib\locale folder. If new languages are supported by GCstar, they should be added here.

Then you can create a gcstar.bat file in bin folder with this content:

@echo off
cd %0..
set PATH=..\usr\bin;%PATH%

If you launch this .bat, GCstar should start.

If you have some problems, you should remove the -g option from the pp.exe command above. It will open a console when you launch the gcstar.exe where some error messages could be displayed.

From this point, you already can create an archive with the content of the folder where you did all the operations. It can be extracted on any machine and should work.

Generate installation program

| Top |

This is done using NSIS.

NSIS script to come...

en/windows_installer.txt · Last modified: 08/05/2008 11:33 by

Should you have a problem using GCstar, you can open a bug report or request some support on GCstar forums.