From 372c9d47b3cad42432ee27b89347b06ccf9d9370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Fri, 26 Apr 2024 12:03:24 +0800 Subject: [PATCH] fix --- .github/workflows/release.yml | 19 +++++++++++-------- build.py | 11 +++++++---- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b9e74ef..9ec3181 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,29 +21,32 @@ jobs: with: sdk-version: 22621 - - - name: Install Qt + - name: Install Qt32 uses: jurplel/install-qt-action@v3.3.0 with: version: ${{ env.QT_VERSION }} host: windows target: desktop - arch: win64_msvc2019_64 + arch: win32_msvc2019 dir: ${{ runner.temp }} setup-python: true - - name: Install Qt32 + - name: Run build script 32 + run: python build.py 32 + + - name: Install Qt uses: jurplel/install-qt-action@v3.3.0 with: version: ${{ env.QT_VERSION }} host: windows target: desktop - arch: win32_msvc2019 + arch: win64_msvc2019_64 dir: ${{ runner.temp }} setup-python: true - - name: Run build script - run: python build.py - - name: Release + run: python build.py 64 + - name: Run build script + run: python build.py 0 + - name: Release LunaTranslator uses: softprops/action-gh-release@v2 with: tag_name: ${{ github.event.inputs.create_release }} diff --git a/build.py b/build.py index 7e128f7..edde858 100644 --- a/build.py +++ b/build.py @@ -1,5 +1,5 @@ -import os +import os,sys import shutil import subprocess @@ -16,6 +16,9 @@ def installVCLTL(): subprocess.run("cmd /c Install.cmd") installVCLTL() os.chdir(os.path.join(rootDir,'scripts')) -os.system('cmd /c build32.bat') -os.system('cmd /c build64.bat') -os.system('cmd /c pack.bat') +if int(sys.argv[1])==32: + os.system('cmd /c build32.bat') +elif int(sys.argv[1])==64: + os.system('cmd /c build64.bat') +else: + os.system('cmd /c pack.bat') \ No newline at end of file