Skip to content

update READMECN.md

update READMECN.md #18

Workflow file for this run

name: MSBuild_win7
on:
push:
tags:
- "v*"
pull_request:
tags:
- "v*"
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release
jobs:
build:
runs-on: windows-2019
if: github.repository == 'hzqst/CGAssistant'
steps:
- uses: hzqst/[email protected]
- name: Add msbuild to PATH
uses: microsoft/[email protected]
with:
vs-version: '[15.9,16.12)'
- name: Install Qt
uses: jurplel/[email protected]
with:
version: 5.15.0
host: windows
target: desktop
arch: win32_msvc2019
install-deps: # optional, default is true
modules: # optional
cached: false # ${{ steps.cache-qt.outputs.cache-hit }}
tools : 'tools_qtcreator,9.,qt.tools.qtcreator'
- name: Initialize dependencies
working-directory: ${{env.GITHUB_WORKSPACE}}
run: git submodule update --init --recursive
- name: Initialize qhttp
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
cd qhttp
mkdir 3rdparty
cd 3rdparty
git clone https://github.com/nodejs/http-parser.git
shell: cmd
- name: Initialize boost
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
cd boost
bootstrap.bat
shell: cmd
- name: Build boost
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
set InstallDir=%%i
)
if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
"%InstallDir%\Common7\Tools\vsdevcmd.bat" -arch=x86 -winsdk=10.0.17763.0
cd boost
b2 --toolset=msvc-14.2 --with-date_time --with-thread --with-container --with-system --with-locale --with-serialization --with-regex --stagedir="stage" link=static variant=release address-model=32 stage
b2 --toolset=msvc-14.2 --with-date_time --with-thread --with-container --with-system --with-locale --with-serialization --with-regex --stagedir="stage" runtime-link=static link=static variant=release address-model=32 stage
)
shell: cmd
- name: Build CGAHook
working-directory: ${{env.GITHUB_WORKSPACE}}
run: MSBuild.exe CGAssistant.sln /t:CGAHook /p:Configuration=Release /p:Platform="x86" /p:PlatformToolset=v142
- name: Build qhttp
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
set InstallDir=%%i
)
if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
"%InstallDir%\Common7\Tools\vsdevcmd.bat" -arch=x86 -winsdk=10.0.17763.0
cd qhttp
qmake qhttp.pro -spec win32-msvc "CONFIG+=32bit" "CONFIG+=qtquickcompiler release" "INCLUDEPATH+=%GITHUB_WORKSPACE%\winsdk\Include\10.0.17763.0\ucrt" "LIBS += -L%GITHUB_WORKSPACE%\winsdk\Lib\10.0.17763.0\um\x86" "LIBS += -L%GITHUB_WORKSPACE%\winsdk\Lib\10.0.17763.0\ucrt\x86"
"${{env.Qt5_Dir}}/../../Tools/QtCreator/bin/jom/jom.exe" -f MakeFile qmake_all
"${{env.Qt5_Dir}}/../../Tools/QtCreator/bin/jom/jom.exe"
copy "%GITHUB_WORKSPACE%\qhttp\xbin\qhttp.dll" "%GITHUB_WORKSPACE%\build\"
)
shell: cmd
- name: Build CGAssistant
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
set InstallDir=%%i
)
if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
"%InstallDir%\Common7\Tools\vsdevcmd.bat" -arch=x86 -winsdk=10.0.17763.0
cd CGAssistant
qmake CGAssistant.pro -spec win32-msvc "CONFIG+=32bit" "CONFIG+=qtquickcompiler release" "INCLUDEPATH+=%GITHUB_WORKSPACE%\winsdk\Include\10.0.17763.0\ucrt" "LIBS += -L%GITHUB_WORKSPACE%\winsdk\Lib\10.0.17763.0\um\x86" "LIBS += -L%GITHUB_WORKSPACE%\winsdk\Lib\10.0.17763.0\ucrt\x86"
"${{env.Qt5_Dir}}/../../Tools/QtCreator/bin/jom/jom.exe" -f MakeFile qmake_all
"${{env.Qt5_Dir}}/../../Tools/QtCreator/bin/jom/jom.exe"
copy "%GITHUB_WORKSPACE%\CGassistant\release\CGassistant.exe" "%GITHUB_WORKSPACE%\build\"
)
shell: cmd
- name: Setup node environment
uses: actions/setup-node@v2
with:
node-version: '16'
architecture: 'x86'
- name: Print Node.js version and path
run: |
node -v
where node
- name: Install node-gyp
working-directory: ${{env.GITHUB_WORKSPACE}}
run: npm install -g node-gyp
- name: Build node-gyp
working-directory: ${{env.GITHUB_WORKSPACE}}
run: build-nodegyp.bat
shell: cmd
- name: Deploy qt and msvc redistribution
working-directory: ${{env.GITHUB_WORKSPACE}}
run: windeploy.bat
shell: cmd
- name: Create Output directory
working-directory: ${{env.GITHUB_WORKSPACE}}
run: mkdir Output
shell: cmd
- name: Copy Build to Output
working-directory: ${{env.GITHUB_WORKSPACE}}
run: xcopy "build" "Output" /y /e
shell: cmd
- name: Copy node.exe
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
echo "Current PATH: $env:PATH"
$nodePath = (Get-Command node).Source
echo "Node.js path: $nodePath"
Copy-Item -Path $nodePath -Destination "Output/node.exe" -Force
shell: pwsh
- name: Checkout CGAssistantJS
uses: hzqst/checkout@main
with:
repository: 'hzqst/CGAssistantJS'
path: 'CGAssistantJS'
- name: npm install in CGAssistantJS
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
cd CGAssistantJS
npm install
shell: cmd
- name: Copy CGAssistantJS to Output
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
chcp 936
xcopy "CGAssistantJS" "Output" /y /e
shell: cmd
- name: Zipping All
uses: hzqst/action-zip@master
with:
files: Output/
dest: CGAssistant-windows-x86-win7.zip
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: CGAssistant-${{ github.ref }}
files: |
CGAssistant-windows-x86-win7.zip