更新 .github/workflows/build-exe.yml
All checks were successful
Build Windows EXE with Wine / build (push) Successful in 6m28s
All checks were successful
Build Windows EXE with Wine / build (push) Successful in 6m28s
This commit is contained in:
11
.github/workflows/build-exe.yml
vendored
11
.github/workflows/build-exe.yml
vendored
@@ -36,9 +36,9 @@ jobs:
|
||||
sleep 3 # 给虚拟显示器几秒钟的启动时间
|
||||
|
||||
# 步骤 3: 下载 Python Windows 安装包
|
||||
- name: Download Python 3.9.9
|
||||
- name: Download Python 3.9.1
|
||||
run: |
|
||||
wget https://mirrors.tuna.tsinghua.edu.cn/python/3.9.9/python-3.9.9-amd64.exe -O python-installer.exe
|
||||
wget https://mirrors.tuna.tsinghua.edu.cn/python/3.9.1/python-3.9.1-amd64.exe -O python-installer.exe
|
||||
ls -lh python-installer.exe
|
||||
|
||||
# 步骤 4: 初始化 Wine 环境
|
||||
@@ -48,12 +48,15 @@ jobs:
|
||||
wineboot -u
|
||||
# 重要:等待 Wine 后台配置进程完全结束
|
||||
wineserver -w
|
||||
# 将 Wine 配置为 Windows 10 (Python 3.9+ 强制要求 Win8 以上)
|
||||
winecfg -v win10
|
||||
wineserver -w
|
||||
|
||||
# 步骤 5: 在 Wine 中安装 Python
|
||||
- name: Install Python in Wine
|
||||
run: |
|
||||
# /quiet 表示静默安装
|
||||
wine python-installer.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
|
||||
# /quiet 表示静默安装,加入 /log 参数抓取日志以便排错
|
||||
wine python-installer.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0 /log python-install.log || (cat python-install.log && exit 1)
|
||||
# 重要:静默安装往往是异步的,必须等待 wineserver 彻底结束,防止 X connection 突然断开
|
||||
wineserver -w
|
||||
# 安装完后立即删除安装包,释放硬盘
|
||||
|
||||
Reference in New Issue
Block a user