mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 00:55:09 -07:00
[Build] Keep Windows installs free of build-tree artifacts (#7316)
* [Build] Keep Windows installs free of build-tree artifacts
Several Windows packaging gaps could leak Visual Studio CMake build
output into the installed application or the NSIS installer:
- The per-app DLL sweep used
${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${CMAKE_BUILD_TYPE}, which is
empty on multi-config generators, collapsing the recursive
DIRECTORY install into the whole build tree (containing *.dir,
*_autogen, .qt, .qsb, x64, ...). Point it at the real per-config
output with $<TARGET_FILE_DIR:...> and exclude build artifacts.
- install(FILES ${OPENSSL_INCLUDE_DIRS} ...) tried to install OpenSSL
include directories as files. CMake refuses this
("install FILES given directory"); it only slipped through CI
because the vcpkg OpenSSL config leaves the variable empty. Remove it;
fixup_bundle already ships the OpenSSL runtime DLLs.
- The NSIS uninstaller only deleted *.exe/*.dll and a few known files,
so build-tree leftovers survived an uninstall/reinstall cycle. Wipe
the whole directory tree instead.
- Add a Windows CI gate that lists the packaged installer with 7-Zip
and fails the build if any build-tree artifact path is found.
* Update .ci/compile.sh
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
* [Build] Rework Windows installer artifact exclusions per review
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
This commit is contained in:
parent
b3c426cd43
commit
a5e94d8a4f
5 changed files with 74 additions and 20 deletions
|
|
@ -213,10 +213,19 @@ if(WIN32)
|
|||
list(APPEND libSearchDirs ${QT_LIBRARY_DIR})
|
||||
|
||||
install(
|
||||
DIRECTORY "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${CMAKE_BUILD_TYPE}/"
|
||||
DIRECTORY "$<TARGET_FILE_DIR:oracle>/"
|
||||
DESTINATION ./
|
||||
FILES_MATCHING
|
||||
PATTERN "*.dll"
|
||||
PATTERN "*.pdb" EXCLUDE
|
||||
PATTERN "*.dir*" EXCLUDE
|
||||
PATTERN "*_autogen*" EXCLUDE
|
||||
PATTERN "*.tlog*" EXCLUDE
|
||||
PATTERN "CMakeFiles*" EXCLUDE
|
||||
PATTERN "x64*" EXCLUDE
|
||||
PATTERN ".qt*" EXCLUDE
|
||||
PATTERN ".qsb*" EXCLUDE
|
||||
PATTERN ".lupdate*" EXCLUDE
|
||||
)
|
||||
|
||||
# Qt plugins: iconengines, platforms, styles, tls (Qt6)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue