From a5c6c3f116943e8a70e1ce368dbd8dd5a6add986 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Sat, 11 Jul 2026 01:48:14 +0300 Subject: [PATCH] ci(release): build the thumbnail helper crates as explicit targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A plain `cargo build --release` at the workspace root builds only the app package and its dependencies, so it never emitted the artifacts the packaging steps consume: * libdwg_thumbnailer.a — the staticlib crate-type is produced only when dwg-thumbnailer is built as a target (as a dependency cargo makes just the rlib); the macOS QuickLook .appex links this static lib. * dwg_thumbnailer_win.dll — dwg-thumbnailer-win is a workspace member, not an app dependency, so the DLL the WiX MSI references was missing. Build each helper crate explicitly on its platform, and link the extra system libraries (Security/SystemConfiguration/iconv) the Rust staticlib pulls in against the QuickLook extension. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/release.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 50c88047f..60efec0fd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -107,7 +107,12 @@ jobs: - name: Build env: OCS_PATREON_TOKEN: ${{ secrets.OCS_PATREON_TOKEN }} - run: cargo build --release + run: | + cargo build --release + # The MSI bundles the DWG thumbnail provider DLL. That cdylib is a + # workspace member, not an app dependency, so a plain `cargo build` + # never produces it — build the crate as an explicit target. + cargo build --release -p dwg-thumbnailer-win - name: Sign executable (Azure Trusted Signing) # Sign the bare .exe *before* the MSI is built so the copy packed @@ -232,7 +237,12 @@ jobs: - name: Build env: OCS_PATREON_TOKEN: ${{ secrets.OCS_PATREON_TOKEN }} - run: cargo build --release --target aarch64-apple-darwin + run: | + cargo build --release --target aarch64-apple-darwin + # The QuickLook extension links libdwg_thumbnailer.a. The staticlib + # crate-type is only emitted when the crate is built as a target (as a + # plain dependency cargo produces just the rlib), so build it here. + cargo build --release --target aarch64-apple-darwin -p dwg-thumbnailer - name: Build .icns from SVG run: | @@ -286,7 +296,8 @@ jobs: crates/dwg-thumbnailer/macos/ThumbnailProvider.swift \ -L target/aarch64-apple-darwin/release -ldwg_thumbnailer \ -framework QuickLookThumbnailing -framework CoreGraphics \ - -framework ImageIO -framework Foundation \ + -framework ImageIO -framework Foundation -framework Security \ + -framework SystemConfiguration -liconv \ -Xlinker -e -Xlinker _NSExtensionMain \ -o "$EXT/Contents/MacOS/DWGThumbnail" sed "s/__VERSION__/$VERSION/g" crates/dwg-thumbnailer/macos/Info.plist > "$EXT/Contents/Info.plist"