当前位置: 首页>>代码示例>>Python>>正文


Python Freezer.use_compression方法代码示例

本文整理汇总了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')
开发者ID:sergio-py2,项目名称:meteor,代码行数:35,代码来源:bbfreezer.py

示例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\\")
开发者ID:HongSeokHwan,项目名称:legacy,代码行数:16,代码来源:bbfreeze_exec_generator.py

示例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"))
开发者ID:CogWorks,项目名称:SpaceFortress,代码行数:31,代码来源:setup_Config_Editor.py

示例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()
开发者ID:rextrick,项目名称:damnvid,代码行数:11,代码来源:bbfreeze-unix.py

示例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()
开发者ID:ph4r05,项目名称:boinc,代码行数:10,代码来源:freeze.py


注:本文中的bbfreeze.Freezer.use_compression方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。