Skip to content

Commit 24e3033

Browse files
committed
build: 添加 locale 目录到可执行文件构建过程
- 在 Windows 和 macOS 构建命令中添加 --add-data "locale:locale" 参数 - 此修改确保本地化资源被正确打包到可执行文件中
1 parent b02ba21 commit 24e3033

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/Manually_build_executable_programs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ jobs:
2929
- name: 构建 Win 可执行文件
3030
if: runner.os == 'Windows'
3131
run: |
32-
pyinstaller --icon=./static/images/TikTokDownloader.ico --add-data "static:static" --add-data "templates:templates" --collect-all emoji main.py
32+
pyinstaller --icon=./static/images/TikTokDownloader.ico --add-data "static:static" --add-data "locale:locale" --add-data "templates:templates" --collect-all emoji main.py
3333
shell: pwsh
3434

3535
- name: 构建 Mac 可执行文件
3636
if: runner.os == 'macOS'
3737
run: |
38-
pyinstaller --icon=./static/images/TikTokDownloader.icns --add-data "static:static" --add-data "templates:templates" --collect-all emoji main.py
38+
pyinstaller --icon=./static/images/TikTokDownloader.icns --add-data "static:static" --add-data "locale:locale" --add-data "templates:templates" --collect-all emoji main.py
3939
4040
- name: 上传文件
4141
uses: actions/upload-artifact@v4

.github/workflows/Release_build_executable_program.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ jobs:
3434
- name: 构建 Win 可执行文件
3535
if: runner.os == 'Windows'
3636
run: |
37-
pyinstaller --icon=./static/images/TikTokDownloader.ico --add-data "static:static" --add-data "templates:templates" --collect-all emoji main.py
37+
pyinstaller --icon=./static/images/TikTokDownloader.ico --add-data "static:static" --add-data "locale:locale" --add-data "templates:templates" --collect-all emoji main.py
3838
shell: pwsh
3939

4040
- name: 构建 Mac 可执行文件
4141
if: runner.os == 'macOS'
4242
run: |
43-
pyinstaller --icon=./static/images/TikTokDownloader.icns --add-data "static:static" --add-data "templates:templates" --collect-all emoji main.py
43+
pyinstaller --icon=./static/images/TikTokDownloader.icns --add-data "static:static" --add-data "locale:locale" --add-data "templates:templates" --collect-all emoji main.py
4444
4545
- name: 创建压缩包
4646
run: |

0 commit comments

Comments
 (0)