diff --git a/win32/Win32 README.txt b/win32/Win32 README.txt new file mode 100644 index 000000000..971f9d87e --- /dev/null +++ b/win32/Win32 README.txt @@ -0,0 +1,79 @@ +Instructions for building the Win32 installer +--------------------------------------------- + +Dependencies: +- Python dependencies for building deluge, see + http://dev.deluge-torrent.org/wiki/Installing/Windows +- Bbfreeze +- StartX, get it here: http://www.naughter.com/startx.html +- NSIS, get it here: http://nsis.sourceforge.net/Main_Page + +The assumption in the following is that Python is installed in C:\Python25. +The GTK+ 2.12 runtime libraries are installed separately (anywhere, in the Windows PATH). +The instructions below also work with GTK+ 2.14 from a recent Pidgin version. + + +1) Build Deluge on Windows + + +2) Use a slightly hacked bbfreeze to create a standalone "executable" which does not need the the Python libs +The modification is to add these lines to + + C:\Python25\Lib\site-packages\bbfreeze-0.96.5-py2.5-win32.egg\bbfreeze\recipes.py + +right after the "prefixes" part of the Python function recipe_gtk_and_friends + + # Exclude DLL files in the GTK+ 2.12 or GTK+ 2.14 runtime bin dir + # The GTK+ runtime must be in the PATH or copied to the application dir, so + # so there is point in including these DLLs with the bbfreeze output + # + prefixes2 = ["iconv", "intl", "zlib1", "libpng12", "libatk", "libcairo", "libfont", "libfree", "libtiff", "libgio"] + + for p in prefixes2: + if x.identifier.startswith(p): + print "SKIPPING:", x + x.__class__ = ExcludedModule + retval = True + break + +The purpose is to avoid that bbfreeze copies DLLs from the GTK+ runtime bin directory. +Bbfreeze only copies a subset of the necessary DLLs (for some reason?). The cleanest +solution is to have the GTK+ runtime in a separate dir. + + +3) Edit the build_version variable in the Python script + + /branches/deluge-1.1.0_RC/win32/build-bbfreeze.py + +and run the script from the win32 directory + + python build-bbfreeze.py + +The script places the bbfreeze'd version of deluge in + + /branches/deluge-1.1.0_RC/build-win32/deluge-bbfreeze-build_version + +Note: the build-bbfreeze.py script assumes that Python 2.5 is installed in C:\Python25, +otherwise the python_path variable should be changed. + + +4) Edit the variable PROGRAM_VERSION in the NSIS script + + /branches/deluge-1.1.0_RC/win32/deluge-win32-installer.nsi + +and run the NSIS script. + +The result is a standalone installer. The only dependency for the installer is the GTK+ runtime, +which is downloaded by the Deluge installer if it isn't installed in the system. + +The GTK+ installer is downloaded from +http://download.deluge-torrent.org/windows/deps/gtk-2.12.9-win32-2.exe +and placed in the user temp directory (not deleted after installation). + +The post install script creates the deluge.cmd file using startX.exe with the correct path +and sets up the file association for .torrent. + + +5) The Uninstaller will remove everything from the installation directory. +Also the file association for .torrent will be removed but only if it's associated with Deluge + diff --git a/win32/deluge-bbfreeze.py b/win32/deluge-bbfreeze.py index aaf0d5b5e..b6a2df5cf 100644 --- a/win32/deluge-bbfreeze.py +++ b/win32/deluge-bbfreeze.py @@ -1,4 +1,4 @@ -build_version = "1.1.6" +build_version = "1.1.7" python_path = "C:\\Python25\\" import shutil diff --git a/win32/deluge-win32-installer.nsi b/win32/deluge-win32-installer.nsi index e39a56ac4..12f31a7a0 100644 --- a/win32/deluge-win32-installer.nsi +++ b/win32/deluge-win32-installer.nsi @@ -1,5 +1,5 @@ # Deluge Windows installer script -# Version 0.3.1, 18-Apr-2009 +# Version 0.4 28-Apr-2009 # Copyright (C) 2009 by # Jesper Lund @@ -25,16 +25,19 @@ # Boston, MA 02110-1301, USA. # +# Set default compressor +SetCompressor lzma + ### -### --- Some of these !define's need to be updated with new Deluge versions --- +### --- The PROGRAM_VERSION !define need to be updated with new Deluge versions --- ### # Script version; displayed when running the installer -!define DELUGE_INSTALLER_VERSION "0.3.1" +!define DELUGE_INSTALLER_VERSION "0.4" # Deluge program information !define PROGRAM_NAME "Deluge" -!define PROGRAM_VERSION "1.1.6" +!define PROGRAM_VERSION "1.1.7" !define PROGRAM_WEB_SITE "http://deluge-torrent.org" # Python files generated with bbfreeze (without DLLs from GTK+ runtime) @@ -188,12 +191,15 @@ Section -StartMenu_Desktop_Links CreateShortCut "$DESKTOP\Deluge.lnk" "$INSTDIR\deluge.cmd" "" "$INSTDIR\deluge.ico" SectionEnd -Section -Uninstaller_Registry +Section -Uninstaller WriteUninstaller "$INSTDIR\Deluge-uninst.exe" WriteRegStr ${PROGRAM_UNINST_ROOT_KEY} "${PROGRAM_UNINST_KEY}" "DisplayName" "$(^Name)" WriteRegStr ${PROGRAM_UNINST_ROOT_KEY} "${PROGRAM_UNINST_KEY}" "UninstallString" "$INSTDIR\Deluge-uninst.exe" WriteRegStr ${PROGRAM_UNINST_ROOT_KEY} "${PROGRAM_UNINST_KEY}" "DisplayIcon" "$INSTDIR\deluge.ico" - +SectionEnd + +# Create file association for .torrent +Section "Create .torrent file association for Deluge" Section2 # Set up file association for .torrent files DeleteRegKey HKCR ".torrent" WriteRegStr HKCR ".torrent" "" "Deluge" @@ -208,7 +214,7 @@ Section -Uninstaller_Registry SectionEnd # Install GTK+ 2.12 -Section "GTK+ 2.12 runtime" Section2 +Section "GTK+ 2.12 runtime" Section3 # Check whether GTK+ 2.12 is installed on the system; if so skip this section # The criterion is whether the registry key HKLM\SOFTWARE\GTK\2.0\Version exists ReadRegStr $0 HKLM "SOFTWARE\GTK\2.0" "Version" @@ -257,12 +263,14 @@ Section "GTK+ 2.12 runtime" Section2 SectionEnd LangString DESC_Section1 ${LANG_ENGLISH} "Install Deluge Bittorrent client." -LangString DESC_Section2 ${LANG_ENGLISH} "Download and install the GTK+ 2.12 runtime. \ +LangString DESC_Section2 ${LANG_ENGLISH} "Select this option unless you have another torrent client which you want to use for opening .torrent files." +LangString DESC_Section3 ${LANG_ENGLISH} "Download and install the GTK+ 2.12 runtime. \ This is skipped automatically if GTK+ is already installed." !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1) !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2) + !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section3) !insertmacro MUI_FUNCTION_DESCRIPTION_END