Skip to content

Commit ebe9ede

Browse files
committed
fix(ci): explicitly bundle WebView2Loader.dll into NSIS installer (v1.47.5)
CI builds were not bundling WebView2Loader.dll because cargo build alone does not copy it from webview2-com-sys's OUT_DIR to target/release/. Add a Windows-only pre-bundle step that runs cargo build first, then copies the x64 DLL from target/release/build/webview2-com-sys-*/out/x64/ to target/release/WebView2Loader.dll, where the existing NSIS template (installer.nsi:639) picks it up via !if /FILEEXISTS. Step fails the job if the DLL cannot be located, so silently broken installers can no longer ship.
1 parent 1e9103d commit ebe9ede

5 files changed

Lines changed: 28 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,30 @@ jobs:
110110
$conf.bundle.windows.nsis.installMode = "currentUser"
111111
$conf | ConvertTo-Json -Depth 10 | Set-Content src-tauri/tauri.conf.json
112112
113+
- name: Pre-build cargo (Windows) to materialize WebView2Loader.dll
114+
if: contains(matrix.target, 'windows')
115+
shell: pwsh
116+
working-directory: open-pdf-studio/src-tauri
117+
run: |
118+
cargo build --release
119+
$dll = Get-ChildItem -Path 'target/release/build' -Recurse -Filter 'WebView2Loader.dll' -ErrorAction SilentlyContinue |
120+
Where-Object { $_.FullName -like '*\x64\*' } |
121+
Select-Object -First 1
122+
if ($dll) {
123+
Copy-Item -Path $dll.FullName -Destination 'target/release/WebView2Loader.dll' -Force
124+
Write-Output "Copied WebView2Loader.dll from $($dll.FullName)"
125+
} else {
126+
Write-Output "WARNING: WebView2Loader.dll not found under target/release/build"
127+
Get-ChildItem -Path 'target/release' -Recurse -Filter 'WebView2Loader.dll' -ErrorAction SilentlyContinue |
128+
ForEach-Object { Write-Output " found: $($_.FullName)" }
129+
}
130+
if (Test-Path 'target/release/WebView2Loader.dll') {
131+
Write-Output "OK: target/release/WebView2Loader.dll is present"
132+
} else {
133+
Write-Error "WebView2Loader.dll missing from target/release - NSIS bundle will not include it"
134+
exit 1
135+
}
136+
113137
- name: Build Tauri app (with release upload)
114138
if: matrix.target != 'windows-user'
115139
uses: tauri-apps/tauri-action@action-v0.6.1

open-pdf-studio/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "open-pdf-studio",
3-
"version": "1.47.4",
3+
"version": "1.47.5",
44
"description": "A free, open-source PDF annotation editor built with Tauri",
55
"scripts": {
66
"dev": "vite",

open-pdf-studio/src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

open-pdf-studio/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "open-pdf-studio"
3-
version = "1.47.4"
3+
version = "1.47.5"
44
description = "A free, open-source PDF annotation editor"
55
authors = ["OpenAEC Foundation"]
66
license = "MIT"

open-pdf-studio/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "Open PDF Studio",
4-
"version": "1.47.4",
4+
"version": "1.47.5",
55
"identifier": "org.openaec.openpdfstudio",
66
"build": {
77
"frontendDist": "../dist",

0 commit comments

Comments
 (0)