Windows Installer tweaks
This commit is contained in:
parent
1d1b124a92
commit
d986356eea
18 changed files with 216 additions and 85 deletions
|
@ -12,7 +12,7 @@ index ffcc8bd..bafab0e 100644
|
|||
}
|
||||
const desktopMeta = {
|
||||
diff --git a/node_modules/app-builder-lib/scheme.json b/node_modules/app-builder-lib/scheme.json
|
||||
index 4ce62d9..e9729c1 100644
|
||||
index 4ce62d9..aea0e0b 100644
|
||||
--- a/node_modules/app-builder-lib/scheme.json
|
||||
+++ b/node_modules/app-builder-lib/scheme.json
|
||||
@@ -4749,6 +4749,10 @@
|
||||
|
@ -39,6 +39,50 @@ index 1536059..555f8f5 100644
|
|||
-
|
||||
update-mime-database /usr/share/mime || true
|
||||
update-desktop-database /usr/share/applications || true
|
||||
diff --git a/node_modules/app-builder-lib/templates/nsis/installSection.nsh b/node_modules/app-builder-lib/templates/nsis/installSection.nsh
|
||||
index 96f913a..ee95419 100644
|
||||
--- a/node_modules/app-builder-lib/templates/nsis/installSection.nsh
|
||||
+++ b/node_modules/app-builder-lib/templates/nsis/installSection.nsh
|
||||
@@ -22,10 +22,37 @@ StrCpy $appExe "$INSTDIR\${APP_EXECUTABLE_FILENAME}"
|
||||
SpiderBanner::Show /MODERN
|
||||
!endif
|
||||
|
||||
+ # Set text (1000 is the id of text element of SpiderBanner)
|
||||
FindWindow $0 "#32770" "" $hwndparent
|
||||
FindWindow $0 "#32770" "" $hwndparent $0
|
||||
- GetDlgItem $0 $0 1000
|
||||
- SendMessage $0 ${WM_SETTEXT} 0 "STR:$(installing)"
|
||||
+ GetDlgItem $1 $0 1000
|
||||
+ SendMessage $1 ${WM_SETTEXT} 0 "STR:$(installing)"
|
||||
+
|
||||
+ # Set header image compatible with "ManifestDPIAware" mode.
|
||||
+ !ifdef HEADER_ICO
|
||||
+ # Convert 24 Dialog Units to pixels:
|
||||
+ # See https://github.com/mozilla/gecko-dev/blob/8de0e699002872d969aebf1bc8407e5c839a4472/toolkit/mozapps/installer/windows/nsis/common.nsh#L8801
|
||||
+
|
||||
+ # rect = LPRect { .left = 0, .top = 0, .right = 24, .bottom = 0 }
|
||||
+ # See https://nsis.sourceforge.io/Docs/System/System.html#faq
|
||||
+ System::Call "*(i 0, i 0, i 24, i 0) p.r1"
|
||||
+
|
||||
+ # Call `MapDialogRect(window, &rect)`
|
||||
+ System::Call `user32::MapDialogRect(p $0, p r1)`
|
||||
+
|
||||
+ # rect.right now contains the converted value (24du => ?px).
|
||||
+ # Place `rect.right` into `r2`
|
||||
+ System::Call "*$1(i, i, i.r2, i)"
|
||||
+ System::Free $1
|
||||
+
|
||||
+ # Load image and pass `r2` as both width and height, get the image handle
|
||||
+ # back to `r2` register.
|
||||
+ System::Call `user32::LoadImage(i 0, t "$PLUGINSDIR\installerHeaderico.ico", i ${IMAGE_ICON}, i r2, i r2, i ${LR_LOADFROMFILE}) i.r2`
|
||||
+
|
||||
+ # 1025 is the id of the icon of SpiderBanner.
|
||||
+ GetDlgItem $1 $0 1025
|
||||
+ SendMessage $1 ${STM_SETIMAGE} ${IMAGE_ICON} $2
|
||||
+ !endif
|
||||
${endif}
|
||||
!insertmacro CHECK_APP_RUNNING
|
||||
!else
|
||||
diff --git a/node_modules/app-builder-lib/templates/nsis/messages.yml b/node_modules/app-builder-lib/templates/nsis/messages.yml
|
||||
index 87fa6b5..ad560bd 100644
|
||||
--- a/node_modules/app-builder-lib/templates/nsis/messages.yml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue