修改打包配置
This commit is contained in:
parent
b462565294
commit
137558064a
|
@ -2,9 +2,8 @@
|
|||
|
||||
block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(['bin\\DataCreating_Click.py'],
|
||||
pathex=['E:\\git-code\\dataCreatingGUI'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[],
|
||||
hiddenimports=['PySide6.QtXml'],
|
||||
|
@ -17,30 +16,6 @@ a = Analysis(['bin\\DataCreating_Click.py'],
|
|||
noarchive=False)
|
||||
|
||||
|
||||
|
||||
|
||||
#######!!!注意点1:加载自己的资源文件#####################
|
||||
def extra_datas(mydir):
|
||||
def rec_glob(p, files):
|
||||
import os
|
||||
import glob
|
||||
for d in glob.glob(p):
|
||||
if os.path.isfile(d):
|
||||
files.append(d)
|
||||
rec_glob("%s/*" % d, files)
|
||||
files = []
|
||||
rec_glob("%s/*" % mydir, files)
|
||||
extra_datas = []
|
||||
for f in files:
|
||||
extra_datas.append((f, f, 'DATA'))
|
||||
|
||||
return extra_datas
|
||||
|
||||
# append the 'Resources' dir
|
||||
a.datas += extra_datas('etc') ###这里是自己的资源文件夹
|
||||
a.datas += extra_datas('ui') ###这里是自己的资源文件夹
|
||||
################################################
|
||||
|
||||
pyz = PYZ(a.pure, a.zipped_data,
|
||||
cipher=block_cipher)
|
||||
|
||||
|
@ -48,7 +23,7 @@ pyz = PYZ(a.pure, a.zipped_data,
|
|||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
[],
|
||||
exclude_binaries=True, ###!!!注意点3:这里是True
|
||||
exclude_binaries=True,
|
||||
name='dataCreatingGUI',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
|
|
Loading…
Reference in New Issue