From 24e3033b37f681599dab68b2b8f058eeb3289601 Mon Sep 17 00:00:00 2001 From: JoeanAmier Date: Sun, 12 Jan 2025 21:20:08 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E6=B7=BB=E5=8A=A0=20locale=20?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E5=88=B0=E5=8F=AF=E6=89=A7=E8=A1=8C=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=9E=84=E5=BB=BA=E8=BF=87=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 Windows 和 macOS 构建命令中添加 --add-data "locale:locale" 参数 - 此修改确保本地化资源被正确打包到可执行文件中 --- .github/workflows/Manually_build_executable_programs.yml | 4 ++-- .github/workflows/Release_build_executable_program.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Manually_build_executable_programs.yml b/.github/workflows/Manually_build_executable_programs.yml index 36dcc288..cbf583e1 100644 --- a/.github/workflows/Manually_build_executable_programs.yml +++ b/.github/workflows/Manually_build_executable_programs.yml @@ -29,13 +29,13 @@ jobs: - name: 构建 Win 可执行文件 if: runner.os == 'Windows' run: | - pyinstaller --icon=./static/images/TikTokDownloader.ico --add-data "static:static" --add-data "templates:templates" --collect-all emoji main.py + pyinstaller --icon=./static/images/TikTokDownloader.ico --add-data "static:static" --add-data "locale:locale" --add-data "templates:templates" --collect-all emoji main.py shell: pwsh - name: 构建 Mac 可执行文件 if: runner.os == 'macOS' run: | - pyinstaller --icon=./static/images/TikTokDownloader.icns --add-data "static:static" --add-data "templates:templates" --collect-all emoji main.py + pyinstaller --icon=./static/images/TikTokDownloader.icns --add-data "static:static" --add-data "locale:locale" --add-data "templates:templates" --collect-all emoji main.py - name: 上传文件 uses: actions/upload-artifact@v4 diff --git a/.github/workflows/Release_build_executable_program.yml b/.github/workflows/Release_build_executable_program.yml index d47b15a2..aa9c7517 100644 --- a/.github/workflows/Release_build_executable_program.yml +++ b/.github/workflows/Release_build_executable_program.yml @@ -34,13 +34,13 @@ jobs: - name: 构建 Win 可执行文件 if: runner.os == 'Windows' run: | - pyinstaller --icon=./static/images/TikTokDownloader.ico --add-data "static:static" --add-data "templates:templates" --collect-all emoji main.py + pyinstaller --icon=./static/images/TikTokDownloader.ico --add-data "static:static" --add-data "locale:locale" --add-data "templates:templates" --collect-all emoji main.py shell: pwsh - name: 构建 Mac 可执行文件 if: runner.os == 'macOS' run: | - pyinstaller --icon=./static/images/TikTokDownloader.icns --add-data "static:static" --add-data "templates:templates" --collect-all emoji main.py + pyinstaller --icon=./static/images/TikTokDownloader.icns --add-data "static:static" --add-data "locale:locale" --add-data "templates:templates" --collect-all emoji main.py - name: 创建压缩包 run: |