Skip to content

Commit 2f4ec4b

Browse files
committed
Merge remote-tracking branch 'origin/dev'
2 parents 340007c + 596090e commit 2f4ec4b

41 files changed

Lines changed: 4394 additions & 633 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: Build OpenModSim Installer (Windows x86, Qt5)
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
env:
9+
QT_VERSION: 5.15.2
10+
QT_ARCH: win32_msvc2019
11+
CMAKE_COMPILER: msvc2019
12+
CMAKE_GENERATOR: "Visual Studio 17 2022"
13+
CMAKE_ARCH: Win32
14+
ARCH: x86
15+
BUILD_TYPE: Release
16+
17+
jobs:
18+
build-omodsim:
19+
name: Build OpenModSim installer version ${{ github.ref_name }} with Qt5 on Windows x86
20+
runs-on: windows-latest
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
with:
26+
ref: ${{ github.ref_name }}
27+
28+
- name: Extract version from CMakeLists.txt
29+
run: |
30+
for /f "tokens=2" %%i in ('findstr /R /C:"VERSION [0-9]*\.[0-9]*\.[0-9]*" omodsim\CMakeLists.txt') do echo APP_VERSION=%%i>>%GITHUB_ENV%
31+
shell: cmd
32+
33+
- name: Convert version for dev branch
34+
if: ${{ github.ref_name == 'dev' }}
35+
run: |
36+
for /f "tokens=1,2 delims=." %%a in ("%APP_VERSION%") do (
37+
echo APP_VERSION=%%a.%%b-dev>>%GITHUB_ENV%
38+
)
39+
shell: cmd
40+
41+
- name: Install Python (for aqtinstall)
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: "3.11"
45+
46+
- name: Install aqtinstall
47+
run: |
48+
python -m pip install aqtinstall
49+
50+
- name: Install Qt
51+
run: |
52+
python -m aqt install-qt windows desktop ${{ env.QT_VERSION }} ${{ env.QT_ARCH }} -O C:\Qt
53+
shell: cmd
54+
55+
- name: Set BUILD_DIR
56+
run: |
57+
echo BUILD_DIR=build-omodsim-Qt_${{ env.QT_VERSION }}_${{ env.CMAKE_COMPILER }}bit-${{ env.BUILD_TYPE }}>>%GITHUB_ENV%
58+
shell: cmd
59+
60+
- name: Setup MSBuild
61+
uses: microsoft/setup-msbuild@v1.3.2
62+
with:
63+
vs-version: '16.11'
64+
65+
- name: Configure CMake
66+
run: |
67+
cmake omodsim -B ${{ env.BUILD_DIR }} -G "${{ env.CMAKE_GENERATOR }}" -A ${{ env.CMAKE_ARCH }} -T v142 -DCMAKE_PREFIX_PATH="C:/Qt/${{ env.QT_VERSION }}/${{ env.CMAKE_COMPILER }}"
68+
shell: cmd
69+
70+
- name: Build
71+
run: |
72+
cmake --build ${{ env.BUILD_DIR }} --config ${{ env.BUILD_TYPE }} --parallel
73+
shell: cmd
74+
75+
- name: Copy docs
76+
run: xcopy %CD%\${{ env.BUILD_DIR }}\docs %CD%\${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}\docs /E /I /Y
77+
shell: cmd
78+
79+
- name: Get Visual Studio path
80+
run: |
81+
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" ^
82+
-latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set VS_PATH=%%i
83+
echo VS_PATH=%VS_PATH%>>%GITHUB_ENV%
84+
shell: cmd
85+
86+
- name: Deploy Qt dependencies using windeployqt
87+
run: |
88+
call "${{ env.VS_PATH }}\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.29
89+
"C:\Qt\${{ env.QT_VERSION }}\${{ env.CMAKE_COMPILER }}\bin\windeployqt.exe" ^
90+
"%CD%\${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}\omodsim.exe" ^
91+
--release ^
92+
--no-opengl-sw ^
93+
--no-system-d3d-compiler ^
94+
--plugindir "%CD%\${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}\plugins"
95+
shell: cmd
96+
97+
- name: Install NSIS
98+
run: |
99+
choco install nsis -y
100+
shell: cmd
101+
102+
- name: Build NSIS installer
103+
run: |
104+
"C:\Program Files (x86)\NSIS\makensis.exe" ^
105+
/DVERSION="${{ env.APP_VERSION }}" ^
106+
/DBUILD_PATH="%CD%\${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}" ^
107+
/DICON_FILE="%CD%\omodsim\res\omodsim.ico" ^
108+
/DLICENSE_FILE="%CD%\omodsim\res\license.txt" ^
109+
/DOUTPUT_FILE="%CD%\qt5-omodsim-${{ env.APP_VERSION }}_${{ env.ARCH }}.exe" ^
110+
%CD%\.nsis\installer-win32.nsi
111+
shell: cmd
112+
113+
- name: Upload Installer
114+
uses: actions/upload-artifact@v4
115+
if: success()
116+
with:
117+
name: qt5-omodsim-${{ env.APP_VERSION }}_${{ env.ARCH }}
118+
path: qt5-omodsim-${{ env.APP_VERSION }}_${{ env.ARCH }}.exe
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: Build OpenModSim Installer (Windows x64, Qt5)
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
env:
9+
QT_VERSION: 5.15.2
10+
QT_ARCH: win64_msvc2019_64
11+
CMAKE_COMPILER: msvc2019_64
12+
CMAKE_GENERATOR: "Visual Studio 17 2022"
13+
CMAKE_ARCH: x64
14+
BUILD_TYPE: Release
15+
16+
jobs:
17+
build-omodsim:
18+
name: Build OpenModSim installer version ${{ github.ref_name }} with Qt5 on Windows x64
19+
runs-on: windows-latest
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.ref_name }}
26+
27+
- name: Extract version from CMakeLists.txt
28+
run: |
29+
for /f "tokens=2" %%i in ('findstr /R /C:"VERSION [0-9]*\.[0-9]*\.[0-9]*" omodsim\CMakeLists.txt') do echo APP_VERSION=%%i>>%GITHUB_ENV%
30+
shell: cmd
31+
32+
- name: Convert version for dev branch
33+
if: ${{ github.ref_name == 'dev' }}
34+
run: |
35+
for /f "tokens=1,2 delims=." %%a in ("%APP_VERSION%") do (
36+
echo APP_VERSION=%%a.%%b-dev>>%GITHUB_ENV%
37+
)
38+
shell: cmd
39+
40+
- name: Install Python (for aqtinstall)
41+
uses: actions/setup-python@v5
42+
with:
43+
python-version: "3.11"
44+
45+
- name: Install aqtinstall
46+
run: |
47+
python -m pip install aqtinstall
48+
49+
- name: Install Qt
50+
run: |
51+
python -m aqt install-qt windows desktop ${{ env.QT_VERSION }} ${{ env.QT_ARCH }} -O C:\Qt
52+
shell: cmd
53+
54+
- name: Set BUILD_DIR
55+
run: |
56+
echo BUILD_DIR=build-omodsim-Qt_${{ env.QT_VERSION }}_${{ env.CMAKE_COMPILER }}bit-${{ env.BUILD_TYPE }}>>%GITHUB_ENV%
57+
shell: cmd
58+
59+
- name: Setup MSBuild
60+
uses: microsoft/setup-msbuild@v1.3.2
61+
with:
62+
vs-version: '16.11'
63+
64+
- name: Configure CMake
65+
run: |
66+
cmake omodsim -B ${{ env.BUILD_DIR }} -G "${{ env.CMAKE_GENERATOR }}" -A ${{ env.CMAKE_ARCH }} -T v142 -DCMAKE_PREFIX_PATH="C:/Qt/${{ env.QT_VERSION }}/${{ env.CMAKE_COMPILER }}"
67+
shell: cmd
68+
69+
- name: Build
70+
run: |
71+
cmake --build ${{ env.BUILD_DIR }} --config ${{ env.BUILD_TYPE }} --parallel
72+
shell: cmd
73+
74+
- name: Copy docs
75+
run: xcopy %CD%\${{ env.BUILD_DIR }}\docs %CD%\${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}\docs /E /I /Y
76+
shell: cmd
77+
78+
- name: Get Visual Studio path
79+
run: |
80+
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" ^
81+
-latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set VS_PATH=%%i
82+
echo VS_PATH=%VS_PATH%>>%GITHUB_ENV%
83+
shell: cmd
84+
85+
- name: Deploy Qt dependencies using windeployqt
86+
run: |
87+
call "${{ env.VS_PATH }}\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.29
88+
"C:\Qt\${{ env.QT_VERSION }}\${{ env.CMAKE_COMPILER }}\bin\windeployqt.exe" ^
89+
"%CD%\${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}\omodsim.exe" ^
90+
--release ^
91+
--no-opengl-sw ^
92+
--no-system-d3d-compiler ^
93+
--plugindir "%CD%\${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}\plugins"
94+
shell: cmd
95+
96+
- name: Install NSIS
97+
run: |
98+
choco install nsis -y
99+
shell: cmd
100+
101+
- name: Build NSIS installer
102+
run: |
103+
"C:\Program Files (x86)\NSIS\makensis.exe" ^
104+
/DVERSION="${{ env.APP_VERSION }}" ^
105+
/DBUILD_PATH="%CD%\${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}" ^
106+
/DICON_FILE="%CD%\omodsim\res\omodsim.ico" ^
107+
/DLICENSE_FILE="%CD%\omodsim\res\license.txt" ^
108+
/DOUTPUT_FILE="%CD%\qt5-omodsim-${{ env.APP_VERSION }}_${{ env.CMAKE_ARCH }}.exe" ^
109+
%CD%\.nsis\installer-win64.nsi
110+
shell: cmd
111+
112+
- name: Upload Installer
113+
uses: actions/upload-artifact@v4
114+
if: success()
115+
with:
116+
name: qt5-omodsim-${{ env.APP_VERSION }}_${{ env.CMAKE_ARCH }}
117+
path: qt5-omodsim-${{ env.APP_VERSION }}_${{ env.CMAKE_ARCH }}.exe
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Build OpenModSim Installer (Windows x64, Qt6)
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
env:
9+
QT_VERSION: 6.9.3
10+
QT_ARCH: win64_msvc2022_64
11+
CMAKE_COMPILER: msvc2022_64
12+
CMAKE_GENERATOR: "Visual Studio 17 2022"
13+
CMAKE_ARCH: x64
14+
BUILD_TYPE: Release
15+
16+
jobs:
17+
build-omodsim:
18+
name: Build OpenModSim installer version ${{ github.ref_name }} with Qt6
19+
runs-on: windows-latest
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.ref_name }}
26+
27+
- name: Extract version from CMakeLists.txt
28+
run: |
29+
for /f "tokens=2" %%i in ('findstr /R /C:"VERSION [0-9]*\.[0-9]*\.[0-9]*" omodsim\CMakeLists.txt') do echo APP_VERSION=%%i>>%GITHUB_ENV%
30+
shell: cmd
31+
32+
- name: Convert version for dev branch
33+
if: ${{ github.ref_name == 'dev' }}
34+
run: |
35+
for /f "tokens=1,2 delims=." %%a in ("%APP_VERSION%") do (
36+
echo APP_VERSION=%%a.%%b-dev>>%GITHUB_ENV%
37+
)
38+
shell: cmd
39+
40+
- name: Install Python (for aqtinstall)
41+
uses: actions/setup-python@v5
42+
with:
43+
python-version: "3.11"
44+
45+
- name: Install aqtinstall
46+
run: |
47+
python -m pip install aqtinstall
48+
49+
- name: Install Qt
50+
run: |
51+
python -m aqt install-qt windows desktop ${{ env.QT_VERSION }} ${{ env.QT_ARCH }} -O C:\Qt -m qt5compat qtpdf qtserialport qtserialbus
52+
shell: cmd
53+
54+
- name: Set BUILD_DIR
55+
run: |
56+
echo BUILD_DIR=build-omodsim-Qt_${{ env.QT_VERSION }}_${{ env.CMAKE_COMPILER }}bit-${{ env.BUILD_TYPE }}>>%GITHUB_ENV%
57+
shell: cmd
58+
59+
- name: Configure CMake
60+
run: |
61+
cmake omodsim -B ${{ env.BUILD_DIR }} -G "${{ env.CMAKE_GENERATOR }}" -A ${{ env.CMAKE_ARCH }} -DCMAKE_PREFIX_PATH="C:/Qt/${{ env.QT_VERSION }}/${{ env.CMAKE_COMPILER }}"
62+
shell: cmd
63+
64+
- name: Build
65+
run: |
66+
cmake --build ${{ env.BUILD_DIR }} --config ${{ env.BUILD_TYPE }} --parallel
67+
shell: cmd
68+
69+
- name: Copy docs
70+
run: xcopy %CD%\${{ env.BUILD_DIR }}\docs %CD%\${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}\docs /E /I /Y
71+
shell: cmd
72+
73+
- name: Get Visual Studio path
74+
run: |
75+
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" ^
76+
-latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set VS_PATH=%%i
77+
echo VS_PATH=%VS_PATH%>>%GITHUB_ENV%
78+
shell: cmd
79+
80+
- name: Deploy Qt dependencies using windeployqt
81+
run: |
82+
call "${{ env.VS_PATH }}\VC\Auxiliary\Build\vcvars64.bat"
83+
"C:\Qt\${{ env.QT_VERSION }}\${{ env.CMAKE_COMPILER }}\bin\windeployqt.exe" ^
84+
"%CD%\${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}\omodsim.exe" ^
85+
--release ^
86+
--no-opengl-sw ^
87+
--plugindir "%CD%\${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}\plugins" ^
88+
--skip-plugin-types help,generic,networkinformation,qmltooling,tls ^
89+
--exclude-plugins qsqlibase,qsqlmimer,qsqloci,qsqlodbc,qsqlpsql
90+
shell: cmd
91+
92+
- name: Install NSIS
93+
run: |
94+
choco install nsis -y
95+
shell: cmd
96+
97+
- name: Build NSIS installer
98+
run: |
99+
"C:\Program Files (x86)\NSIS\makensis.exe" ^
100+
/DVERSION="${{ env.APP_VERSION }}" ^
101+
/DBUILD_PATH="%CD%\${{ env.BUILD_DIR }}\${{ env.BUILD_TYPE }}" ^
102+
/DICON_FILE="%CD%\omodsim\res\omodsim.ico" ^
103+
/DLICENSE_FILE="%CD%\omodsim\res\license.txt" ^
104+
/DOUTPUT_FILE="%CD%\qt6-omodsim-${{ env.APP_VERSION }}_${{ env.CMAKE_ARCH }}.exe" ^
105+
%CD%\.nsis\installer-win64.nsi
106+
shell: cmd
107+
108+
- name: Upload Installer
109+
uses: actions/upload-artifact@v4
110+
if: success()
111+
with:
112+
name: qt6-omodsim-${{ env.APP_VERSION }}_${{ env.CMAKE_ARCH }}
113+
path: qt6-omodsim-${{ env.APP_VERSION }}_${{ env.CMAKE_ARCH }}.exe

0 commit comments

Comments
 (0)