Skip to content

FinceptTerminal is a modern finance application offering advanced market analytics, investment research, and economic data tools, designed for interactive exploration and data-driven decision-making in a user-friendly environment.

ci(windows): alias vcpkg static-md zs.lib -> zlib.lib for FindZLIB

tilakpatel22eef38887010f
diff --git a/.github/workflows/build-cpp.yml b/.github/workflows/build-cpp.yml
index 3b4b81507..92415757d 100644
--- a/.github/workflows/build-cpp.yml
+++ b/.github/workflows/build-cpp.yml
@@ -137,14 +137,19 @@ jobs:
echo "ZLIB_ROOT=$ZLIB_DIR" >> "$GITHUB_ENV"
echo "OpenSSL installed at: $OPENSSL_DIR ; static zlib at: $ZLIB_DIR"
ls "$OPENSSL_DIR/lib/libcrypto.lib" && echo "libcrypto.lib confirmed"
- # vcpkg installs the static zlib archive as lib/zlib.lib. Confirm it so
- # find_package(ZLIB REQUIRED) cannot fall through to a stray system zlib.
+ # vcpkg's static-md zlib ships the archive as "zs.lib", which stock
+ # CMake FindZLIB does not search for. Alias it to "zlib.lib" (a name
+ # FindZLIB looks for) so find_package(ZLIB) links the static archive.
if [ ! -f "$ZLIB_DIR/lib/zlib.lib" ]; then
- echo "::error::static zlib.lib not found in $ZLIB_DIR/lib"
+ ALT="$(ls "$ZLIB_DIR"/lib/z*.lib 2>/dev/null | head -1 || true)"
+ if [ -n "$ALT" ]; then cp "$ALT" "$ZLIB_DIR/lib/zlib.lib"; echo "Aliased $(basename "$ALT") -> zlib.lib"; fi
+ fi
+ if [ ! -f "$ZLIB_DIR/lib/zlib.lib" ]; then
+ echo "::error::static zlib archive not found in $ZLIB_DIR/lib"
ls -la "$ZLIB_DIR/lib/" 2>&1 || true
exit 1
fi
- echo "static zlib.lib confirmed: $ZLIB_DIR/lib/zlib.lib"
+ echo "static zlib confirmed: $ZLIB_DIR/lib/zlib.lib"
# ---- Qt6 target (Windows/macOS) ----
- name: Install Qt6
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 74c7b5581..c4dc3b16b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -70,15 +70,21 @@ jobs:
echo "OPENSSL_ROOT_DIR=$OPENSSL_DIR" >> "$GITHUB_ENV"
echo "ZLIB_ROOT=$ZLIB_DIR" >> "$GITHUB_ENV"
ls "$OPENSSL_DIR/lib/libcrypto.lib" && echo "libcrypto.lib confirmed"
- # vcpkg installs the static zlib archive as lib/zlib.lib. Confirm it
- # exists so a configure-time find_package(ZLIB REQUIRED) cannot fall
- # through to a stray system zlib (the v4.1.0 failure mode) again.
+ # vcpkg's static-md zlib ships the archive as "zs.lib", a name stock
+ # CMake FindZLIB does NOT search for (it looks for z/zlib/zlib1/...).
+ # Alias it to "zlib.lib" so find_package(ZLIB) links the static
+ # archive instead of falling through to a stray system zlib (the
+ # v4.1.0 "z.dll" failure mode). It's a copy, so the archive is intact.
if [ ! -f "$ZLIB_DIR/lib/zlib.lib" ]; then
- echo "::error::static zlib.lib not found in $ZLIB_DIR/lib"
+ ALT="$(ls "$ZLIB_DIR"/lib/z*.lib 2>/dev/null | head -1 || true)"
+ if [ -n "$ALT" ]; then cp "$ALT" "$ZLIB_DIR/lib/zlib.lib"; echo "Aliased $(basename "$ALT") -> zlib.lib"; fi
+ fi
+ if [ ! -f "$ZLIB_DIR/lib/zlib.lib" ]; then
+ echo "::error::static zlib archive not found in $ZLIB_DIR/lib"
ls -la "$ZLIB_DIR/lib/" 2>&1 || true
exit 1
fi
- echo "static zlib.lib confirmed: $ZLIB_DIR/lib/zlib.lib"
+ echo "static zlib confirmed: $ZLIB_DIR/lib/zlib.lib"
# ── Qt ────────────────────────────────────────────────────────────────
- name: Install Qt ${{ env.QT_VERSION }}