forked from Hsdi/Shortcut_Sync_PotPlayer
更新 .github/workflows/build-exe.yml
Some checks failed
Build Windows EXE with Full Image / build (push) Failing after 1m18s
Some checks failed
Build Windows EXE with Full Image / build (push) Failing after 1m18s
This commit is contained in:
21
.github/workflows/build-exe.yml
vendored
21
.github/workflows/build-exe.yml
vendored
@@ -15,11 +15,26 @@ jobs:
|
||||
# 验证文件完整性
|
||||
file python-3.9.9-amd64.exe
|
||||
|
||||
# 步骤2:先测试 Wine 能否运行简单命令
|
||||
- name: Test Wine environment
|
||||
- name: Reset Wine environment (clean slate)
|
||||
run: |
|
||||
echo "=== 备份并删除旧的 Wine 配置目录 ==="
|
||||
# 如果 ~/.wine 目录存在,先重命名备份(或直接删除)
|
||||
if [ -d "$HOME/.wine" ]; then
|
||||
mv "$HOME/.wine" "$HOME/.wine.bak.$(date +%s)"
|
||||
echo "Old .wine directory backed up."
|
||||
fi
|
||||
|
||||
echo "=== 初始化一个新的干净的Wine环境 ==="
|
||||
# 初始化Wine环境,使用 xvfb-run 避免任何图形界面问题
|
||||
# 设置 WINEARCH 为 win64 以支持64位
|
||||
export WINEARCH=win64
|
||||
xvfb-run wineboot -u
|
||||
|
||||
echo "=== 验证新环境 ==="
|
||||
# 等待几秒让环境初始化完成
|
||||
sleep 5
|
||||
wine --version
|
||||
xvfb-run wine cmd /c "echo Wine is working"
|
||||
xvfb-run wine cmd /c "echo Wine environment is ready"
|
||||
|
||||
# 步骤3:安装 Python(使用正确的文件名)
|
||||
- name: Install Python in Wine
|
||||
|
||||
Reference in New Issue
Block a user