fix(windows): stop win7 fixed-runtime installer self-blocking

This commit is contained in:
zipg
2026-09-03 11:30:44 +08:00
committed by GitHub
parent 35946427a6
commit eec2e63667
2 changed files with 8 additions and 4 deletions
@@ -21,7 +21,10 @@ describe("Windows offline installer template", () => {
it("routes supported legacy Windows users from generic installers to the fixed-runtime package", () => {
expect(template).toContain("ManifestSupportedOS all");
expect(template).toContain("!include WinVer.nsh");
expect(template).toContain('!if "${INSTALLWEBVIEW2MODE}" != "fixedRuntime"');
// Tauri 2.11 renders fixedRuntime as an empty NSIS install mode instead of
// the literal "fixedRuntime" string.
expect(template).toContain('!if "${INSTALLWEBVIEW2MODE}" != ""');
expect(template).not.toContain('!if "${INSTALLWEBVIEW2MODE}" != "fixedRuntime"');
expect(template).toContain("${If} ${IsWin7}");
expect(template).toContain("${OrIf} ${IsWin2012R2}");
expect(template).toContain('MessageBox MB_ICONSTOP|MB_YESNO|MB_DEFBUTTON1 "$(dbxWin7InstallerRequired)" IDYES dbx_open_win7_installer');
+4 -3
View File
@@ -530,9 +530,10 @@ Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
!endif
; Evergreen WebView2 installers no longer run on Windows 7. Route interactive
; users to the fixed WebView2 109 bundle before the generic installer fails.
!if "${INSTALLWEBVIEW2MODE}" != "fixedRuntime"
; Tauri renders fixedRuntime (and skip) as an empty install mode in NSIS;
; DBX does not ship a skip-mode installer. Only route builds that actually
; install an Evergreen WebView2 runtime to the fixed WebView2 109 bundle.
!if "${INSTALLWEBVIEW2MODE}" != ""
${If} ${IsWin7}
${OrIf} ${IsWin2012R2}
${If} ${Silent}