Packaging:Windows
From OpenLP
Contents |
Windows
On Windows we're using PyInstaller 1.5 to create a standalone application. The full list of software required is contained within the scripts/windows-builder.py file. Once you have everything installed and ready, you just need to run that file to produce a Windows installer. Here are some of the finer points necessary to get it up and running on the following versions of Windows.
Please note that currently we do not support building OpenLP for Windows with Python 2.7
Installing MySQL for Python
Go to Unofficial Windows Binaries for Python Extension Packages and download the MySQLdb package for your version of Python.
Setting up PyInstaller
Below are the steps needed to set up PyInstaller to be used by the build script.
Download PyInstaller
Download PyInstaller 1.5rc2 and extract it to a directory called "pyinstaller".
Configure PyInstaller
Go to PyInstaller's directory, and run the Configure.py file.
C:\pyinstaller> python Configure.py
Building PySQLite
In order to be able to import openlp.org 1.x databases, we need to compile SQLite 2.8 and the Python "sqlite" module for SQLite 2.8.
- Go to http://www.hwaci.com/sw/sqlite/download.html and download the sqlite_source.zip and sqlitedll.zip files. Remember that you need to download SQLite version 2.8!
- Current latest (at 20100722) source - http://www.hwaci.com/sw/sqlite/sqlite-source-2_8_17.zip
- Current latest (at 20100722) DLL - http://www.hwaci.com/sw/sqlite/sqlitedll-2_8_17.zip
- Unpack them all in the same directory.
- Create an import library for the Microsoft linker:
C:\> lib /def:sqlite.def - Go to http://code.google.com/p/pysqlite/downloads/list?can=1&q= and download PySQLite 1.0.1.
- Unpack the PySQLite sources.
- Open setup.py and search for "win32".
- Change the "include_dirs" and "library_dirs" variables to point the place where you've unpacked the SQLite files and where you created the import library.
- Build PySQLite:
C:\pysqlite> python setup.py build - Copy sqlite.dll into the same directory as _sqlite.pyd from PySQLite, and into C:\Python26\DLL.
- Install PySQLite:
C:\pysqlite>python setup.py install