diff options
author | Andrew Resch <andrewresch@gmail.com> | 2010-09-18 16:03:21 -0700 |
---|---|---|
committer | Andrew Resch <andrewresch@gmail.com> | 2010-09-18 16:03:21 -0700 |
commit | 90e4de54e9f3485b0b2d7c79973c8c19a6144f18 (patch) | |
tree | 164b7f94f10acc145250802e951e12e189735b34 | |
parent | c1505bea3ac44226cf4112dd4a7564e5613a1e5f (diff) | |
download | deluge-90e4de54e9f3485b0b2d7c79973c8c19a6144f18.tar.gz deluge-90e4de54e9f3485b0b2d7c79973c8c19a6144f18.tar.bz2 deluge-90e4de54e9f3485b0b2d7c79973c8c19a6144f18.zip |
Do not include unnecessary dlls in windows builddeluge-1.3.0
-rw-r--r-- | win32/deluge-bbfreeze.py | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/win32/deluge-bbfreeze.py b/win32/deluge-bbfreeze.py index e46aaff76..fae33a16f 100644 --- a/win32/deluge-bbfreeze.py +++ b/win32/deluge-bbfreeze.py @@ -1,6 +1,7 @@ build_version = "1.3.0" python_path = "C:\\Python26\\" +import os, glob import shutil shutil.copy(python_path + "Scripts\deluge-script.py", python_path + "Scripts\deluge.py") shutil.copy(python_path + "Scripts\deluge-script.py", python_path + "Scripts\deluge-debug.py") @@ -10,9 +11,9 @@ shutil.copy(python_path + "Scripts\deluge-gtk-script.py", python_path + "Scripts shutil.copy(python_path + "Scripts\deluge-console-script.py", python_path + "Scripts\deluge-console.py") includes=("libtorrent", "gzip", "zipfile", "re", "socket", "struct", "cairo", "pangocairo", "atk", "pango", "wsgiref.handlers", "twisted.internet.utils", "gio", "gtk.glade") -excludes=("numpy", "OpenGL", "psyco") +excludes=("numpy", "OpenGL", "psyco", "win32ui") -dst = "..\\build-win32\\deluge-bbfreeze-" + build_version +dst = "..\\build-win32\\deluge-bbfreeze-" + build_version + "\\" from bbfreeze import Freezer f = Freezer(dst, includes=includes, excludes=excludes) @@ -25,11 +26,18 @@ f.addScript(python_path + "Scripts\deluge-gtk.py", gui_only=True) f.addScript(python_path + "Scripts\deluge-console.py", gui_only=False) f() # starts the freezing process - +# add icons to the exe files import icon -icon.CopyIcons(dst+"\\deluge.exe", "deluge.ico") -icon.CopyIcons(dst+"\\deluge-debug.exe", "deluge.ico") -icon.CopyIcons(dst+"\\deluged.exe", "deluge.ico") -icon.CopyIcons(dst+"\\deluge-web.exe", "deluge.ico") -icon.CopyIcons(dst+"\\deluge-gtk.exe", "deluge.ico") -icon.CopyIcons(dst+"\\deluge-console.exe", "deluge.ico") +icon.CopyIcons(dst+"deluge.exe", "deluge.ico") +icon.CopyIcons(dst+"deluge-debug.exe", "deluge.ico") +icon.CopyIcons(dst+"deluged.exe", "deluge.ico") +icon.CopyIcons(dst+"deluge-web.exe", "deluge.ico") +icon.CopyIcons(dst+"deluge-gtk.exe", "deluge.ico") +icon.CopyIcons(dst+"deluge-console.exe", "deluge.ico") + +# exclude files which are already included in GTK or Windows +excludeFiles = ("MSIMG32.dll", "MSVCR90.dll", "MSVCP90.dll", "POWRPROF.dll", "freetype*.dll", "iconv.dll", "intl.dll", "libatk*.dll", "libcairo*.dll", "libexpat*.dll", "libfontconfig*.dll", "libfreetype*.dll", "libgio*.dll", "libpng*.dll", "libtiff*.dll", "zlib1.dll") +for file in excludeFiles: + for filename in glob.glob(dst + file): + print "removing file:", filename + os.remove(filename) |