Skip to content

Commit e195159

Browse files
authored
fixed #8659 - aligned contents of all install packages (danmar#6906)
1 parent 690aab5 commit e195159

File tree

8 files changed

+65
-8
lines changed

8 files changed

+65
-8
lines changed

.github/workflows/release-windows.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
8080
cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel!
8181
82+
# TODO: package PDBs
8283
- name: Deploy app
8384
run: |
8485
windeployqt build\bin\Release || exit /b !errorlevel!
@@ -103,24 +104,48 @@ jobs:
103104
name: bin
104105
path: bin
105106

106-
- name: Compile misra.py executable
107+
- name: Install missing Python packages
107108
run: |
108109
pip install -U pyinstaller || exit /b !errorlevel!
110+
111+
# TODO: include in installer?
112+
- name: Compile misra.py executable
113+
run: |
109114
cd addons || exit /b !errorlevel!
110115
pyinstaller --hidden-import xml --hidden-import xml.etree --hidden-import xml.etree.ElementTree misra.py || exit /b !errorlevel!
111116
del *.spec || exit /b !errorlevel!
112117
118+
# TODO: include in installer?
119+
- name: Compile cppcheck-htmlreport executable
120+
run: |
121+
cd htmlreport || exit /b !errorlevel!
122+
pyinstaller cppcheck-htmlreport || exit /b !errorlevel!
123+
del *.spec || exit /b !errorlevel!
124+
125+
# TODO: test the compiled Python files
126+
113127
- name: Collect files
114128
run: |
115129
@echo on
116130
move build\bin\Release win_installer\files || exit /b !errorlevel!
131+
copy AUTHORS win_installer\files\authors.txt || exit /b !errorlevel!
132+
copy readme.txt win_installer\files\ || exit /b !errorlevel!
133+
copy win_installer\GPLv3.txt win_installer\files\ || exit /b !errorlevel!
134+
copy externals\picojson\LICENSE win_installer\files\picojson-license.txt || exit /b !errorlevel!
135+
copy externals\simplecpp\LICENSE win_installer\files\simplecpp-license.txt || exit /b !errorlevel!
136+
copy externals\tinyxml2\LICENSE win_installer\files\tinyxml2-license.txt || exit /b !errorlevel!
117137
copy addons\dist\misra\*.* win_installer\files\addons || exit /b !errorlevel!
118138
copy bin\cppcheck.exe win_installer\files || exit /b !errorlevel!
119139
copy bin\cppcheck-core.dll win_installer\files || exit /b !errorlevel!
120140
:: mkdir win_installer\files\help || exit /b !errorlevel!
121141
xcopy /s gui\help win_installer\files\help || exit /b !errorlevel!
142+
copy gui\help\online-help.qhc win_installer\files\ || exit /b !errorlevel!
143+
copy gui\help\online-help.qch win_installer\files\ || exit /b !errorlevel!
144+
del win_installer\files\cfg\*.rng || exit /b !errorlevel!
145+
del win_installer\files\platforms\*.rng || exit /b !errorlevel!
122146
del win_installer\files\translations\*.qm || exit /b !errorlevel!
123147
move build\gui\*.qm win_installer\files\translations || exit /b !errorlevel!
148+
copy htmlreport\dist\cppcheck-htmlreport\*.* win_installer\files || exit /b !errorlevel!
124149
:: copy libcrypto-3-x64.dll and libssl-3-x64.dll
125150
copy %RUNNER_WORKSPACE%\Qt\Tools\OpenSSLv3\Win_x64\bin\lib*.dll win_installer\files || exit /b !errorlevel!
126151
@@ -148,16 +173,25 @@ jobs:
148173
run: |
149174
@echo on
150175
:: del win_installer\files\addons\*.dll || exit /b !errorlevel!
176+
del win_installer\files\addons\*.doxyfile || exit /b !errorlevel!
177+
del win_installer\files\addons\*.md || exit /b !errorlevel!
151178
:: del win_installer\files\addons\*.pyd || exit /b !errorlevel!
152179
:: del win_installer\files\addons\base_library.zip || exit /b !errorlevel!
180+
rmdir /s /q win_installer\files\addons\test || exit /b !errorlevel!
181+
rmdir /s /q win_installer\files\addons\doc || exit /b !errorlevel!
153182
:: rmdir /s /q win_installer\files\bearer || exit /b !errorlevel!
183+
rmdir /s /q win_installer\files\generic || exit /b !errorlevel!
154184
rmdir /s /q win_installer\files\help || exit /b !errorlevel!
155185
rmdir /s /q win_installer\files\iconengines || exit /b !errorlevel!
156186
rmdir /s /q win_installer\files\imageformats || exit /b !errorlevel!
187+
rmdir /s /q win_installer\files\networkinformation || exit /b !errorlevel!
157188
:: rmdir /s /q win_installer\files\printsupport || exit /b !errorlevel!
158189
rmdir /s /q win_installer\files\sqldrivers || exit /b !errorlevel!
190+
rmdir /s /q win_installer\files\tls || exit /b !errorlevel!
159191
ren win_installer\files\translations lang || exit /b !errorlevel!
160192
del win_installer\files\d3dcompiler_47.dll || exit /b !errorlevel!
193+
del win_installer\files\dxcompiler.dll || exit /b !errorlevel!
194+
del win_installer\files\dxil.dll || exit /b !errorlevel!
161195
del win_installer\files\dmake.exe || exit /b !errorlevel!
162196
del win_installer\files\dmake.pdb || exit /b !errorlevel!
163197
:: del win_installer\files\libEGL.dll || exit /b !errorlevel!

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,9 @@ compile_commands.json
113113

114114
# GDB configuration
115115
.gdbinit
116+
117+
# pyinstaller output
118+
/addons/dist
119+
/addons/misra.spec
120+
/htmlreport/cppcheck-htmlreport.spec
121+
/htmlreport/dist

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ endif()
2626
include(cmake/printInfo.cmake)
2727

2828

29-
file(GLOB addons "addons/*.py")
29+
file(GLOB addons_py "addons/*.py")
30+
file(GLOB addons_json "addons/*.json")
3031
file(GLOB cfgs "cfg/*.cfg")
3132
file(GLOB platforms "platforms/*.xml")
3233

@@ -85,6 +86,7 @@ add_custom_target(copy_cfg ALL
8586
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/cfg"
8687
COMMENT "Copying cfg files to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}")
8788

89+
# TODO: copy *.py and *.json only
8890
add_custom_target(copy_addons ALL
8991
${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/addons"
9092
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/addons"

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ install: cppcheck
395395
ifdef FILESDIR
396396
install -d ${DESTDIR}${FILESDIR}
397397
install -d ${DESTDIR}${FILESDIR}/addons
398+
install -m 644 addons/*.json ${DESTDIR}${FILESDIR}/addons
398399
install -m 644 addons/*.py ${DESTDIR}${FILESDIR}/addons
399400
install -d ${DESTDIR}${FILESDIR}/cfg
400401
install -m 644 cfg/*.cfg ${DESTDIR}${FILESDIR}/cfg

cli/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,15 @@ if (BUILD_CLI)
7575
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
7676
COMPONENT applications)
7777

78-
install(FILES ${addons}
78+
install(PROGRAMS ${CMAKE_SOURCE_DIR}/htmlreport/cppcheck-htmlreport
79+
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
80+
COMPONENT applications)
81+
82+
install(FILES ${addons_py}
83+
DESTINATION ${FILESDIR_DEF}/addons
84+
COMPONENT headers)
85+
86+
install(FILES ${addons_json}
7987
DESTINATION ${FILESDIR_DEF}/addons
8088
COMPONENT headers)
8189

lib/cppcheck.vcxproj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@
278278
<LargeAddressAware>true</LargeAddressAware>
279279
</Link>
280280
<PostBuildEvent>
281-
<Command>xcopy "$(SolutionDir)addons" "$(OutDir)addons" /E /I /D /Y
281+
<Command>xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
282+
xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
282283
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
283284
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
284285
</PostBuildEvent>
@@ -310,7 +311,8 @@ xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
310311
<LargeAddressAware>true</LargeAddressAware>
311312
</Link>
312313
<PostBuildEvent>
313-
<Command>xcopy "$(SolutionDir)addons" "$(OutDir)addons" /E /I /D /Y
314+
<Command>xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
315+
xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
314316
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
315317
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
316318
</PostBuildEvent>
@@ -350,7 +352,8 @@ xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
350352
<LargeAddressAware>true</LargeAddressAware>
351353
</Link>
352354
<PostBuildEvent>
353-
<Command>xcopy "$(SolutionDir)addons" "$(OutDir)addons" /E /I /D /Y
355+
<Command>xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
356+
xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
354357
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
355358
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
356359
</PostBuildEvent>
@@ -391,7 +394,8 @@ xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
391394
<LargeAddressAware>true</LargeAddressAware>
392395
</Link>
393396
<PostBuildEvent>
394-
<Command>xcopy "$(SolutionDir)addons" "$(OutDir)addons" /E /I /D /Y
397+
<Command>xcopy "$(SolutionDir)addons/*.py" "$(OutDir)addons" /E /I /D /Y
398+
xcopy "$(SolutionDir)addons/*.json" "$(OutDir)addons" /E /I /D /Y
395399
xcopy "$(SolutionDir)cfg" "$(OutDir)cfg" /E /I /D /Y
396400
xcopy "$(SolutionDir)platforms" "$(OutDir)platforms" /E /I /D /Y</Command>
397401
</PostBuildEvent>

tools/dmake/dmake.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ int main(int argc, char **argv)
773773
fout << "ifdef FILESDIR\n";
774774
fout << "\tinstall -d ${DESTDIR}${FILESDIR}\n";
775775
fout << "\tinstall -d ${DESTDIR}${FILESDIR}/addons\n";
776+
fout << "\tinstall -m 644 addons/*.json ${DESTDIR}${FILESDIR}/addons\n";
776777
fout << "\tinstall -m 644 addons/*.py ${DESTDIR}${FILESDIR}/addons\n";
777778
fout << "\tinstall -d ${DESTDIR}${FILESDIR}/cfg\n";
778779
fout << "\tinstall -m 644 cfg/*.cfg ${DESTDIR}${FILESDIR}/cfg\n";

win_installer/cppcheck.wxs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,16 @@
155155
</Directory>
156156
<Directory Id='AddonsFolder' Name='addons'>
157157
<Component Id='Addons' Guid='$(var.addonsGUID)'>
158+
<File Id='__init__.py' Name='__init__.py' Source='$(var.AddonsDir)\__init__.py' />
158159
<File Id='cppcheck.py' Name='cppcheck.py' Source='$(var.AddonsDir)\cppcheck.py' />
159160
<File Id='cppcheckdata.py' Name='cppcheckdata.py' Source='$(var.AddonsDir)\cppcheckdata.py' />
160161
<File Id='findcasts.py' Name='findcasts.py' Source='$(var.AddonsDir)\findcasts.py' />
161162
<File Id='misc.py' Name='misc.py' Source='$(var.AddonsDir)\misc.py' />
162163
<File Id='misra.py' Name='misra.py' Source='$(var.AddonsDir)\misra.py' />
163164
<File Id='misra_9.py' Name='misra_9.py' Source='$(var.AddonsDir)\misra_9.py' />
165+
<File Id='naming.py' Name='naming.py' Source='$(var.AddonsDir)\naming.py' />
164166
<File Id='namingng.json' Name='namingng.json' Source='$(var.AddonsDir)\namingng.json' />
165167
<File Id='namingng.config.json' Name='namingng.config.json' Source='$(var.AddonsDir)\namingng.config.json' />
166-
<File Id='naming.py' Name='naming.py' Source='$(var.AddonsDir)\naming.py' />
167168
<File Id='namingng.py' Name='namingng.py' Source='$(var.AddonsDir)\namingng.py' />
168169
<File Id='ROS_naming.json' Name='ROS_naming.json' Source='$(var.AddonsDir)\ROS_naming.json' />
169170
<File Id='runaddon.py' Name='runaddon.py' Source='$(var.AddonsDir)\runaddon.py' />

0 commit comments

Comments
 (0)