mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-18 14:32:36 +00:00
Windows packaging: fail the configure when the OCCT glob matches nothing
The glob that replaced the hand-maintained OCCT DLL list traded a loud failure for a silent one. The old code named each DLL explicitly, so an unpopulated deps prefix made file(COPY) error out at configure time. A glob that matches nothing instead yields an empty list, copies nothing, and leaves the install manifest without a single TK*.dll -- producing a package that dies at launch with "error 126 (dependency not found)". This only bites source builds whose CMAKE_PREFIX_PATH lacks bin/occt (OCCT's install layout varies by version); CI populates it, so every shipped artifact is intact. Restore the loudness rather than ship a slicer without OpenCASCADE. Windows-only: every call site of the copy function is inside if (WIN32). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVzKmX6Y1aEteit1HTXG4Q
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
3d9b36f108
commit
d568e89c34
@@ -817,6 +817,15 @@ function(orcaslicer_copy_dlls target config postfix output_dlls)
|
||||
# TKOffset/TKBool/TKFeat. Glob everything instead; the built occt/ dir is the one
|
||||
# source of truth. (OCCT is Shared only on Windows — deps/OCCT/OCCT.cmake.)
|
||||
file(GLOB _occt_dlls "${CMAKE_PREFIX_PATH}/bin/occt/*.dll")
|
||||
# A glob that matches nothing yields an empty list and copies nothing, so the package
|
||||
# would ship with no OpenCASCADE at all and die at launch with error 126. The explicit
|
||||
# per-file list this replaced failed the configure instead. Keep that loudness.
|
||||
if (NOT _occt_dlls)
|
||||
message(FATAL_ERROR
|
||||
"No OCCT DLLs found in ${CMAKE_PREFIX_PATH}/bin/occt/. Build the dependencies "
|
||||
"first (build_release_vs2022.bat deps); refusing to package a slicer without "
|
||||
"OpenCASCADE, which would fail at startup with error 126.")
|
||||
endif ()
|
||||
file(COPY ${_occt_dlls}
|
||||
${CMAKE_PREFIX_PATH}/bin/freetype.dll
|
||||
DESTINATION ${_out_dir})
|
||||
|
||||
Reference in New Issue
Block a user