diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml
index 2da689c3529..dc5cca2955c 100644
--- a/.github/workflows/release-windows.yml
+++ b/.github/workflows/release-windows.yml
@@ -79,6 +79,7 @@ jobs:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel!
+ # TODO: package PDBs
- name: Deploy app
run: |
windeployqt build\bin\Release || exit /b !errorlevel!
@@ -103,24 +104,48 @@ jobs:
name: bin
path: bin
- - name: Compile misra.py executable
+ - name: Install missing Python packages
run: |
pip install -U pyinstaller || exit /b !errorlevel!
+
+ # TODO: include in installer?
+ - name: Compile misra.py executable
+ run: |
cd addons || exit /b !errorlevel!
pyinstaller --hidden-import xml --hidden-import xml.etree --hidden-import xml.etree.ElementTree misra.py || exit /b !errorlevel!
del *.spec || exit /b !errorlevel!
+ # TODO: include in installer?
+ - name: Compile cppcheck-htmlreport executable
+ run: |
+ cd htmlreport || exit /b !errorlevel!
+ pyinstaller cppcheck-htmlreport || exit /b !errorlevel!
+ del *.spec || exit /b !errorlevel!
+
+ # TODO: test the compiled Python files
+
- name: Collect files
run: |
@echo on
move build\bin\Release win_installer\files || exit /b !errorlevel!
+ copy AUTHORS win_installer\files\authors.txt || exit /b !errorlevel!
+ copy readme.txt win_installer\files\ || exit /b !errorlevel!
+ copy win_installer\GPLv3.txt win_installer\files\ || exit /b !errorlevel!
+ copy externals\picojson\LICENSE win_installer\files\picojson-license.txt || exit /b !errorlevel!
+ copy externals\simplecpp\LICENSE win_installer\files\simplecpp-license.txt || exit /b !errorlevel!
+ copy externals\tinyxml2\LICENSE win_installer\files\tinyxml2-license.txt || exit /b !errorlevel!
copy addons\dist\misra\*.* win_installer\files\addons || exit /b !errorlevel!
copy bin\cppcheck.exe win_installer\files || exit /b !errorlevel!
copy bin\cppcheck-core.dll win_installer\files || exit /b !errorlevel!
:: mkdir win_installer\files\help || exit /b !errorlevel!
xcopy /s gui\help win_installer\files\help || exit /b !errorlevel!
+ copy gui\help\online-help.qhc win_installer\files\ || exit /b !errorlevel!
+ copy gui\help\online-help.qch win_installer\files\ || exit /b !errorlevel!
+ del win_installer\files\cfg\*.rng || exit /b !errorlevel!
+ del win_installer\files\platforms\*.rng || exit /b !errorlevel!
del win_installer\files\translations\*.qm || exit /b !errorlevel!
move build\gui\*.qm win_installer\files\translations || exit /b !errorlevel!
+ copy htmlreport\dist\cppcheck-htmlreport\*.* win_installer\files || exit /b !errorlevel!
:: copy libcrypto-3-x64.dll and libssl-3-x64.dll
copy %RUNNER_WORKSPACE%\Qt\Tools\OpenSSLv3\Win_x64\bin\lib*.dll win_installer\files || exit /b !errorlevel!
@@ -148,16 +173,25 @@ jobs:
run: |
@echo on
:: del win_installer\files\addons\*.dll || exit /b !errorlevel!
+ del win_installer\files\addons\*.doxyfile || exit /b !errorlevel!
+ del win_installer\files\addons\*.md || exit /b !errorlevel!
:: del win_installer\files\addons\*.pyd || exit /b !errorlevel!
:: del win_installer\files\addons\base_library.zip || exit /b !errorlevel!
+ rmdir /s /q win_installer\files\addons\test || exit /b !errorlevel!
+ rmdir /s /q win_installer\files\addons\doc || exit /b !errorlevel!
:: rmdir /s /q win_installer\files\bearer || exit /b !errorlevel!
+ rmdir /s /q win_installer\files\generic || exit /b !errorlevel!
rmdir /s /q win_installer\files\help || exit /b !errorlevel!
rmdir /s /q win_installer\files\iconengines || exit /b !errorlevel!
rmdir /s /q win_installer\files\imageformats || exit /b !errorlevel!
+ rmdir /s /q win_installer\files\networkinformation || exit /b !errorlevel!
:: rmdir /s /q win_installer\files\printsupport || exit /b !errorlevel!
rmdir /s /q win_installer\files\sqldrivers || exit /b !errorlevel!
+ rmdir /s /q win_installer\files\tls || exit /b !errorlevel!
ren win_installer\files\translations lang || exit /b !errorlevel!
del win_installer\files\d3dcompiler_47.dll || exit /b !errorlevel!
+ del win_installer\files\dxcompiler.dll || exit /b !errorlevel!
+ del win_installer\files\dxil.dll || exit /b !errorlevel!
del win_installer\files\dmake.exe || exit /b !errorlevel!
del win_installer\files\dmake.pdb || exit /b !errorlevel!
:: del win_installer\files\libEGL.dll || exit /b !errorlevel!
diff --git a/.gitignore b/.gitignore
index 432ecf71808..bcc91b69fcb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -113,3 +113,9 @@ compile_commands.json
# GDB configuration
.gdbinit
+
+# pyinstaller output
+/addons/dist
+/addons/misra.spec
+/htmlreport/cppcheck-htmlreport.spec
+/htmlreport/dist
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a3b6da6b440..18b0d0c94fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,8 @@ endif()
include(cmake/printInfo.cmake)
-file(GLOB addons "addons/*.py")
+file(GLOB addons_py "addons/*.py")
+file(GLOB addons_json "addons/*.json")
file(GLOB cfgs "cfg/*.cfg")
file(GLOB platforms "platforms/*.xml")
@@ -85,6 +86,7 @@ add_custom_target(copy_cfg ALL
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/cfg"
COMMENT "Copying cfg files to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}")
+# TODO: copy *.py and *.json only
add_custom_target(copy_addons ALL
${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/addons"
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/addons"
diff --git a/Makefile b/Makefile
index b19f746feae..bc13248e979 100644
--- a/Makefile
+++ b/Makefile
@@ -395,6 +395,7 @@ install: cppcheck
ifdef FILESDIR
install -d ${DESTDIR}${FILESDIR}
install -d ${DESTDIR}${FILESDIR}/addons
+ install -m 644 addons/*.json ${DESTDIR}${FILESDIR}/addons
install -m 644 addons/*.py ${DESTDIR}${FILESDIR}/addons
install -d ${DESTDIR}${FILESDIR}/cfg
install -m 644 cfg/*.cfg ${DESTDIR}${FILESDIR}/cfg
diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt
index c05743becb3..22f17dda390 100644
--- a/cli/CMakeLists.txt
+++ b/cli/CMakeLists.txt
@@ -75,7 +75,15 @@ if (BUILD_CLI)
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
COMPONENT applications)
- install(FILES ${addons}
+ install(PROGRAMS ${CMAKE_SOURCE_DIR}/htmlreport/cppcheck-htmlreport
+ RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
+ COMPONENT applications)
+
+ install(FILES ${addons_py}
+ DESTINATION ${FILESDIR_DEF}/addons
+ COMPONENT headers)
+
+ install(FILES ${addons_json}
DESTINATION ${FILESDIR_DEF}/addons
COMPONENT headers)
diff --git a/lib/cppcheck.vcxproj b/lib/cppcheck.vcxproj
index ad00b1d8c0b..6074eb664cb 100644
--- a/lib/cppcheck.vcxproj
+++ b/lib/cppcheck.vcxproj
@@ -278,7 +278,8 @@
true
- xcopy "$(SolutionDir)addons" "$(OutDir)addons" /E /I /D /Y
+ xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
+xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y
@@ -310,7 +311,8 @@ xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y
true
- xcopy "$(SolutionDir)addons" "$(OutDir)addons" /E /I /D /Y
+ xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
+xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y
@@ -350,7 +352,8 @@ xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y
true
- xcopy "$(SolutionDir)addons" "$(OutDir)addons" /E /I /D /Y
+ xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
+xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y
@@ -391,7 +394,8 @@ xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y
true
- xcopy "$(SolutionDir)addons" "$(OutDir)addons" /E /I /D /Y
+ xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
+xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y
diff --git a/tools/dmake/dmake.cpp b/tools/dmake/dmake.cpp
index 356979895b5..b43e9da29eb 100644
--- a/tools/dmake/dmake.cpp
+++ b/tools/dmake/dmake.cpp
@@ -773,6 +773,7 @@ int main(int argc, char **argv)
fout << "ifdef FILESDIR\n";
fout << "\tinstall -d ${DESTDIR}${FILESDIR}\n";
fout << "\tinstall -d ${DESTDIR}${FILESDIR}/addons\n";
+ fout << "\tinstall -m 644 addons/*.json ${DESTDIR}${FILESDIR}/addons\n";
fout << "\tinstall -m 644 addons/*.py ${DESTDIR}${FILESDIR}/addons\n";
fout << "\tinstall -d ${DESTDIR}${FILESDIR}/cfg\n";
fout << "\tinstall -m 644 cfg/*.cfg ${DESTDIR}${FILESDIR}/cfg\n";
diff --git a/win_installer/cppcheck.wxs b/win_installer/cppcheck.wxs
index 984003eb6e8..703e340ec9b 100644
--- a/win_installer/cppcheck.wxs
+++ b/win_installer/cppcheck.wxs
@@ -155,15 +155,16 @@
+
+
-