修复打包,未将资源打包进去

This commit is contained in:
xaoyaoo 2024-01-04 15:11:04 +08:00
parent 8e01ec56d4
commit b75bf4b6ed
2 changed files with 6 additions and 2 deletions

View File

@ -39,6 +39,10 @@ jobs:
pip install -U .
python tests/build_exe.py
- name: Build exe file
run: |
python tests/build_exe.py
- name: Build Executable
run: |
pyinstaller --clean --distpath=dist dist/pywxdump.spec

View File

@ -104,10 +104,10 @@ if package_path:
root_path = os.path.join(package_path, 'pywxdump')
datas_741258 = []
for root, dirs, files in os.walk(root_path):
for root, dirs, files in os.walk(os.path.join(root_path,"ui")):
for file in files:
file_path = os.path.join(root, file)
datas_741258.append(f'''(r'{file_path}', r'{os.path.dirname(root_path.replace(package_path, ""))}' )''')
datas_741258.append(f'''(r'{file_path}', r'{os.path.dirname(file_path.replace(package_path, ""))}' )''')
datas_741258 = ",\n".join(datas_741258)
print(datas_741258)
# 生成 spec 文件