from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need
# fine tuning.
buildOptions = dict(packages = ["idna","lib","gui","plugins"], excludes = ["Tcl","tcl"]
import sys
base = 'Win32GUI' if sys.platform=='win32' else None
executables = [
Executable('electrum-xvg', base=base, targetName = 'Electrum XVG',icon="electrum.icns")]
setup(name='electrum-xvg',
version = '1.0',
description = '',
options = dict(build_exe = buildOptions),
executables = executables])
我有上面的setup.py文件,我在OSX Sierra上尝试构建应用程序。但是当我使用python setup.py bdist_mac
时会引发错误
@rpath/libQtDeclarative.4.dylib
error: can't copy '@rpath/libQtDeclarative.4.dylib': doesn't exist or not a regular file
我的系统libQtDeclarative.4.dylib
中存在 ~/anaconda/envs/pyqtapp/lib
但是当我使用otool -D libQtDeclarative.4.dylib
时,它引发了错误,即没有此类文件存在,所以我使用了
install_name_tool -id "@rpath/libQtDeclarative.4.dylib" libQtDeclarative.4.dylib
现在,当我~/anaconda/envs/pyqtapp/lib
运行时,otool -D libQtDeclarative.4.dylib
中的
libQtDeclarative.4.dylib:
@rpath/libQtDeclarative.4.dylib
但是cx_Freeze仍然会引发错误
error: can't copy '@rpath/libQtDeclarative.4.dylib': doesn't exist or not a regular file
答案 0 :(得分:0)
尝试明确设置包含(相对路径列表):
includefiles = ['README.txt', 'CHANGELOG.txt', 'helpers\uncompress\unRAR.exe', , 'helpers\uncompress\unzip.exe']