From 1888e512f88a14a6d2687ef758d93a38bef603aa Mon Sep 17 00:00:00 2001 From: hzqst <113660872@qq.com> Date: Sun, 1 Oct 2023 10:35:42 +0800 Subject: [PATCH] Update msbuild.yml --- .github/workflows/msbuild.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index ea96a19..452a163 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -124,7 +124,24 @@ jobs: - name: Build node-gyp working-directory: ${{env.GITHUB_WORKSPACE}} - run: build-nodegyp.bat + run: | + for /f "usebackq tokens=*" %%i in (`vswhere -version latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do ( + set InstallDir=%%i + ) + + cd CGANode + + if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" ( + + "%InstallDir%\Common7\Tools\vsdevcmd.bat" -arch=x86 + + call node-gyp configure build --arch=ia32 + + mkdir "..\build\Release\" + + copy "build\Release\node_cga.node" "..\build\Release\" + + ) shell: cmd - name: Deploy qt and msvc redistribution