Skip to content

Commit 629018d

Browse files
committed
added cppcheck-htmlreport to the Windows installer [skip ci]
1 parent b91eca7 commit 629018d

2 files changed

Lines changed: 22 additions & 7 deletions

File tree

.github/workflows/release-windows.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ jobs:
7777
7878
- name: Build x64 release GUI
7979
run: |
80-
; TODO: enable rules?
81-
; specify Release build so matchcompiler is used
80+
:: TODO: enable rules?
81+
:: specify Release build so matchcompiler is used
8282
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
8383
cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel!
8484
85+
# TODO: package PDBs
8586
- name: Deploy app
8687
run: |
8788
windeployqt build\bin\Release || exit /b !errorlevel!
@@ -95,13 +96,22 @@ jobs:
9596
- name: Build CLI x64 release configuration using MSBuild
9697
run: msbuild -m cppcheck.sln -t:cli -p:Configuration=Release-PCRE -p:Platform=x64 || exit /b !errorlevel!
9798

98-
- name: Compile misra.py executable
99+
- name: Install missing Python packages
99100
run: |
100101
pip install -U pyinstaller || exit /b !errorlevel!
102+
103+
- name: Compile misra.py executable
104+
run: |
101105
cd addons || exit /b !errorlevel!
102106
pyinstaller --hidden-import xml --hidden-import xml.etree --hidden-import xml.etree.ElementTree misra.py || exit /b !errorlevel!
103107
del *.spec || exit /b !errorlevel!
104108
109+
- name: Compile cppcheck-htmlreport executable
110+
run: |
111+
cd htmlreport || exit /b !errorlevel!
112+
pyinstaller cppcheck-htmlreport || exit /b !errorlevel!
113+
del *.spec || exit /b !errorlevel!
114+
105115
- name: Collect files
106116
run: |
107117
@echo on
@@ -113,6 +123,7 @@ jobs:
113123
xcopy /s gui\help win_installer\files\help || exit /b !errorlevel!
114124
del win_installer\files\translations\*.qm || exit /b !errorlevel!
115125
move gui\*.qm win_installer\files\translations || exit /b !errorlevel!
126+
copy htmlreport\dist\cppcheck-htmlreport\*.* win_installer\files || exit /b !errorlevel!
116127
:: copy libcrypto-3-x64.dll and libssl-3-x64.dll
117128
copy %RUNNER_WORKSPACE%\Qt\Tools\OpenSSLv3\Win_x64\bin\lib*.dll win_installer\files || exit /b !errorlevel!
118129

lib/cppcheck.vcxproj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@
325325
<LargeAddressAware>true</LargeAddressAware>
326326
</Link>
327327
<PostBuildEvent>
328-
<Command>xcopy "$(SolutionDir)addons" "$(OutDir)addons" /E /I /D /Y
328+
<Command>xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
329+
xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
329330
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
330331
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
331332
</PostBuildEvent>
@@ -357,7 +358,8 @@ xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
357358
<LargeAddressAware>true</LargeAddressAware>
358359
</Link>
359360
<PostBuildEvent>
360-
<Command>xcopy "$(SolutionDir)addons" "$(OutDir)addons" /E /I /D /Y
361+
<Command>xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
362+
xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
361363
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
362364
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
363365
</PostBuildEvent>
@@ -397,7 +399,8 @@ xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
397399
<LargeAddressAware>true</LargeAddressAware>
398400
</Link>
399401
<PostBuildEvent>
400-
<Command>xcopy "$(SolutionDir)addons" "$(OutDir)addons" /E /I /D /Y
402+
<Command>xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
403+
xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
401404
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
402405
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
403406
</PostBuildEvent>
@@ -438,7 +441,8 @@ xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
438441
<LargeAddressAware>true</LargeAddressAware>
439442
</Link>
440443
<PostBuildEvent>
441-
<Command>xcopy "$(SolutionDir)addons" "$(OutDir)addons" /E /I /D /Y
444+
<Command>xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
445+
xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
442446
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
443447
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
444448
</PostBuildEvent>

0 commit comments

Comments
 (0)