Creating a Windows installer ============================ Prerequisites ------------- 1. Download and install Python 2.3 or Python 2.4 (for testing) http://www.python.org 2. Download and install Python libxml2 bindings (for testing) http://users.skynet.be/sbi/libxml-python/ 1. Download SchoolTool and SchoolBell release tarballs http://www.schooltool.org/releases 2. Download Zope3 compiled extensions http://www.zope.org/Members/tim_one 3. Download ReportLab Windows package http://www.reportlab.org/downloads.html 4. Download and install NSIS http://nsis.sourceforge.net 5. If you need to extract tarballs on Windows, 7-Zip works well: http://www.7-zip.org Preparation ----------- This part can be done in Linux, and in fact, it's slightly easier there because of availability of tar, gzip and tr. You should use prepare-zips.sh (to be run under Linux) to perform these steps. 1. Extract release tarball in a temporary directory. 3. Extract reportlab archive in the temporary directory so that the directory "reportlab" ends up in the top-level folder. 4. Edit school*.conf.in, replace path to msttcorefonts with C:\Windows\Fonts 5. Convert line endings of plain text files from LF to CR/LF. 6. Extract Zope 3 .pyd files for the appropriate Python version into Zope3/. 7. Create .zip file. 8. Overwrite Zope 3 .pyds with ones for a different Python version. 9. Create .zip file. Creating the installer ---------------------- 1. Extract a .zip archive created by prepare-zips.sh. 2. Copy 'wininst.nsi' to the directory where the file was extracted. 3a. If preparing a SchoolBell installer: "C:\Program Files\NSIS\makensisw.exe" /DPRODUCT_NAME=SchoolBell /DPRODUCT_ID=schoolbell /DPRODUCT_VERSION=1.2rc3 wininst.nsi 3b. If preparing a SchoolTool installer: "C:\Program Files\NSIS\makensisw.exe" /DPRODUCT_NAME=SchoolTool /DPRODUCT_ID=schooltool /DPRODUCT_VERSION=0.11rc3 wininst.nsi 4. Run the installer (use 'Test Installer' button in MakeNSISW). 4a. Verify that the newly installed server starts. 4b. Run all tests from the start menu. 4c. Visually inspect the installation directory to make sure that no important files are missing. 5. Run uninstaller. 5a. Ensure that all static files from the installation directory have been removed (Data.fs and logfiles should remain). 6. Repeat process for zip file for another python version. TODO ---- - implement check if Python is installed - implement check if libxml2 is installed - autodetect Python version, install appropriate Zope 3 binaries - automate the whole process of creating an installer - if you run the self checks through the start menu, the test runner window is closed automatically after the tests finish, so the final results are visible for just a split-second.