cx_Freeze setup.py
from cx_Freeze import setup, Executable
# http://msdn.microsoft.com/en-us/library/windows/desktop/aa371847(v=vs.85).aspx
shortcut_table = [
("DesktopShortcut", # Shortcut
"DesktopFolder", # Directory_
"YourAppDetailName", # App Name
"TARGETDIR", # Component_
"[TARGETDIR]AppName.exe", # Target
None, # Arguments
None, # Description
None, # Hotkey
None, # Icon
None, # IconIndex
None, # ShowCmd
'TARGETDIR' # WkDir
)
]
# Now create the table dictionary
msi_data = {"Shortcut": shortcut_table}
# Change some default MSI options and specify the use of the above defined tables
bdist_msi_options = {'data': msi_data}
# Dependencies are automatically detected, but it might need
# fine tuning.
buildOptions = dict(
packages = [],
excludes = [],
include_files=['tks7.dll','Don_API.dll','image','config.ini'],
include_msvcr= True #skip error msvcr100.dll missing
)
import sys
base = 'Win32GUI' if sys.platform=='win32' else None
executables = [
Executable(
'PowerService.py',
base=base,
icon='image\\PowerService.ico',
compress = True,
)
]
setup(name='PowerService',#Setup Path
version = '1.0.0',
description = 'some detail',
maintainer = "MikeYang.Me",
maintainer_email = "kissjava.cn@gmail.com",
url = 'https://kissjava.cn',
options = {"build_exe":buildOptions,"bdist_msi":bdist_msi_options},
executables = executables)
最后修改于 2015-10-29