mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-14 13:34:21 +00:00
Improve the bbfreeze script a bit (and hopefully not break it)
This commit is contained in:
parent
f5d8cce4a2
commit
1daaad422b
@ -1,23 +1,18 @@
|
|||||||
import os, glob, sys
|
import os, glob, sys
|
||||||
import shutil
|
import shutil
|
||||||
|
import gtk
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
|
||||||
# Get build_version from installed deluge
|
# Get build_version from installed deluge
|
||||||
build_version = deluge.common.get_version()
|
build_version = deluge.common.get_version()
|
||||||
print "Deluge Version: %s" % build_version
|
print "Deluge Version: %s" % build_version
|
||||||
python_path = os.path.dirname(sys.executable) + "\\"
|
python_path = os.path.dirname(sys.executable)
|
||||||
print "Python Path: %s" % python_path
|
if python_path.endswith("Scripts"):
|
||||||
gtk_root = python_path + "Lib\\site-packages\\gtk-2.0\\runtime\\"
|
python_path = python_path[:-8]
|
||||||
|
python_path += os.path.sep
|
||||||
|
|
||||||
# Copy entry scripts with new name, which represents final .exe filename
|
print "Python Path: %s" % python_path
|
||||||
shutil.copy(python_path + "Scripts\deluge-script.pyw", python_path + "Scripts\deluge.py")
|
gtk_root = os.path.join(gtk.__path__[0], "..\\runtime\\")
|
||||||
shutil.copy(python_path + "Scripts\deluge-script.pyw", python_path + "Scripts\deluge-debug.py")
|
|
||||||
shutil.copy(python_path + "Scripts\deluged-script.py", python_path + "Scripts\deluged.py")
|
|
||||||
shutil.copy(python_path + "Scripts\deluged-script.py", python_path + "Scripts\deluged-debug.py")
|
|
||||||
shutil.copy(python_path + "Scripts\deluge-web-script.py", python_path + "Scripts\deluge-web.py")
|
|
||||||
shutil.copy(python_path + "Scripts\deluge-web-script.py", python_path + "Scripts\deluge-web-debug.py")
|
|
||||||
shutil.copy(python_path + "Scripts\deluge-gtk-script.pyw", python_path + "Scripts\deluge-gtk.py")
|
|
||||||
shutil.copy(python_path + "Scripts\deluge-console-script.py", python_path + "Scripts\deluge-console.py")
|
|
||||||
|
|
||||||
# Include python modules not picked up automatically by bbfreeze
|
# Include python modules not picked up automatically by bbfreeze
|
||||||
includes=(
|
includes=(
|
||||||
@ -38,14 +33,14 @@ bbfreeze.recipes.recipe_gtk_and_friends = recipe_gtk_override
|
|||||||
from bbfreeze import Freezer
|
from bbfreeze import Freezer
|
||||||
f = Freezer(dst, includes=includes, excludes=excludes)
|
f = Freezer(dst, includes=includes, excludes=excludes)
|
||||||
f.include_py = False
|
f.include_py = False
|
||||||
f.addScript(python_path + "Scripts\deluge.py", gui_only=True)
|
f.addEntryPoint('deluge', 'deluge.main:start_ui').gui_only = True
|
||||||
f.addScript(python_path + "Scripts\deluge-debug.py", gui_only=False)
|
f.addEntryPoint('deluge-debug', 'deluge.main:start_ui')
|
||||||
f.addScript(python_path + "Scripts\deluged.py", gui_only=True)
|
f.addEntryPoint("deluged", "deluge.main:start_daemon").gui_only = True
|
||||||
f.addScript(python_path + "Scripts\deluged-debug.py", gui_only=False)
|
f.addEntryPoint("deluged-debug", "deluge.main:start_daemon")
|
||||||
f.addScript(python_path + "Scripts\deluge-web.py", gui_only=True)
|
f.addEntryPoint("deluge-web", "deluge.ui.web:start").gui_only = True
|
||||||
f.addScript(python_path + "Scripts\deluge-web-debug.py", gui_only=False)
|
f.addEntryPoint("deluge-web-debug", "deluge.ui.web:start")
|
||||||
f.addScript(python_path + "Scripts\deluge-gtk.py", gui_only=True)
|
f.addEntryPoint("deluge-gtk", "deluge.ui.gtk:start").gui_only = True
|
||||||
f.addScript(python_path + "Scripts\deluge-console.py", gui_only=False)
|
f.addEntryPoint("deluge-console", "deluge.ui.console:start")
|
||||||
f() # starts the freezing process
|
f() # starts the freezing process
|
||||||
|
|
||||||
# add icons to the exe files
|
# add icons to the exe files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user