本文整理汇总了Python中bbfreeze.Freezer.setIcon方法的典型用法代码示例。如果您正苦于以下问题:Python Freezer.setIcon方法的具体用法?Python Freezer.setIcon怎么用?Python Freezer.setIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bbfreeze.Freezer
的用法示例。
在下文中一共展示了Freezer.setIcon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: recursive_zip
# 需要导入模块: from bbfreeze import Freezer [as 别名]
# 或者: from bbfreeze.Freezer import setIcon [as 别名]
zipl = zipfile.ZipFile(library_zip_archive, "w", compression=zipfile.ZIP_DEFLATED)
recursive_zip(zipl, library_temp_dir)
zipl.close()
shutil.rmtree(library_temp_dir)
print "web2py binary successfully built"
elif BUILD_MODE == 'bbfreeze':
modules = base_modules + contributed_modules
from bbfreeze import Freezer
f = Freezer(distdir="dist", includes=(modules))
#f.addScript("web2py_gevent.py")
f.addScript("web2py.py")
#to make executable without GUI we need this trick
shutil.copy("web2py.py", "web2py_no_console.py")
f.addScript("web2py_no_console.py", gui_only=True)
f.setIcon('extras/icons/web2py.ico')
f() # starts the freezing process
os.unlink("web2py_no_console.py")
#add data_files
for req in ['ABOUT', 'LICENSE', 'VERSION']:
shutil.copy(req, os.path.join('dist', req))
print "web2py binary successfully built"
try:
os.unlink('storage.sqlite')
except:
pass
def copy_folders(source, destination):
"""Copy files & folders from source to destination (within dist/)"""
if os.path.exists(os.path.join('dist', destination)):
示例2: Freezer
# 需要导入模块: from bbfreeze import Freezer [as 别名]
# 或者: from bbfreeze.Freezer import setIcon [as 别名]
# bb_setup.py
from bbfreeze import Freezer
f = Freezer(distdir="bb-binary")
f.addScript("pis_nls_parser.py", gui_only=True)
f.setIcon('favicon.ico')
f()