
*OLD-THREAD - SEE NEW* [Unofficial] Deluge 2.0.x installer
Re: Deluge 2.0 unofficial Windows installer available.
shinratdr, sorry, missed your message. Thanks for reporting back, and i'm glad to hear it worked for you
Btw, I did add debug exe's also to the stable deluge installers and portable archives, if wanting to use that instead.

Re: Deluge 2.0 unofficial Windows installer available.
OK, after alot of googling the error reported, then in one of the posts I read, one had two computers, and one had that error, and another didn't. Granted it was on linux, but it got me thinking anyway and I tested the scenario and solution, and i'm pretty sure it's the culprit.
The issue with the faulting computer in that post, were that there were a very old libfreetype.so file somewhere else additionally, which interfered with the process, since it was read in instead of, and before, the correct version.
I then checked what libfreetype.so was named on windows, and it is freetype.dll, though can also sometimes be named e.g. libfreetype-6.dll, and I don't have those files on a clean win10 install, but many program-installers add dll's to system32 folder in windows, and then don't remove them even after uninstalling the program.
I'm gonna work on seeing if I can find a solution where I specifically let the freetype.dll supplied in my installer to always be used first, no matter if there's old versions available elsewhere in PATH, if possible. I'm not sure, because even when e.g. adding the folder where the new one is, first in the search order to PATH manually, just for testing purposses, then still no go. Though there are some other library search operators in python also I believe.
In mean time(and as said, i'm not even sure I can fix it), then please workaround by e.g. rename freetype.dll in C:\windows\system32 to e.g. freetype-bak.dll, or delete it entirely if not having any specific usage for it anyway.
Note, this isn't just my installer, and also an issue in Cas's manual install instructions.
Edit: Okay found a fix, so rebuilding all 4 installers and 4 portable archives now. I'll edit again, when my building-script finishes.
Edit2: Done.
The issue with the faulting computer in that post, were that there were a very old libfreetype.so file somewhere else additionally, which interfered with the process, since it was read in instead of, and before, the correct version.
I then checked what libfreetype.so was named on windows, and it is freetype.dll, though can also sometimes be named e.g. libfreetype-6.dll, and I don't have those files on a clean win10 install, but many program-installers add dll's to system32 folder in windows, and then don't remove them even after uninstalling the program.
I'm gonna work on seeing if I can find a solution where I specifically let the freetype.dll supplied in my installer to always be used first, no matter if there's old versions available elsewhere in PATH, if possible. I'm not sure, because even when e.g. adding the folder where the new one is, first in the search order to PATH manually, just for testing purposses, then still no go. Though there are some other library search operators in python also I believe.
In mean time(and as said, i'm not even sure I can fix it), then please workaround by e.g. rename freetype.dll in C:\windows\system32 to e.g. freetype-bak.dll, or delete it entirely if not having any specific usage for it anyway.
Note, this isn't just my installer, and also an issue in Cas's manual install instructions.
Edit: Okay found a fix, so rebuilding all 4 installers and 4 portable archives now. I'll edit again, when my building-script finishes.
Edit2: Done.
Re: Deluge 2.0 unofficial Windows installer available.
Updated the git installers/portables to latest development i.e. deluge-2.0.4.dev23. Nothing important added, but just to keep on top of development. There was 3 commits submitted since last git release and included now, where one is unrelated to python version included, another about logging and last about console.
Re: Deluge 2.0 Windows 7z-sfx-installer available.
Did this go unnoticed? I was hoping it would be added to the installer.yziecg wrote:If you can't stand light themes, here's a Dark theme for this package, extract to C:\
https://anonfile.com/iaq9ccB4nf/Deluge2 ... -theme_zip
Oh, and I suppose the portable too... though, with you having to post two versions of every update, it would probably be more efficient to make a portable extractor part of the installer, it could source from the same files and whatnot.
Re: Deluge 2.0 unofficial Windows installer available.
Hmm, that's a good idea, and I will think about adding this functionality to the NSIS installer script, though not really a big issue for me as both types are built automatically by a batch file I made. It was initially mostly meant as alternative because a few reported issues with the installers, but now after changing to NSIS which is one of the most popular installer frameworks out there(because of very small overhead and really flexible), then this really shouldn't be an issue anymore, but regardless. Thanks for good suggestion though.
About your nice bundled theme package, then I'm not gonna add a 3'rd party theme to my installer, as some love dark themes, whereas others hate 'em etc and I wanna make this installer to be mimicking an official one, mostly at least. Thanks again for providing it though.
About your nice bundled theme package, then I'm not gonna add a 3'rd party theme to my installer, as some love dark themes, whereas others hate 'em etc and I wanna make this installer to be mimicking an official one, mostly at least. Thanks again for providing it though.
Re: Deluge 2.0 unofficial Windows installer available.
If you're switching to a NSIS installer, wouldn't it be as simple as making it a checkmark option within it to add it?
Oh, I guess now that you're not calling the directory Deluge2 you'll have to adjust the path, but other than that, my archive works out of the box.
Oh, I guess now that you're not calling the directory Deluge2 you'll have to adjust the path, but other than that, my archive works out of the box.
Re: Deluge 2.0 unofficial Windows installer available.
I have switched already to NSIS, which is a scripted installer system and adding a portabel section isn't hard, but does need alot of added scripting and conditionals throughout, and I'm just learning the ins and out of this scripting language since a few days ago
its not as easy as e.g inno-setup can be, but less overhead and more advanced.
I think for now I'll just continue with the extra zip portable archives, but I'll look into it possibly later, but currently thinking to mimick the official installers as close as possible. I use the original very big deluge NSIS installer script already, but just changed it to suit my needs and extend functionality and fix a bug etc. Here's the original, unchanged 258 lines NSIS install script:
Yeah, I patch the exes(and add some other stuff) to be portable already, so after installing, the dir is a portable directory which can be copied elsewhere and being able to run, and the installer just additionally optionally adds shortcuts and magnet/torrent associations, and sets uninstall info to the registry, and kills running processes and cleans install dir out if existing. The later two things I added just a few days ago.

I think for now I'll just continue with the extra zip portable archives, but I'll look into it possibly later, but currently thinking to mimick the official installers as close as possible. I use the original very big deluge NSIS installer script already, but just changed it to suit my needs and extend functionality and fix a bug etc. Here's the original, unchanged 258 lines NSIS install script:
Code: Select all
# Deluge Windows installer script
#
# Copyright (C) 2009 Jesper Lund <mail@jesperlund.com>
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2009 John Garland <johnnybg@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later.
# See LICENSE for more details.
#
# Script version; displayed when running the installer
!define DELUGE_INSTALLER_VERSION "1.0"
# Deluge program information
!define PROGRAM_NAME "Deluge"
# Detect version from file
!searchparse /file VERSION.tmp `build_version = "` PROGRAM_VERSION `"`
!ifndef PROGRAM_VERSION
!error "Program Version Undefined"
!endif
!define PROGRAM_WEB_SITE "http://deluge-torrent.org"
!define LICENSE_FILEPATH "..\..\LICENSE"
# Python files generated with bbfreeze
!define BUILD_DIR "build-win32"
!define BBFREEZE_DIR "${BUILD_DIR}\deluge-bbfreeze-${PROGRAM_VERSION}"
!define INSTALLER_FILENAME "deluge-${PROGRAM_VERSION}-win32-setup.exe"
# Set default compressor
SetCompressor /FINAL /SOLID lzma
SetCompressorDictSize 64
# --- Interface settings ---
# Modern User Interface 2
!include MUI2.nsh
# Installer
!define MUI_ICON "..\..\deluge\ui\data\pixmaps\deluge.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_RIGHT
!define MUI_HEADERIMAGE_BITMAP "installer-top.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP "installer-side.bmp"
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_ABORTWARNING
# Start Menu Folder Page Configuration
!define MUI_STARTMENUPAGE_DEFAULTFOLDER ${PROGRAM_NAME}
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCR"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Deluge"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
# Uninstaller
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_HEADERIMAGE_UNBITMAP "installer-top.bmp"
!define MUI_WELCOMEFINISHPAGE_UNBITMAP "installer-side.bmp"
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
!define MUI_FINISHPAGE_SHOWREADME ""
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Create Desktop Shortcut"
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION finishpageaction
# --- Start of Modern User Interface ---
Var StartMenuFolder
# Welcome, License & Components pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE ${LICENSE_FILEPATH}
!insertmacro MUI_PAGE_COMPONENTS
# Let the user select the installation directory
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
# Run installation
!insertmacro MUI_PAGE_INSTFILES
# Popup Message if VC Redist missing
Page Custom VCRedistMessage
# Display 'finished' page
!insertmacro MUI_PAGE_FINISH
# Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES
# Language files
!insertmacro MUI_LANGUAGE "English"
# --- Functions ---
# Check for running Deluge instance.
Function .onInit
System::Call 'kernel32::OpenMutex(i 0x100000, b 0, t "deluge") i .R0'
IntCmp $R0 0 notRunning
System::Call 'kernel32::CloseHandle(i $R0)'
MessageBox MB_OK|MB_ICONEXCLAMATION "Deluge is running. Please close it first" /SD IDOK
Abort
notRunning:
FunctionEnd
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK
FunctionEnd
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Do you want to completely remove $(^Name)?" /SD IDYES IDYES +2
Abort
FunctionEnd
Function finishpageaction
CreateShortCut "$DESKTOP\Deluge.lnk" "$INSTDIR\deluge.exe"
FunctionEnd
# Test if Visual Studio Redistributables 2008 SP1 installed and returns -1 if none installed
Function CheckVCRedist2008
Push $R0
ClearErrors
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}" "Version"
IfErrors 0 +2
StrCpy $R0 "-1"
Push $R1
ClearErrors
ReadRegDword $R1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9BE518E6-ECC6-35A9-88E4-87755C07200F}" "Version"
IfErrors 0 VSRedistInstalled
StrCpy $R1 "-1"
StrCmp $R0 "-1" +3 0
Exch $R0
Goto VSRedistInstalled
StrCmp $R1 "-1" +3 0
Exch $R1
Goto VSRedistInstalled
# else
Push "-1"
VSRedistInstalled:
FunctionEnd
Function VCRedistMessage
Call CheckVCRedist2008
Pop $R0
StrCmp $R0 "-1" 0 end
MessageBox MB_YESNO|MB_ICONEXCLAMATION "Deluge requires an MSVC package to run \
but the recommended package does not appear to be installed:$\r$\n$\r$\n\
Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)$\r$\n$\r$\n\
Would you like to download it now?" /SD IDNO IDYES clickyes
Goto end
clickyes:
ExecShell open "https://www.microsoft.com/en-us/download/details.aspx?id=26368"
end:
FunctionEnd
# --- Installation sections ---
!define PROGRAM_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}"
!define PROGRAM_UNINST_ROOT_KEY "HKLM"
!define PROGRAM_UNINST_FILENAME "$INSTDIR\deluge-uninst.exe"
BrandingText "${PROGRAM_NAME} Windows Installer v${DELUGE_INSTALLER_VERSION}"
Name "${PROGRAM_NAME} ${PROGRAM_VERSION}"
OutFile "${BUILD_DIR}\${INSTALLER_FILENAME}"
InstallDir "$PROGRAMFILES\Deluge"
ShowInstDetails show
ShowUnInstDetails show
# Install main application
Section "Deluge Bittorrent Client" Section1
SectionIn RO
!include "install_files.nsh"
SetOverwrite ifnewer
SetOutPath "$INSTDIR"
File ${LICENSE_FILEPATH}
WriteIniStr "$INSTDIR\homepage.url" "InternetShortcut" "URL" "${PROGRAM_WEB_SITE}"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Deluge.lnk" "$INSTDIR\deluge.exe"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Website.lnk" "$INSTDIR\homepage.url"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall Deluge.lnk" ${PROGRAM_UNINST_FILENAME}
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
# Create .torrent file association.
Section "Associate .torrent files with Deluge" Section2
DeleteRegKey HKCR ".torrent"
WriteRegStr HKCR ".torrent" "" "Deluge"
WriteRegStr HKCR ".torrent" "Content Type" "application/x-bittorrent"
DeleteRegKey HKCR "Deluge"
WriteRegStr HKCR "Deluge" "" "Deluge"
WriteRegStr HKCR "Deluge\Content Type" "" "application/x-bittorrent"
WriteRegStr HKCR "Deluge\DefaultIcon" "" "$INSTDIR\deluge.exe,0"
WriteRegStr HKCR "Deluge\shell" "" "open"
WriteRegStr HKCR "Deluge\shell\open\command" "" '"$INSTDIR\deluge.exe" "%1"'
SectionEnd
# Create magnet uri association.
Section "Associate Magnet URI links with Deluge" Section3
DeleteRegKey HKCR "Magnet"
WriteRegStr HKCR "Magnet" "" "URL:Magnet Protocol"
WriteRegStr HKCR "Magnet" "URL Protocol" ""
WriteRegStr HKCR "Magnet\shell\open\command" "" '"$INSTDIR\deluge.exe" "%1"'
SectionEnd
LangString DESC_Section1 ${LANG_ENGLISH} "Install Deluge Bittorrent client."
LangString DESC_Section2 ${LANG_ENGLISH} "Select this option to let Deluge handle the opening of .torrent files."
LangString DESC_Section3 ${LANG_ENGLISH} "Select this option to let Deluge handle Magnet URI links from the web-browser."
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
!insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
!insertmacro MUI_DESCRIPTION_TEXT ${Section3} $(DESC_Section3)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
# Create uninstaller.
Section -Uninstaller
WriteUninstaller ${PROGRAM_UNINST_FILENAME}
WriteRegStr ${PROGRAM_UNINST_ROOT_KEY} "${PROGRAM_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PROGRAM_UNINST_ROOT_KEY} "${PROGRAM_UNINST_KEY}" "UninstallString" ${PROGRAM_UNINST_FILENAME}
SectionEnd
# --- Uninstallation section ---
Section Uninstall
# Delete Deluge files.
Delete "$INSTDIR\LICENSE"
Delete "$INSTDIR\homepage.url"
Delete ${PROGRAM_UNINST_FILENAME}
!include "uninstall_files.nsh"
# Delete Start Menu items.
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
SetShellVarContext all
Delete "$SMPROGRAMS\$StartMenuFolder\Deluge.lnk"
Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall Deluge.lnk"
Delete "$SMPROGRAMS\$StartMenuFolder\Deluge Website.lnk"
RmDir "$SMPROGRAMS\$StartMenuFolder"
DeleteRegKey /ifempty HKCR "Software\Deluge"
Delete "$DESKTOP\Deluge.lnk"
# Delete registry keys.
DeleteRegKey ${PROGRAM_UNINST_ROOT_KEY} "${PROGRAM_UNINST_KEY}"
# Only delete the .torrent association if Deluge owns it
ReadRegStr $1 HKCR ".torrent" ""
StrCmp $1 "Deluge" 0 DELUGE_skip_delete
# Delete the key since it is owned by Deluge; afterwards there is no .torrent association
DeleteRegKey HKCR ".torrent"
DELUGE_skip_delete:
# This key is only used by Deluge, so we should always delete it
DeleteRegKey HKCR "Deluge"
SectionEnd
# Add version info to installer properties.
VIProductVersion "${DELUGE_INSTALLER_VERSION}.0.0"
VIAddVersionKey ProductName ${PROGRAM_NAME}
VIAddVersionKey Comments "Deluge Bittorrent Client"
VIAddVersionKey CompanyName "Deluge Team"
VIAddVersionKey LegalCopyright "Deluge Team"
VIAddVersionKey FileDescription "${PROGRAM_NAME} Application Installer"
VIAddVersionKey FileVersion "${DELUGE_INSTALLER_VERSION}.0.0"
VIAddVersionKey ProductVersion "${PROGRAM_VERSION}.0"
VIAddVersionKey OriginalFilename ${INSTALLER_FILENAME}
Yeah, I patch the exes(and add some other stuff) to be portable already, so after installing, the dir is a portable directory which can be copied elsewhere and being able to run, and the installer just additionally optionally adds shortcuts and magnet/torrent associations, and sets uninstall info to the registry, and kills running processes and cleans install dir out if existing. The later two things I added just a few days ago.
Last edited by mhertz on Sun Dec 08, 2019 1:02 pm, edited 1 time in total.
Re: Deluge 2.0 unofficial Windows installer available.
I updated with the new installers, everything works. But there's an issue with the size of the settings window. Also the white on grey text makes it hard to read.
Re: Deluge 2.0 unofficial Windows installer available.
The only change regarding looks, is that I disable GTK_CSD env-var for the deluge running session, but it was my impression that it only changed the titlebars to be native instead of always win7 styled, though I could be wrong however. Also, it was relatively long ago this change happened.
I remember seeing the behaviour you display also, but I often delete my profile folder to test, and it wen't away when during that, but of-course not optimal.
The fie controling this, is ui.conf in deluge profile folder, but if deleting that file to start fresh, then it resets other settings too, which has effect on UI, like disable thin-client etc. You can edit X and Y cordinates in that file, but it's easier to simply resize that window yourself, and I tested it gets remembered, as updated in prementioned file, and also survives reboots of windows.
About the colors making somethings hard to see, then as I said, I didn't think anythings changed there i.e. always been like that in deluge2 for windows, but if it's related to changing GTK_CSD, then you can change this by editing 'INSTALL-PATH\Lib\site-packages\path.pth', and change "0", to "1", at the very end of the line. If changing your mind, then of-course revert back again to "0".
Additionally you have two other choises: You can use the default theme, instead of the old win32 styled theme, by commenting out last line(adding # infront of last line) under 'INSTALL-PATH\gvsbuild\release\etc\gtk-3.0\settings.ini', like this:
Of-course removing that # symbol again, will revert back to normal.
Finally, you can try out the dark theme provided kindly by yziecg and reposted link too a few posts above. You probably cannot just extract it to C anymore, as the install location by default isn't in a folder named Deluge2 anymore, and so place accordingly to your install location.
I remember seeing the behaviour you display also, but I often delete my profile folder to test, and it wen't away when during that, but of-course not optimal.
The fie controling this, is ui.conf in deluge profile folder, but if deleting that file to start fresh, then it resets other settings too, which has effect on UI, like disable thin-client etc. You can edit X and Y cordinates in that file, but it's easier to simply resize that window yourself, and I tested it gets remembered, as updated in prementioned file, and also survives reboots of windows.
About the colors making somethings hard to see, then as I said, I didn't think anythings changed there i.e. always been like that in deluge2 for windows, but if it's related to changing GTK_CSD, then you can change this by editing 'INSTALL-PATH\Lib\site-packages\path.pth', and change "0", to "1", at the very end of the line. If changing your mind, then of-course revert back again to "0".
Additionally you have two other choises: You can use the default theme, instead of the old win32 styled theme, by commenting out last line(adding # infront of last line) under 'INSTALL-PATH\gvsbuild\release\etc\gtk-3.0\settings.ini', like this:
Code: Select all
#gtk-theme-name=win32
Finally, you can try out the dark theme provided kindly by yziecg and reposted link too a few posts above. You probably cannot just extract it to C anymore, as the install location by default isn't in a folder named Deluge2 anymore, and so place accordingly to your install location.
Re: Deluge 2.0 unofficial Windows installer available.
Just wanted to add that i'm thinking of rebuilding everything without GTK_CSD=0, because I just read some reports about it atleast on gtk 3.22 had a big performance decrease for some. We use gtk 3.24, so could have changed, but i'm not sure it's good to risk it regardless. Several stated there application became slower when converted from gtk2 to gtk3, but when setting that GTK_CSD=0, then it wen't much worse.
The reason i'm not already rebuilding, is that i'm thinking what to do instead. Without it, the titlebar looks like win7 even on win10, and some other small things change, but there's still the issue of some things being hard to see(also currently).
I'm thinking of changing to adwaita default GTK3 theme, as that doesn't have those hard to read parts I believe, and one of the quod libet devs stated that he always uses that theme without ever getting complaints from windows users, and he just adds a few tweaks for it, but no big changes. The titlebar though, and rest, doesn't look windows native at all, but doesn't either look bad imho. It's the same look as my deluge2 running on linux.
I'm gonna think and experiment some more, before making a decision, and if having peformance issues in meantime, then try my instructions posted previously for disabling GTK_CSD=0(well, so actually enabling it, with 1 instead of 0, which is default, but you get my drift i'm sure).
The reason i'm not already rebuilding, is that i'm thinking what to do instead. Without it, the titlebar looks like win7 even on win10, and some other small things change, but there's still the issue of some things being hard to see(also currently).
I'm thinking of changing to adwaita default GTK3 theme, as that doesn't have those hard to read parts I believe, and one of the quod libet devs stated that he always uses that theme without ever getting complaints from windows users, and he just adds a few tweaks for it, but no big changes. The titlebar though, and rest, doesn't look windows native at all, but doesn't either look bad imho. It's the same look as my deluge2 running on linux.
I'm gonna think and experiment some more, before making a decision, and if having peformance issues in meantime, then try my instructions posted previously for disabling GTK_CSD=0(well, so actually enabling it, with 1 instead of 0, which is default, but you get my drift i'm sure).