Skip to content

Commit 9f6c7d0

Browse files
committed
Fix release CI - 7
1 parent afa40e1 commit 9f6c7d0

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,25 @@ jobs:
138138
set -euo pipefail
139139
# First pass: extract SDK; gen step is expected to fail on Linux.
140140
zig build msvcup-setup || echo "first msvcup-setup failed (expected on Linux); fixing case-sensitivity"
141-
n=0
142-
while IFS= read -r -d '' f; do
143-
lower="${f%.Lib}.lib"
144-
if [[ ! -e "$lower" ]]; then
145-
ln -s "$(basename "$f")" "$lower"
146-
n=$((n + 1))
147-
fi
148-
done < <(find .velopack-msvc -type f -name "*.Lib" -print0)
149-
echo "Created $n lowercase symlinks for *.Lib -> *.lib"
141+
# The SDK ships hundreds of mixed-case filenames (Windows.h, kernel32.Lib,
142+
# ADSIid.h, AccCtrl.h, …) but downstream C code includes them lowercase.
143+
# Symlink every file whose basename has uppercase letters to an
144+
# all-lowercase sibling so case-insensitive lookups resolve.
145+
python3 - <<'PY'
146+
import os
147+
n = 0
148+
for dirpath, _dirnames, filenames in os.walk('.velopack-msvc'):
149+
for name in filenames:
150+
lower = name.lower()
151+
if lower == name:
152+
continue
153+
dst = os.path.join(dirpath, lower)
154+
if os.path.lexists(dst):
155+
continue
156+
os.symlink(name, dst)
157+
n += 1
158+
print(f"Created {n} lowercase filename symlinks")
159+
PY
150160
# Second pass: install check passes (kernel32.Lib exists), gen step
151161
# finds kernel32.lib via our symlinks and writes zig-libc-*.ini.
152162
zig build msvcup-setup

0 commit comments

Comments
 (0)