本文整理汇总了Python中bbfreeze.Freezer.use_compression方法的典型用法代码示例。如果您正苦于以下问题:Python Freezer.use_compression方法的具体用法?Python Freezer.use_compression怎么用?Python Freezer.use_compression使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bbfreeze.Freezer
的用法示例。
在下文中一共展示了Freezer.use_compression方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from bbfreeze import Freezer [as 别名]
# 或者: from bbfreeze.Freezer import use_compression [as 别名]
def main():
#includes = ['requests', 'email.utils']
includes = ['requests', 'email.utils']
excludes = ['_gtkagg', '_tkagg', 'bsddb', 'curses', 'email', 'pywin.debugger',
'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl', 'tk'
'Tkconstants', 'Tkinter',]
frz = Freezer(destDir, includes=includes, excludes=excludes)
#frz.addScript("meteor.py", gui_only=True)
frz.addScript("play_development.py")
frz.addScript("play_fullscreen.py", gui_only=True)
frz.addScript("play_windowed.py", gui_only=True)
#frz.addScript("gameassets.py")
#frz.addScript("geoip.py")
#frz.addScript("shipsprite.py")
#frz.addScript("sprites.py")
#frz.addScript("timevars.py")
#frz.addScript("vector.py")
frz.use_compression = 0
frz.include_py = True
frz()
addFile('config.json')
addFile('avbin.dll')
#addDir('images')
#addDir('fonts')
#addDir('sounds')
addDir('themes')
示例2: Freezer
# 需要导入模块: from bbfreeze import Freezer [as 别名]
# 或者: from bbfreeze.Freezer import use_compression [as 别名]
from bbfreeze import Freezer #@UnresolvedImport
folder_name ="SysInterceptor"
f = Freezer(folder_name, includes=())
f.addScript("..\\interceptor_tray.py", gui_only=True)
f.use_compression = 0
f.include_py = True
f() # starts the freezing proces
import os;
os.system("copy ..\\CARRIER.ICO .\\SysInterceptor")
os.system("copy .\\SysInterceptor\\*.* ..\\..\\..\\..\\output\\final_release")
os.system("xcopy /E/Y ..\\calculator\\*.* ..\\..\\..\\..\\output\\final_release\\calculator\\")
示例3: find_n_fix_missing
# 需要导入模块: from bbfreeze import Freezer [as 别名]
# 或者: from bbfreeze.Freezer import use_compression [as 别名]
from bbfreeze import Freezer
import shutil, glob, os, sys, subprocess
def find_n_fix_missing(libs):
missing = []
for f in libs:
output = subprocess.Popen(['otool', '-XL', f], stdout=subprocess.PIPE).communicate()[0]
for line in output.splitlines():
libpath = line.strip().split(" ")[0]
if libpath != f and libpath[0] != "/" and libpath[0] != "@":
if not libpath in missing and not '.framework' in libpath:
missing.append(libpath)
shutil.copy(os.path.join('/usr/lib', libpath), libpath)
subprocess.Popen(['install_name_tool', '-change', libpath, "@executable_path/" + libpath, f])
if missing:
find_n_fix_missing(missing)
includes = []
excludes = ['Tkinter', 'readline']
freezer = Freezer('dist/freeze/Config_Editor', includes=includes, excludes=excludes)
freezer.addScript('src/configeditor.py', gui_only=True)
freezer.include_py = False
freezer.use_compression = True
freezer()
if sys.platform == 'darwin':
os.chdir(freezer.distdir)
find_n_fix_missing(glob.glob("*.so") + glob.glob("*.dylib"))
示例4: Freezer
# 需要导入模块: from bbfreeze import Freezer [as 别名]
# 或者: from bbfreeze.Freezer import use_compression [as 别名]
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bbfreeze import Freezer
bbFreeze_Class = Freezer("package")
bbFreeze_Class.addScript("DamnVid.py", gui_only=True)
bbFreeze_Class.use_compression = 1
bbFreeze_Class.include_py = True
bbFreeze_Class()
示例5: Freezer
# 需要导入模块: from bbfreeze import Freezer [as 别名]
# 或者: from bbfreeze.Freezer import use_compression [as 别名]
# bb_setup.py
from bbfreeze import Freezer
f = Freezer(distdir="bb-binary")
f.include_py = True
f.use_compression = True
f.addScript("test.py")
f()