Skip to content

Commit

Permalink
build: 添加 locale 目录到可执行文件构建过程
Browse files Browse the repository at this point in the history
- 在 Windows 和 macOS 构建命令中添加 --add-data "locale:locale" 参数
- 此修改确保本地化资源被正确打包到可执行文件中
  • Loading branch information
JoeanAmier committed Jan 12, 2025
1 parent b02ba21 commit 24e3033
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Manually_build_executable_programs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Release_build_executable_program.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit 24e3033

Please sign in to comment.