From 93b68608e4605f62ad2434ef08958ecdb2208552 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 03:44:16 +0800 Subject: [PATCH 01/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index ec4aeea..e63644e 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -2,37 +2,35 @@ name: Build Windows EXE on: push: - branches: [ "main" ] - workflow_dispatch: # 允许手动触发 + branches: ["main"] + workflow_dispatch: jobs: build: runs-on: windows-latest steps: - - name: Checkout code + - name: Checkout uses: actions/checkout@v4 - - name: Set up Python + - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.9.1' # 建议指定版本,确保稳定性 - cache: 'pip' # 自动缓存依赖,加快下次构建速度 + python-version: "3.9" - name: Install dependencies + shell: powershell run: | python -m pip install --upgrade pip - python -m pip install pyinstaller keyboard pywin32 + pip install pyinstaller keyboard pywin32 - - name: Build with PyInstaller + - name: Build EXE + shell: powershell run: | - # --clean 确保清理旧缓存 - # --admin-access 如果你的程序需要监听全局钩子,有时需要此权限 - python -m PyInstaller --noconfirm --onefile --windowed --name "Shortcut_Sync_PotPlayer" main.py + pyinstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: PotPlayer-Sync-Tool + name: Shortcut_Sync_PotPlayer path: dist/Shortcut_Sync_PotPlayer.exe - retention-days: 7 # 临时文件保存7天 \ No newline at end of file From 0a253aee80ebae6d8ddfd6a8b095dba5798ac5fa Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 03:50:43 +0800 Subject: [PATCH 02/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index e63644e..a21b306 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: windows-latest + runs-on: windows steps: - name: Checkout From 16658f3effc7df9e3e4b0f5d63c9ae4fb72e0daf Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 04:16:55 +0800 Subject: [PATCH 03/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index a21b306..613c775 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: windows + runs-on: Ubuntu_docker_act steps: - name: Checkout From 87b0d180794ca57036903da1bf96d55e9825a4a6 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 04:32:46 +0800 Subject: [PATCH 04/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 613c775..db64079 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -8,6 +8,9 @@ on: jobs: build: runs-on: Ubuntu_docker_act + # 指定一个包含了 Node.js 的 Docker 镜像 + container: + image: node:20-bullseye steps: - name: Checkout From 26a48a587ba0a3e9df42ae8f868671f35d1f02ee Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 04:39:02 +0800 Subject: [PATCH 05/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index db64079..6e742aa 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -19,7 +19,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.9" + python-version: "3.13.9" - name: Install dependencies shell: powershell From 20ae158e69ed3d50c9dc99b32f00db0f176d2c99 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 04:44:56 +0800 Subject: [PATCH 06/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 6e742aa..16d9bb9 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -7,10 +7,18 @@ on: jobs: build: - runs-on: Ubuntu_docker_act - # 指定一个包含了 Node.js 的 Docker 镜像 - container: - image: node:20-bullseye + runs-on: ubuntu-latest # 使用上面的标签 + steps: + - uses: actions/checkout@v4 + + # Node.js 已经预装,直接使用 + - name: Node.js version + run: node --version + + # Python 已经预装,直接使用 + - name: Python version + run: python --version + steps: - name: Checkout From ab293861c6a3c64b505b53d62dd90b0f701a46c3 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 04:45:39 +0800 Subject: [PATCH 07/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 16d9bb9..e4eb6af 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -19,8 +19,6 @@ jobs: - name: Python version run: python --version - - steps: - name: Checkout uses: actions/checkout@v4 From 640a927fbfa74f3af35087296eb46b740fae8572 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 04:47:02 +0800 Subject: [PATCH 08/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index e4eb6af..1598112 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: ubuntu-latest # 使用上面的标签 + runs-on: Ubuntu_docker_act # 使用上面的标签 steps: - uses: actions/checkout@v4 From c0003b533b4f711f4ad51ff7390055b54f6d3e95 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 04:50:10 +0800 Subject: [PATCH 09/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 1598112..12ba46d 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -8,6 +8,9 @@ on: jobs: build: runs-on: Ubuntu_docker_act # 使用上面的标签 + + container: + image: ubuntu-latest steps: - uses: actions/checkout@v4 From ed650cc5901149feb63d5a65d689a6b52f0cba53 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 04:59:16 +0800 Subject: [PATCH 10/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 12ba46d..4c7deb9 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -1,5 +1,4 @@ name: Build Windows EXE - on: push: branches: ["main"] @@ -7,42 +6,29 @@ on: jobs: build: - runs-on: Ubuntu_docker_act # 使用上面的标签 - - container: - image: ubuntu-latest + runs-on: Ubuntu_docker_act # 现在这个标签指向 runner-images steps: - uses: actions/checkout@v4 - # Node.js 已经预装,直接使用 - - name: Node.js version - run: node --version - - # Python 已经预装,直接使用 - - name: Python version - run: python --version - - - name: Checkout - uses: actions/checkout@v4 - + # 直接使用,不需要 container 指定 - name: Setup Python uses: actions/setup-python@v5 with: python-version: "3.13.9" - + - name: Install dependencies - shell: powershell + shell: pwsh run: | python -m pip install --upgrade pip pip install pyinstaller keyboard pywin32 - + - name: Build EXE - shell: powershell + shell: pwsh run: | pyinstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py - + - name: Upload Artifact uses: actions/upload-artifact@v4 with: name: Shortcut_Sync_PotPlayer - path: dist/Shortcut_Sync_PotPlayer.exe + path: dist/Shortcut_Sync_PotPlayer.exe \ No newline at end of file From fb43706d65c0011d9e73b19d4bff076ee0abff5e Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 05:04:04 +0800 Subject: [PATCH 11/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 35 +++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 4c7deb9..6446773 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -6,24 +6,43 @@ on: jobs: build: - runs-on: Ubuntu_docker_act # 现在这个标签指向 runner-images + runs-on: Ubuntu_docker_act steps: + - name: Install Node.js and Python + run: | + apt-get update + apt-get install -y curl wget git + + # 安装 Node.js 18 + curl -fsSL https://deb.nodesource.com/setup_18.x | bash - + apt-get install -y nodejs + + # 安装 Python 3.13 + apt-get install -y software-properties-common + add-apt-repository ppa:deadsnakes/ppa -y + apt-get update + apt-get install -y python3.13 python3.13-dev python3.13-distutils + curl -sS https://bootstrap.pypa.io/get-pip.py | python3.13 + ln -sf /usr/bin/python3.13 /usr/bin/python + ln -sf /usr/bin/python3.13 /usr/bin/python3 + + # 验证安装 + node --version + python --version + - uses: actions/checkout@v4 - # 直接使用,不需要 container 指定 - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: "3.13.9" + - name: Setup Python (确保使用正确的版本) + run: | + python --version + pip --version - name: Install dependencies - shell: pwsh run: | python -m pip install --upgrade pip pip install pyinstaller keyboard pywin32 - name: Build EXE - shell: pwsh run: | pyinstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py From 59f669d9285a500f3fd0382cc37c11cc4dff2b38 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 05:07:55 +0800 Subject: [PATCH 12/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 38 +++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 6446773..874f8f4 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -6,19 +6,19 @@ on: jobs: build: - runs-on: Ubuntu_docker_act + runs-on: ubuntu-build # 使用 Ubuntu 基础镜像 steps: + # 第一步:安装所有需要的环境 - name: Install Node.js and Python run: | apt-get update - apt-get install -y curl wget git + apt-get install -y curl wget git software-properties-common # 安装 Node.js 18 curl -fsSL https://deb.nodesource.com/setup_18.x | bash - apt-get install -y nodejs # 安装 Python 3.13 - apt-get install -y software-properties-common add-apt-repository ppa:deadsnakes/ppa -y apt-get update apt-get install -y python3.13 python3.13-dev python3.13-distutils @@ -26,26 +26,32 @@ jobs: ln -sf /usr/bin/python3.13 /usr/bin/python ln -sf /usr/bin/python3.13 /usr/bin/python3 + # 安装 Wine (用于Windows交叉编译) + dpkg --add-architecture i386 + apt-get update + apt-get install -y wine64 wine32 + # 验证安装 - node --version - python --version + echo "Node version: $(node --version)" + echo "Python version: $(python --version)" + echo "Wine version: $(wine --version)" - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - - name: Setup Python (确保使用正确的版本) - run: | - python --version - pip --version - - - name: Install dependencies + # 安装 Python 依赖 + - name: Install Python dependencies run: | python -m pip install --upgrade pip pip install pyinstaller keyboard pywin32 - - - name: Build EXE + + # 构建 EXE + - name: Build EXE with PyInstaller run: | - pyinstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py - + # 使用 Wine 运行 PyInstaller 来构建 Windows EXE + wine python -m PyInstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py + + # 上传构建产物 - name: Upload Artifact uses: actions/upload-artifact@v4 with: From 7fc8240a60512d57f53e6736a5b9d26f1670a08d Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 05:14:11 +0800 Subject: [PATCH 13/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 874f8f4..f6ecf73 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -6,7 +6,7 @@ on: jobs: build: - runs-on: ubuntu-build # 使用 Ubuntu 基础镜像 + runs-on: Ubuntu_docker_act # 使用 Ubuntu 基础镜像 steps: # 第一步:安装所有需要的环境 - name: Install Node.js and Python From de14ff940e84e411faa0b54c58200526576904bb Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 07:09:24 +0800 Subject: [PATCH 14/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 61 +++++++++------------------------ 1 file changed, 16 insertions(+), 45 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index f6ecf73..97e2554 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -1,57 +1,28 @@ -name: Build Windows EXE -on: - push: - branches: ["main"] - workflow_dispatch: +name: Build Windows EXE with Full Image +on: [push] jobs: build: - runs-on: Ubuntu_docker_act # 使用 Ubuntu 基础镜像 + runs-on: Ubuntu_docker_act # 使用我们刚定义的标签 steps: - # 第一步:安装所有需要的环境 - - name: Install Node.js and Python + - uses: actions/checkout@v4 + + # 环境已预装,直接验证 + - name: Verify tools run: | - apt-get update - apt-get install -y curl wget git software-properties-common - - # 安装 Node.js 18 - curl -fsSL https://deb.nodesource.com/setup_18.x | bash - - apt-get install -y nodejs - - # 安装 Python 3.13 - add-apt-repository ppa:deadsnakes/ppa -y - apt-get update - apt-get install -y python3.13 python3.13-dev python3.13-distutils - curl -sS https://bootstrap.pypa.io/get-pip.py | python3.13 - ln -sf /usr/bin/python3.13 /usr/bin/python - ln -sf /usr/bin/python3.13 /usr/bin/python3 - - # 安装 Wine (用于Windows交叉编译) - dpkg --add-architecture i386 - apt-get update - apt-get install -y wine64 wine32 - - # 验证安装 - echo "Node version: $(node --version)" - echo "Python version: $(python --version)" - echo "Wine version: $(wine --version)" - - - name: Checkout code - uses: actions/checkout@v4 - - # 安装 Python 依赖 + node --version + python --version + wine --version # 确认 wine 是否存在,full 镜像很可能包含 + - name: Install Python dependencies run: | - python -m pip install --upgrade pip pip install pyinstaller keyboard pywin32 - - # 构建 EXE - - name: Build EXE with PyInstaller + + - name: Build EXE run: | - # 使用 Wine 运行 PyInstaller 来构建 Windows EXE - wine python -m PyInstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py - - # 上传构建产物 + # 直接在原生环境下运行,full 镜像可能无需 wine 包装 + pyinstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py + - name: Upload Artifact uses: actions/upload-artifact@v4 with: From f12d02bb4a5d7fdf60b521995af5f3c9bc37cbb7 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 08:58:27 +0800 Subject: [PATCH 15/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 97e2554..98b23cb 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -3,7 +3,7 @@ on: [push] jobs: build: - runs-on: Ubuntu_docker_act # 使用我们刚定义的标签 + runs-on: Ubuntu_docker_act steps: - uses: actions/checkout@v4 From 1bd33ab4cb4c2c5f3bf885b60cc6c4b660f28c95 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 09:05:54 +0800 Subject: [PATCH 16/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 98b23cb..396d81a 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -13,6 +13,13 @@ jobs: node --version python --version wine --version # 确认 wine 是否存在,full 镜像很可能包含 + + - name: Install Wine + run: | + sudo dpkg --add-architecture i386 + sudo apt-get update + sudo apt-get install -y wine64 wine32 + wine --version # 安装后验证 - name: Install Python dependencies run: | From 110a0a1f1ca8769156499a3de230900e34bf6af9 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 09:06:50 +0800 Subject: [PATCH 17/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 396d81a..82b0e8e 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -7,13 +7,6 @@ jobs: steps: - uses: actions/checkout@v4 - # 环境已预装,直接验证 - - name: Verify tools - run: | - node --version - python --version - wine --version # 确认 wine 是否存在,full 镜像很可能包含 - - name: Install Wine run: | sudo dpkg --add-architecture i386 @@ -21,6 +14,13 @@ jobs: sudo apt-get install -y wine64 wine32 wine --version # 安装后验证 + # 环境已预装,直接验证 + - name: Verify tools + run: | + node --version + python --version + wine --version # 确认 wine 是否存在,full 镜像很可能包含 + - name: Install Python dependencies run: | pip install pyinstaller keyboard pywin32 From 4d491908cbf258014831ec2c781e2371893ca46b Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 09:24:15 +0800 Subject: [PATCH 18/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 82b0e8e..765b347 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -13,22 +13,21 @@ jobs: sudo apt-get update sudo apt-get install -y wine64 wine32 wine --version # 安装后验证 - + - name: Install Windows dependencies using Wine Python + run: | + # 使用 Wine 运行 Windows 版本的 Python + wine python -m pip install --upgrade pip + wine python -m pip install pyinstaller keyboard pywin32 # 环境已预装,直接验证 - name: Verify tools run: | node --version - python --version + wine python --version wine --version # 确认 wine 是否存在,full 镜像很可能包含 - - name: Install Python dependencies - run: | - pip install pyinstaller keyboard pywin32 - - - name: Build EXE - run: | - # 直接在原生环境下运行,full 镜像可能无需 wine 包装 - pyinstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py + - name: Build EXE using Wine Python + run: | + wine python -m PyInstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py - name: Upload Artifact uses: actions/upload-artifact@v4 From 9b3ee453224fa0320326f4f639a4fec389f5fdd8 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 09:25:47 +0800 Subject: [PATCH 19/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 765b347..797982e 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -13,11 +13,13 @@ jobs: sudo apt-get update sudo apt-get install -y wine64 wine32 wine --version # 安装后验证 + - name: Install Windows dependencies using Wine Python run: | # 使用 Wine 运行 Windows 版本的 Python wine python -m pip install --upgrade pip wine python -m pip install pyinstaller keyboard pywin32 + # 环境已预装,直接验证 - name: Verify tools run: | @@ -25,9 +27,9 @@ jobs: wine python --version wine --version # 确认 wine 是否存在,full 镜像很可能包含 - - name: Build EXE using Wine Python - run: | - wine python -m PyInstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py + - name: Build EXE using Wine Python + run: | + wine python -m PyInstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py - name: Upload Artifact uses: actions/upload-artifact@v4 From d9af7cadf3dcb4f1a5f80fecf173a3426f74caa4 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 18:18:44 +0800 Subject: [PATCH 20/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 797982e..75b0e82 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -7,30 +7,15 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install Wine + - name: Install dependencies run: | - sudo dpkg --add-architecture i386 - sudo apt-get update - sudo apt-get install -y wine64 wine32 - wine --version # 安装后验证 - - - name: Install Windows dependencies using Wine Python + wine-xvfb python -m pip install --upgrade pip + wine-xvfb python -m pip install pyinstaller keyboard pywin32 + + - name: Build EXE run: | - # 使用 Wine 运行 Windows 版本的 Python - wine python -m pip install --upgrade pip - wine python -m pip install pyinstaller keyboard pywin32 - - # 环境已预装,直接验证 - - name: Verify tools - run: | - node --version - wine python --version - wine --version # 确认 wine 是否存在,full 镜像很可能包含 - - - name: Build EXE using Wine Python - run: | - wine python -m PyInstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py - + wine-xvfb python -m PyInstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py + - name: Upload Artifact uses: actions/upload-artifact@v4 with: From 37258932377ba82d03e1af54970d333a2da79dde Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 18:43:03 +0800 Subject: [PATCH 21/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 50 +++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 75b0e82..4a8aab8 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -7,15 +7,55 @@ jobs: steps: - uses: actions/checkout@v4 + # 步骤1:下载你指定的 Python 安装包 + - name: Download Python 3.9.13 installer + run: | + wget https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe + ls -lh python-3.9.13-amd64.exe # 确认文件下载成功 + + # 步骤2:使用 Xvfb 在 Wine 中静默安装 Python + - name: Install Python in Wine + run: | + # 使用 xvfb-run 包装 wine 以解决无显示问题 + # /quiet: 静默安装,InstallAllUsers=1: 为所有用户安装,PrependPath=1: 自动添加到 PATH + # Include_test=0: 不安装测试套件,以节省空间 + xvfb-run wine python-3.9.13-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0 + echo "Python installation initiated. Waiting for process to complete..." + # 等待几秒确保安装完成 + sleep 10 + + # 步骤3:验证 Python 是否正确安装(关键步骤!) + - name: Verify Python installation + run: | + echo "=== Searching for python.exe ===" + # 查找刚安装的 Python,这能帮你确认确切的路径 + PYTHON_EXE_PATH=$(find /root/.wine/drive_c -name "python.exe" -path "*/Python39/*" | head -n 1) + if [ -z "$PYTHON_EXE_PATH" ]; then + echo "Python.exe not found! Installation may have failed." + exit 1 + fi + echo "Found Python at: $PYTHON_EXE_PATH" + echo "PYTHON_EXE=$PYTHON_EXE_PATH" >> $GITHUB_ENV # 保存路径供后续步骤使用 + + echo "=== Verifying Python version ===" + # 使用完整路径调用 Python 验证 + wine "$PYTHON_EXE_PATH" --version + + # 步骤4:使用刚安装的 Python 安装依赖 - name: Install dependencies run: | - wine-xvfb python -m pip install --upgrade pip - wine-xvfb python -m pip install pyinstaller keyboard pywin32 - + # 升级 pip + wine "${{ env.PYTHON_EXE }}" -m pip install --upgrade pip + # 安装所需包。pywin32 必须在这里用 Wine 的 Python 安装 + wine "${{ env.PYTHON_EXE }}" -m pip install pyinstaller keyboard pywin32 + + # 步骤5:使用正确的 Python 和 PyInstaller 构建 EXE - name: Build EXE run: | - wine-xvfb python -m PyInstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py - + # 确保在工作目录执行 + wine "${{ env.PYTHON_EXE }}" -m PyInstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py + + # 步骤6:上传构建产物 - name: Upload Artifact uses: actions/upload-artifact@v4 with: From e989c2671557fd53a6c8c4a3f2077638b4d29db5 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 18:46:02 +0800 Subject: [PATCH 22/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 4a8aab8..6c2192a 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -10,8 +10,8 @@ jobs: # 步骤1:下载你指定的 Python 安装包 - name: Download Python 3.9.13 installer run: | - wget https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe - ls -lh python-3.9.13-amd64.exe # 确认文件下载成功 + wget https://mirrors.tuna.tsinghua.edu.cn/python/3.9.9/python-3.9.9-amd64.exe + ls -lh python-3.9.9-amd64.exe # 确认文件下载成功 # 步骤2:使用 Xvfb 在 Wine 中静默安装 Python - name: Install Python in Wine From bd59fbe7e7ec917dfe2ecb0743b252013a0a86af Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 18:48:06 +0800 Subject: [PATCH 23/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 103 ++++++++++++++++++++++---------- 1 file changed, 70 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 6c2192a..669a46c 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -7,55 +7,92 @@ jobs: steps: - uses: actions/checkout@v4 - # 步骤1:下载你指定的 Python 安装包 - - name: Download Python 3.9.13 installer + # 步骤1:下载 Python 3.9.9 安装包(保持文件名一致) + - name: Download Python 3.9.9 installer run: | wget https://mirrors.tuna.tsinghua.edu.cn/python/3.9.9/python-3.9.9-amd64.exe - ls -lh python-3.9.9-amd64.exe # 确认文件下载成功 + ls -lh python-3.9.9-amd64.exe + # 验证文件完整性 + file python-3.9.9-amd64.exe - # 步骤2:使用 Xvfb 在 Wine 中静默安装 Python + # 步骤2:先测试 Wine 能否运行简单命令 + - name: Test Wine environment + run: | + wine --version + xvfb-run wine cmd /c "echo Wine is working" + + # 步骤3:安装 Python(使用正确的文件名) - name: Install Python in Wine run: | - # 使用 xvfb-run 包装 wine 以解决无显示问题 - # /quiet: 静默安装,InstallAllUsers=1: 为所有用户安装,PrependPath=1: 自动添加到 PATH - # Include_test=0: 不安装测试套件,以节省空间 - xvfb-run wine python-3.9.13-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0 - echo "Python installation initiated. Waiting for process to complete..." - # 等待几秒确保安装完成 - sleep 10 - - # 步骤3:验证 Python 是否正确安装(关键步骤!) - - name: Verify Python installation - run: | - echo "=== Searching for python.exe ===" - # 查找刚安装的 Python,这能帮你确认确切的路径 - PYTHON_EXE_PATH=$(find /root/.wine/drive_c -name "python.exe" -path "*/Python39/*" | head -n 1) - if [ -z "$PYTHON_EXE_PATH" ]; then - echo "Python.exe not found! Installation may have failed." + # 使用绝对路径并添加调试信息 + echo "Current directory: $(pwd)" + echo "Files in current directory:" + ls -la + + # 确保文件存在 + if [ ! -f "python-3.9.9-amd64.exe" ]; then + echo "Installer not found!" exit 1 fi - echo "Found Python at: $PYTHON_EXE_PATH" - echo "PYTHON_EXE=$PYTHON_EXE_PATH" >> $GITHUB_ENV # 保存路径供后续步骤使用 - echo "=== Verifying Python version ===" - # 使用完整路径调用 Python 验证 - wine "$PYTHON_EXE_PATH" --version + # 尝试用 wineconsole 而不是 wine,有时更稳定 + xvfb-run wineconsole --backend=curses cmd /c "python-3.9.9-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0" + + # 等待安装完成 + sleep 15 + + # 验证安装进程 + echo "Installation completed, checking..." - # 步骤4:使用刚安装的 Python 安装依赖 + # 步骤4:更彻底地查找 Python + - name: Find and verify Python + run: | + echo "=== Searching all possible Python locations ===" + # 查找所有 python.exe + find /root/.wine/drive_c -name "python.exe" 2>/dev/null | while read path; do + echo "Found: $path" + echo "Version info:" + wine "$path" --version 2>/dev/null || echo "Cannot run $path" + done + + # 尝试常见路径 + COMMON_PATHS=( + "/root/.wine/drive_c/Python39/python.exe" + "/root/.wine/drive_c/Python39-32/python.exe" + "/root/.wine/drive_c/Program Files/Python39/python.exe" + "/root/.wine/drive_c/users/runner/AppData/Local/Programs/Python/Python39/python.exe" + ) + + for path in "${COMMON_PATHS[@]}"; do + if [ -f "$path" ]; then + echo "Found Python at standard location: $path" + PYTHON_EXE="$path" + break + fi + done + + if [ -z "$PYTHON_EXE" ]; then + echo "Python not found in standard locations" + exit 1 + fi + + echo "PYTHON_EXE=$PYTHON_EXE" >> $GITHUB_ENV + wine "$PYTHON_EXE" --version + + # 步骤5:安装依赖 - name: Install dependencies run: | # 升级 pip - wine "${{ env.PYTHON_EXE }}" -m pip install --upgrade pip - # 安装所需包。pywin32 必须在这里用 Wine 的 Python 安装 - wine "${{ env.PYTHON_EXE }}" -m pip install pyinstaller keyboard pywin32 + wine "$PYTHON_EXE" -m pip install --upgrade pip + # 安装包 + wine "$PYTHON_EXE" -m pip install pyinstaller keyboard pywin32 - # 步骤5:使用正确的 Python 和 PyInstaller 构建 EXE + # 步骤6:构建 EXE - name: Build EXE run: | - # 确保在工作目录执行 - wine "${{ env.PYTHON_EXE }}" -m PyInstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py + wine "$PYTHON_EXE" -m PyInstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py - # 步骤6:上传构建产物 + # 步骤7:上传产物 - name: Upload Artifact uses: actions/upload-artifact@v4 with: From 43868f576e9df1ea7be1104fbee8c1ac391f6468 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 19:00:25 +0800 Subject: [PATCH 24/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 669a46c..adb50d2 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -36,7 +36,7 @@ jobs: fi # 尝试用 wineconsole 而不是 wine,有时更稳定 - xvfb-run wineconsole --backend=curses cmd /c "python-3.9.9-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0" + xvfb-run wine --backend=curses cmd /c "python-3.9.9-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0" # 等待安装完成 sleep 15 From 9cf6198cbf0baea77e94ad1f471f6f99c0a5165a Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 19:05:13 +0800 Subject: [PATCH 25/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index adb50d2..d652709 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -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 From 4c8cfb11778acb75683f91845c40e16c133bb02b Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 19:08:15 +0800 Subject: [PATCH 26/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index d652709..9cdea71 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -51,7 +51,7 @@ jobs: fi # 尝试用 wineconsole 而不是 wine,有时更稳定 - xvfb-run wine --backend=curses cmd /c "python-3.9.9-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0" + xvfb-run wineconsole --backend=curses cmd /c "python-3.9.9-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0" # 等待安装完成 sleep 15 From 8b41e59e1df2bc38b5933435a7214e87fbf7e786 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 22:08:51 +0800 Subject: [PATCH 27/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 9cdea71..0373877 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -39,25 +39,19 @@ jobs: # 步骤3:安装 Python(使用正确的文件名) - name: Install Python in Wine run: | - # 使用绝对路径并添加调试信息 echo "Current directory: $(pwd)" - echo "Files in current directory:" - ls -la - - # 确保文件存在 - if [ ! -f "python-3.9.9-amd64.exe" ]; then + ls -lah + + if [ ! -f python-3.9.9-amd64.exe ]; then echo "Installer not found!" exit 1 fi - - # 尝试用 wineconsole 而不是 wine,有时更稳定 - xvfb-run wineconsole --backend=curses cmd /c "python-3.9.9-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0" - - # 等待安装完成 - sleep 15 - - # 验证安装进程 - echo "Installation completed, checking..." + + # 直接用 wine 运行 + xvfb-run -a wine python-3.9.9-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0 + + # 等待安装 + sleep 20 # 步骤4:更彻底地查找 Python - name: Find and verify Python From d55269c1f0db987cfcb29e66dd47c0dd3ae545e0 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 22:22:49 +0800 Subject: [PATCH 28/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-exe.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 0373877..e393526 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -101,9 +101,9 @@ jobs: run: | wine "$PYTHON_EXE" -m PyInstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py - # 步骤7:上传产物 + # 步骤7:上传构建产物(修复版本) - name: Upload Artifact - uses: actions/upload-artifact@v4 + uses: christopherhx/gitea-upload-artifact@v4 # 关键修复! with: name: Shortcut_Sync_PotPlayer path: dist/Shortcut_Sync_PotPlayer.exe \ No newline at end of file From 9eb173bdfc8dce38127a88f51c9fefdc456cf79c Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 22:54:33 +0800 Subject: [PATCH 29/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 发布 v1.0 Signed-off-by: miu <205594122@qq.com> --- .github/workflows/build-exe.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index e393526..182b8b9 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -1,5 +1,11 @@ name: Build Windows EXE with Full Image -on: [push] +on: + push: + # 推荐:只在打标签时触发 Release + tags: + - 'v*' # 例如推送 v1.0.0, v2.1.3 等标签时触发 + # 如果你想在每次推送时都创建,也可以保留 branches,但通常会打 tag + branches: ["main"] jobs: build: @@ -91,6 +97,9 @@ jobs: # 步骤5:安装依赖 - name: Install dependencies run: | + # 先配置 pip 使用清华源(或其他国内源) + wine "$PYTHON_EXE" -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple + wine "$PYTHON_EXE" -m pip config set install.trusted-host pypi.tuna.tsinghua.edu.cn # 升级 pip wine "$PYTHON_EXE" -m pip install --upgrade pip # 安装包 From f9153409693fd5e22cfea8e822c8298d032683d8 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 22:57:59 +0800 Subject: [PATCH 30/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v1.0 --- .github/workflows/build-exe.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index 182b8b9..d209193 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -115,4 +115,20 @@ jobs: uses: christopherhx/gitea-upload-artifact@v4 # 关键修复! with: name: Shortcut_Sync_PotPlayer - path: dist/Shortcut_Sync_PotPlayer.exe \ No newline at end of file + path: dist/Shortcut_Sync_PotPlayer.exe + + - name: Create Release and Upload Asset + # 使用专门为 Gitea 开发的 release action + # 这是一个在 Gitea 生态中广泛使用的版本 [citation:2][citation:5] + uses: https://gitea.com/actions/release-action@main + with: + # 文件路径:指向你 PyInstaller 生成的 EXE 文件 + files: dist/Shortcut_Sync_PotPlayer.exe + # API 密钥:使用 Gitea 自动提供的 token,用于认证 + api_key: '${{ secrets.GITHUB_TOKEN }}' + # 可选:设置 Release 的标题,默认会使用 tag 名称 + name: 'Release ${{ github.ref_name }}' + # 可选:是否为草稿 (true/false) + draft: false + # 可选:是否为预发布 (true/false) + prerelease: false \ No newline at end of file From b4dd7492c201e8b25280d5f689872947ca50bfb1 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 22:59:39 +0800 Subject: [PATCH 31/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v1.0 --- .github/workflows/build-exe.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml index d209193..8532a49 100644 --- a/.github/workflows/build-exe.yml +++ b/.github/workflows/build-exe.yml @@ -116,7 +116,7 @@ jobs: with: name: Shortcut_Sync_PotPlayer path: dist/Shortcut_Sync_PotPlayer.exe - + - name: Create Release and Upload Asset # 使用专门为 Gitea 开发的 release action # 这是一个在 Gitea 生态中广泛使用的版本 [citation:2][citation:5] @@ -127,7 +127,7 @@ jobs: # API 密钥:使用 Gitea 自动提供的 token,用于认证 api_key: '${{ secrets.GITHUB_TOKEN }}' # 可选:设置 Release 的标题,默认会使用 tag 名称 - name: 'Release ${{ github.ref_name }}' + name: 'Release ${{ github.ref_name }}' # 可选:是否为草稿 (true/false) draft: false # 可选:是否为预发布 (true/false) From 233ceaca2eb890c8796f75b7588d13a9e4468361 Mon Sep 17 00:00:00 2001 From: miu <205594122@qq.com> Date: Sun, 15 Mar 2026 23:23:30 +0800 Subject: [PATCH 32/32] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.github/workflows/bu?= =?UTF-8?q?ild-exe-Miu.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决冲突 Signed-off-by: miu <205594122@qq.com> --- .github/workflows/{build-exe.yml => build-exe-Miu.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build-exe.yml => build-exe-Miu.yml} (100%) diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe-Miu.yml similarity index 100% rename from .github/workflows/build-exe.yml rename to .github/workflows/build-exe-Miu.yml