From d5737616e61b575fb810c6c66de92b530279594f Mon Sep 17 00:00:00 2001 From: "Wilson.Huang" <114924470+WilsonHuangDev@users.noreply.github.com> Date: Thu, 24 Apr 2025 00:08:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E4=BD=BF=E7=94=A8Nuitka=E6=89=93?= =?UTF-8?q?=E5=8C=85=E6=9E=84=E5=BB=BA=E6=97=B6=E5=A2=9E=E5=8A=A0=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E5=90=8D=E7=A7=B0=E3=80=81=E5=8F=91=E5=B8=83=E8=80=85?= =?UTF-8?q?=E3=80=81=E4=BA=A7=E5=93=81=E7=89=88=E6=9C=AC=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Python-Build.yml | 2 +- nuitka-build.sh | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Python-Build.yml b/.github/workflows/Python-Build.yml index db7b9a3..5eb6e98 100644 --- a/.github/workflows/Python-Build.yml +++ b/.github/workflows/Python-Build.yml @@ -42,7 +42,7 @@ jobs: - name: Build EXE shell: bash {0} run: | - ./nuitka-build.sh + ./nuitka-build.sh "${{ github.event.inputs.release_tag }}" - name: Upload EXE to GitHub Actions uses: actions/upload-artifact@v4 diff --git a/nuitka-build.sh b/nuitka-build.sh index 24ffb33..bf51b22 100644 --- a/nuitka-build.sh +++ b/nuitka-build.sh @@ -2,7 +2,17 @@ # 构建脚本说明 echo "=== Windows-Login-Helper 打包脚本 ===" + +# 检查是否传入版本号 +if [ -z "$1" ]; then + echo "错误: 未指定版本号!" + exit 1 +fi + +VERSION=$1 + echo "正在执行打包操作,请稍候..." +echo "版本号: $VERSION" # 清理旧构建文件 echo "清理旧构建文件..." @@ -11,10 +21,14 @@ rm -rf ./dist 2> /dev/null # 执行打包命令(关键配置) python -m nuitka \ --standalone \ ---windows-console-mode=disable \ +--windows-console-mode=attach \ --windows-icon-from-ico=./Assets/icon.ico \ +--company-name=Wilson.Huang \ +--product-name="Windows 登录辅助工具" \ +--product-version="$VERSION" \ --include-package=PasswdChanger \ --include-package=modules \ +--include-data-file="./Assets/**/*.ico=Assets/" \ --output-dir=./dist/Windows-Login-Helper \ --output-filename=WinLoginHelper \ --remove-output \