Ship the browser engine as its own release file
The installer no longer bundles the engine, and the installer script stops when the bundle names it or when the setup file is over 30 MB. pnpm build:browser-engine packages the engine, writes a deterministic ZIP and its record to releases/browser-engine/<version>/, and pins the ZIP in the host. The installer hooks remove the engine folder that 0.1.48 leaves behind, and uninstall removes the downloaded engine.
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
fn main() {
|
||||
// tauri-build requires every bundle resource to exist. `pnpm browser:stage` fills this
|
||||
// folder for installers. An empty folder lets `cargo test` and `tauri dev` run without it.
|
||||
std::fs::create_dir_all("browser-engine").expect("failed to create browser-engine");
|
||||
tauri_build::try_build(
|
||||
tauri_build::Attributes::new().app_manifest(
|
||||
tauri_build::AppManifest::new().commands(&[
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"bundle": {
|
||||
"resources": {
|
||||
"browser-engine/": "browser-engine/"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,9 +49,6 @@
|
||||
"icons/[email protected]",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
],
|
||||
"resources": {
|
||||
"browser-engine/": "browser-engine/"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,4 +228,18 @@ SectionEnd
|
||||
WriteRegStr SHCTX "${RUNESTONE_UNINSTKEY}" "RuneStoneWindowsVersion" "$0"
|
||||
Pop $1
|
||||
Pop $0
|
||||
; Releases up to 0.1.48 put the browser engine in the installation folder. Setup does not start
|
||||
; their uninstaller, so this hook removes that folder. The engine is now a separate download.
|
||||
${If} "$INSTDIR" != ""
|
||||
RMDir /r "$INSTDIR\browser-engine"
|
||||
${EndIf}
|
||||
!macroend
|
||||
|
||||
; The downloaded browser engine is a program, not user data. Uninstall removes it, also when the
|
||||
; user keeps the app data. The browser profiles stay in $LOCALAPPDATA\${BUNDLEID}\browser.
|
||||
!macro NSIS_HOOK_POSTUNINSTALL
|
||||
${If} $UpdateMode <> 1
|
||||
SetShellVarContext current
|
||||
RMDir /r "$LOCALAPPDATA\${BUNDLEID}\browser-engine"
|
||||
${EndIf}
|
||||
!macroend
|
||||
|
||||
Reference in New Issue
Block a user