Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ jobs:
run: .build/debug/forge-cli run Tests/GoldenModelTests/Models/*.json --quiet
- name: MCP modeling workflows over stdio
run: python3 -m unittest discover -s Tests/IntegrationTests -v
- name: Packaging script regressions (BSD find)
run: python3 -m unittest discover -s Tests/PackagingTests -v
- name: Build app (Metal + SwiftUI)
if: always()
run: swift build --product ForgeApp
Expand Down
5 changes: 5 additions & 0 deletions Tests/PackagingTests/test_fetch_occt_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ def setUp(self):
if not os.environ.get('NO_LIBRARY'):
z.writestr('install/lib/TKernel.lib', 'fixture')
z.writestr('install/bin/TKernel.dll', 'fixture')
for excluded in ['qt-6/bin/QtCore.dll', 'debug/Debug.dll',
'plugins/plugin.dll', 'msvc-vc14-64/bin/msvcp140.dll']:
z.writestr('install/' + excluded, 'excluded fixture')
''')

def stub(self, name, body):
Expand Down Expand Up @@ -70,6 +73,8 @@ def test_environment_quotes_paths_and_cache_can_be_reused(self):
prefix, path = result.stdout.split('\n', 1)
self.assertEqual(prefix, str(self.dest / 'occt/install'))
self.assertEqual(path.split(':')[0], str(self.dest / 'occt/install/bin'))
# Excluded DLL directories must not alter PATH; preserve every original entry.
self.assertEqual(path.split(':')[1:], self.env['PATH'].split(':'))
self.env['FAIL_DOWNLOAD'] = '1'
self.assertEqual(self.fetch().returncode, 0)

Expand Down
4 changes: 3 additions & 1 deletion scripts/fetch-occt-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ prefix="$(cd "$prefix" && pwd)"
# exchange through XCAF) imports: FreeImage, FreeType, FFmpeg, OpenVR. Not the bundled MSVC
# runtime (msvc-vc14-64: older than the system's, it shadows it) nor the viewers' Qt, VTK or
# Tcl/Tk.
dlldirs="$(find "$dest" -name '*.dll' -printf '%h\n' | sort -u | grep -Ev '/(qt|vtk|tcltk|glfw|angle|gl2ps|msvc)[^/]*(/|$)|/debug/|/plugins/' || true)"
# Batch directory extraction in POSIX sh: BSD find has no GNU -printf, while
# passing filenames as arguments preserves spaces and quotes on every host.
dlldirs="$(find "$dest" -name '*.dll' -exec sh -c 'for dll do printf "%s\n" "${dll%/*}"; done' sh {} + | sort -u | grep -Ev '/(qt|vtk|tcltk|glfw|angle|gl2ps|msvc)[^/]*(/|$)|/(debug|plugins)(/|$)' || true)"

{
printf 'export FORGE_OCCT_PREFIX=%q\n' "$(cygpath -m "$prefix")"
Expand Down
Loading