Building GNU Solfege on win32
People that just want to use the program only need to download the installer from http://www.solfege.org. This page is written for developers, and tries to document how I create the windows installer so that it in the future can be possible for others to build it too.
The instructions on this page refers to the version of Solfege found in your bzr repository. This page was updated while preparing the 3.19.7 release, so we refer to that version. These instructions will probably fail if you use a very different version of Solfege.
Paths mentioned on this page are relative to the folder the solfege tarball is unpacked into, for example solfege-3.19.7. On my system the absolute path to this folder is /home/Username/solfege-3.19.7 from inside bash (in msys) and C:\msys\1.0\home\Username\solfege-3.19.7 in windows explorer.
MinGW
Download and run the Automated WinGW Installer (5.1.6). When asked, select the 'Current' package. Install at least these packages:
- MinGW base tools
- g++ compiler
Then install MSYS-1.0.11 and msysDTK-1.0.1
'''On XP''' you will be asked if you want to run a post-install script. Answer 'y' and then enter the path to where MinGW is installed. On my XP is was c:/mingw.
'''On Vista''' you now need to download a tar.gz file containing a new msys.dll file. Replace c:msys1.0binmsys.dll with new-msys.dll. ('''The file is missing on sourceforge now. Check if new MinGW still have this problem.''') I don't know if some versions of XP have this problem. You will know that this step was required if you after installing msysDTK (see below) cannot run MSYS.
Install gettext and libiconv from http://gnuwin32.sourceforge.net/. I installed the .exe installer packages and added /C/Programfiler/GnuWin32/bin to the msys path.
Vista workaround:
Download the install.exe.manifest and install-info.exe.manifest files from here and place them in c:\msys\1.0\bin and then from msys:
$ touch /bin/install.exe /bin/install-info.exe
Install gettext and libiconv from gnuwin32. I installed the installer packages and let it install in the default path c:\Programfiler\GnuWin32. I edited /etc/profile and added gnuwin32 to the path:
export PATH="/C/Programfiler/GnuWin32/bin:$PATH"
MSYS config
After installing MSYS, i edited c:\msys\1.0\etc\profile and added /c/Python26 to the PATH so that the configure script should find Python
Edit /etc/profile and add alias vim=/C/Programfiler/Vim/Vim72/vim.exe
Note: In the last test setup on virtualbox, I had to manually add /c/MinGW/Bin to the path by editing /etc/profile. I will check this when verifying this page.
About Python versions
I have tried different Python versions for building the installer, and have found 2.5 to be an ok compromise. At the moment we have to use 2.5 because the CSound installer we recommend require Python 2.5.
tmp Python tarball
I have created a tarball of a network install that I keep at ../my-python-2.5.tgz. I do this to speed up the installer build process, and to have more control what goes into the installer.
To create it, start the windows command prompt (not MSYS) and run the following while Python 2.5 is '''not''' installed:
msiexec /a python-2.5.4.msi
This makes a network install of python 2.5. cd into /C/Python26 and pack it into ../my-python-25.tgz by running tar --gzip --create --file=/home/Username/my-python-25.tgz . . Removed c:\python25
Requirements building the Windows installer
(Older versions of these programs might work, but this is what I use.)
Then the python/pygkt/installer tools:
- Python 2.5 from http://www.python.org/download/releases/2.5.4/
- Gtk+-win32-runtime 2.12.9-win32-2 from http://sourceforge.net/project/showfiles.php?group_id=98754
- "pycairo 1.4.12-1.win32 for Python 2.5" from http://ftp.gnome.org/pub/gnome/binaries/win32/pycairo/
- "pygobject 2.14.2-2.win32 for Python 2.5" from http://ftp.gnome.org/pub/gnome/binaries/win32/pygobject/
- "pygtk 2.12.1-3.win32 for Python 2.5" from http://ftp.gnome.org/pub/gnome/binaries/win32/pygtk/
- Inno setup 5.2.3 from http://www.jrsoftware.org/isinfo.php
Tmp GTK and pygtk folders
From solfege-3.19.7/, run sh winbuild.sh buildenv. This will create ../pygtk-stuff. The content of the folder will be copied into the installer. We only do this once.
Building it
Run msys to get a bash command prompt. Then from the source directory:
$ sh winbuild.sh setup $ sh winbuild.sh build
At this point, you can run the program from the folder it is unpacked into.
Making the installer
$ sh winbuild.sh install
And finally, double click on the file named ''windowsinstaller'' and select ''Run''. This will create the installer and install it. The installer file is saved in win32\Output.
