Skip to content

Commit 501f329

Browse files
committed
fixed #12066 - use Qt6 for official Windows release / some cleanups
1 parent 93ea424 commit 501f329

3 files changed

Lines changed: 46 additions & 34 deletions

File tree

.github/workflows/release-windows.yml

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
env:
2828
# see https://www.pcre.org/original/changelog.txt
2929
PCRE_VERSION: 8.45
30-
QT_VERSION: 5.15.2
30+
QT_VERSION: 6.8.0
3131

3232
steps:
3333
- uses: actions/checkout@v4
@@ -69,11 +69,12 @@ jobs:
6969
tools: 'tools_opensslv3_x64'
7070
cache: true
7171

72+
# TODO: build with multiple threads
7273
- name: Build x64 release GUI
7374
run: |
7475
:: TODO: enable rules?
7576
:: specify Release build so matchcompiler is used
76-
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
77+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
7778
cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel!
7879
7980
- name: Deploy app
@@ -82,13 +83,24 @@ jobs:
8283
del build\bin\Release\cppcheck-gui.ilk || exit /b !errorlevel!
8384
del build\bin\Release\cppcheck-gui.pdb || exit /b !errorlevel!
8485
86+
- uses: actions/upload-artifact@v4
87+
with:
88+
name: deploy
89+
path: build\bin\Release
90+
8591
- name: Matchcompiler
8692
run: python tools\matchcompiler.py --write-dir lib || exit /b !errorlevel!
8793

94+
# TODO: build with multiple threads
8895
# TODO: build with boost enabled
8996
- name: Build CLI x64 release configuration using MSBuild
9097
run: msbuild -m cppcheck.sln -t:cli -p:Configuration=Release-PCRE -p:Platform=x64 || exit /b !errorlevel!
9198

99+
- uses: actions/upload-artifact@v4
100+
with:
101+
name: bin
102+
path: bin
103+
92104
- name: Compile misra.py executable
93105
run: |
94106
pip install -U pyinstaller || exit /b !errorlevel!
@@ -103,13 +115,18 @@ jobs:
103115
copy addons\dist\misra\*.* win_installer\files\addons || exit /b !errorlevel!
104116
copy bin\cppcheck.exe win_installer\files || exit /b !errorlevel!
105117
copy bin\cppcheck-core.dll win_installer\files || exit /b !errorlevel!
106-
mkdir win_installer\files\help || exit /b !errorlevel!
118+
:: mkdir win_installer\files\help || exit /b !errorlevel!
107119
xcopy /s gui\help win_installer\files\help || exit /b !errorlevel!
108120
del win_installer\files\translations\*.qm || exit /b !errorlevel!
109121
move build\gui\*.qm win_installer\files\translations || exit /b !errorlevel!
110122
:: copy libcrypto-3-x64.dll and libssl-3-x64.dll
111123
copy %RUNNER_WORKSPACE%\Qt\Tools\OpenSSLv3\Win_x64\bin\lib*.dll win_installer\files || exit /b !errorlevel!
112124
125+
- uses: actions/upload-artifact@v4
126+
with:
127+
name: collect
128+
path: win_installer\files
129+
113130
- name: Build Installer
114131
run: |
115132
cd win_installer || exit /b !errorlevel!
@@ -125,28 +142,26 @@ jobs:
125142
name: installer
126143
path: win_installer/Build/
127144

128-
- uses: actions/upload-artifact@v4
129-
with:
130-
name: deploy
131-
path: win_installer\files
132-
133145
- name: Clean up deploy
134146
run: |
135-
del win_installer\files\addons\*.dll || exit /b !errorlevel!
136-
del win_installer\files\addons\*.pyd || exit /b !errorlevel!
137-
del win_installer\files\addons\base_library.zip || exit /b !errorlevel!
138-
rmdir /s /q win_installer\files\bearer || exit /b !errorlevel!
147+
@echo on
148+
:: del win_installer\files\addons\*.dll || exit /b !errorlevel!
149+
:: del win_installer\files\addons\*.pyd || exit /b !errorlevel!
150+
:: del win_installer\files\addons\base_library.zip || exit /b !errorlevel!
151+
:: rmdir /s /q win_installer\files\bearer || exit /b !errorlevel!
139152
rmdir /s /q win_installer\files\help || exit /b !errorlevel!
140153
rmdir /s /q win_installer\files\iconengines || exit /b !errorlevel!
141154
rmdir /s /q win_installer\files\imageformats || exit /b !errorlevel!
142-
rmdir /s /q win_installer\files\printsupport || exit /b !errorlevel!
155+
:: rmdir /s /q win_installer\files\printsupport || exit /b !errorlevel!
143156
rmdir /s /q win_installer\files\sqldrivers || exit /b !errorlevel!
144157
ren win_installer\files\translations lang || exit /b !errorlevel!
145158
del win_installer\files\d3dcompiler_47.dll || exit /b !errorlevel!
146-
del win_installer\files\libEGL.dll || exit /b !errorlevel!
147-
del win_installer\files\libGLESv2.dll || exit /b !errorlevel!
159+
del win_installer\files\dmake.exe || exit /b !errorlevel!
160+
del win_installer\files\dmake.pdb || exit /b !errorlevel!
161+
:: del win_installer\files\libEGL.dll || exit /b !errorlevel!
162+
:: del win_installer\files\libGLESv2.dll || exit /b !errorlevel!
148163
del win_installer\files\opengl32sw.dll || exit /b !errorlevel!
149-
del win_installer\files\Qt5Svg.dll || exit /b !errorlevel!
164+
del win_installer\files\Qt6Svg.dll || exit /b !errorlevel!
150165
del win_installer\files\vc_redist.x64.exe || exit /b !errorlevel!
151166
152167
- uses: actions/upload-artifact@v4

win_installer/config.wxi

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99
<?define AddonsDir = "files\addons" ?>
1010
<?define QtDllDir = "files" ?>
1111

12-
<?if $(var.Platform) = x64 ?>
13-
<?define CrtMergeModule = "$(env.VCINSTALLDIR)Redist\MSVC\v143\MergeModules\Microsoft_VC143_CRT_x64.msm" ?>
14-
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
15-
<?else?>
16-
<?define CrtMergeModule = "$(env.VCINSTALLDIR)Redist\MSVC\v143\MergeModules\Microsoft_VC143_CRT_x86.msm" ?>
17-
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
18-
<?endif?>
12+
<?define CrtMergeModule = "$(env.VCINSTALLDIR)Redist\MSVC\v143\MergeModules\Microsoft_VC143_CRT_x64.msm" ?>
13+
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
1914
</Include>

win_installer/cppcheck.wxs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<Media Id='1' Cabinet='Cppcheck.cab' EmbedCab='yes' CompressionLevel='high' DiskPrompt='CD-ROM 1' />
1414
<Property Id='DiskPrompt' Value='Cppcheck installation [1]' />
1515

16+
<!-- TODO: what is DiskId for? It is used inconsistently -->
1617
<Directory Id='TARGETDIR' Name='SourceDir'>
1718
<Directory Id='System32' FileSource='SystemFolder' />
1819
<Directory Id='$(var.PlatformProgramFilesFolder)' Name='PFiles'>
@@ -36,16 +37,16 @@
3637
</File>
3738
<File Id='onlinehelpqhc' Name='online-help.qhc' Source='$(var.GuiHelpDir)\online-help.qhc' />
3839
<File Id='onlinehelpqch' Name='online-help.qch' Source='$(var.GuiHelpDir)\online-help.qch' />
39-
<File Id='Qt5Coredll' Name='Qt5Core.dll' Source='$(var.QtDllDir)\Qt5Core.dll' />
40-
<File Id='Qt5Guidll' Name='Qt5Gui.dll' Source='$(var.QtDllDir)\Qt5Gui.dll' />
41-
<File Id='Qt5Helpdll' Name='Qt5Help.dll' Source='$(var.QtDllDir)\Qt5Help.dll' />
42-
<File Id='Qt5Sqldll' Name='Qt5Sql.dll' Source='$(var.QtDllDir)\Qt5Sql.dll' />
43-
<File Id='Qt5Widgetsdll' Name='Qt5Widgets.dll' Source='$(var.QtDllDir)\Qt5Widgets.dll' />
44-
<File Id='Qt5PrintSupportdll' Name='Qt5PrintSupport.dll' Source='$(var.QtDllDir)\Qt5PrintSupport.dll' />
45-
<?if $(var.Platform) = x64 ?>
46-
<File Id='Qt5Chartsdll' Name='Qt5Charts.dll' Source='$(var.QtDllDir)\Qt5Charts.dll' />
47-
<?endif?>
48-
<File Id='Qt5Network.dll' Name='Qt5Network.dll' DiskId='1' Source='$(var.QtDllDir)\Qt5Network.dll' />
40+
<File Id='Qt6Coredll' Name='Qt6Core.dll' Source='$(var.QtDllDir)\Qt6Core.dll' />
41+
<File Id='Qt6Guidll' Name='Qt6Gui.dll' Source='$(var.QtDllDir)\Qt6Gui.dll' />
42+
<File Id='Qt6Helpdll' Name='Qt6Help.dll' Source='$(var.QtDllDir)\Qt6Help.dll' />
43+
<File Id='Qt6Sqldll' Name='Qt6Sql.dll' Source='$(var.QtDllDir)\Qt6Sql.dll' />
44+
<File Id='Qt6Widgetsdll' Name='Qt6Widgets.dll' Source='$(var.QtDllDir)\Qt6Widgets.dll' />
45+
<File Id='Qt6PrintSupportdll' Name='Qt6PrintSupport.dll' Source='$(var.QtDllDir)\Qt6PrintSupport.dll' />
46+
<File Id='Qt6Chartsdll' Name='Qt6Charts.dll' Source='$(var.QtDllDir)\Qt6Charts.dll' />
47+
<File Id='Qt6Network.dll' Name='Qt6Network.dll' DiskId='1' Source='$(var.QtDllDir)\Qt6Network.dll' />
48+
<File Id='Qt6OpenGL.dll' Name='Qt6OpenGL.dll' DiskId='1' Source='$(var.QtDllDir)\Qt6OpenGL.dll' />
49+
<File Id='Qt6OpenGLWidgets.dll' Name='Qt6OpenGLWidgets.dll' DiskId='1' Source='$(var.QtDllDir)\Qt6OpenGLWidgets.dll' />
4950
<File Id='libcrypto.dll' Name='libcrypto-3-x64.dll' DiskId='1' Source='$(var.QtDllDir)\libcrypto-3-x64.dll' />
5051
<File Id='libssl.dll' Name='libssl-3-x64.dll' DiskId='1' Source='$(var.QtDllDir)\libssl-3-x64.dll' />
5152
</Component>
@@ -56,7 +57,7 @@
5657
</Directory>
5758
<Directory Id='QtStylesFolder' Name='styles'>
5859
<Component Id='QtStyles' DiskId='1' Guid='$(var.qtstylesGUID)'>
59-
<File Id='qwindowsvistastyledll' Name='qwindowsvistastyle.dll' Source='$(var.QtDllDir)\styles\qwindowsvistastyle.dll' />
60+
<File Id='qmodernwindowsstyledll' Name='qmodernwindowsstyle.dll' Source='$(var.QtDllDir)\styles\qmodernwindowsstyle.dll' />
6061
</Component>
6162
</Directory>
6263
<Directory Id='TranslationsFolder' Name='lang'>
@@ -229,6 +230,7 @@
229230
</Feature>
230231

231232
<MajorUpgrade DowngradeErrorMessage='Downgrade is not allowed'/>
233+
<!-- TODO: remove old workarounds -->
232234
<!--Remove some pre 1.57 versions which can't be upgraded with MajorUpgrade-->
233235
<InstallExecuteSequence>
234236
<Custom Action='UninstallOld152' After='InstallFinalize'>NOT Installed</Custom>

0 commit comments

Comments
 (0)