diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cb66674..62675e6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 diff --git a/tests/build_exe.py b/tests/build_exe.py index 041e995..b0b1991 100644 --- a/tests/build_exe.py +++ b/tests/build_exe.py @@ -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 ๆ–‡ไปถ