Skip to content

Commit 1a412f4

Browse files
authored
feat: add customUnWelcomePage macro for nsis (#7790)
1 parent 562870e commit 1a412f4

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

.changeset/real-planets-float.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": minor
3+
---
4+
5+
feat: add customUnWelcomePage macro for NSIS installers

docs/configuration/nsis.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Two options are available — [include](#NsisOptions-include) and [script](#Nsis
3737
Keep in mind — if you customize NSIS script, you should always state about it in the issue reports. And don't expect that your issue will be resolved.
3838

3939
1. Add file `build/installer.nsh`.
40-
2. Define wanted macro to customise: `customHeader`, `preInit`, `customInit`, `customUnInit`, `customInstall`, `customUnInstall`, `customRemoveFiles`, `customInstallMode`, `customWelcomePage`.
40+
2. Define wanted macro to customise: `customHeader`, `preInit`, `customInit`, `customUnInit`, `customInstall`, `customUnInstall`, `customRemoveFiles`, `customInstallMode`, `customWelcomePage`, `customUnWelcomePage`.
4141

4242
!!! example
4343
```nsis
@@ -67,6 +67,12 @@ Keep in mind — if you customize NSIS script, you should always state about it
6767
# Welcome Page is not added by default for installer.
6868
!insertMacro MUI_PAGE_WELCOME
6969
!macroend
70+
71+
!macro customUnWelcomePage
72+
!define MUI_WELCOMEPAGE_TITLE "custom title for uninstaller welcome page"
73+
!define MUI_WELCOMEPAGE_TEXT "custom text for uninstaller welcome page $\r$\n more"
74+
!insertmacro MUI_UNPAGE_WELCOME
75+
!macroend
7076
```
7177

7278
* `BUILD_RESOURCES_DIR` and `PROJECT_DIR` are defined.

packages/app-builder-lib/templates/nsis/assistedInstaller.nsh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@
6464
!endif
6565
!else
6666
!ifndef removeDefaultUninstallWelcomePage
67-
!insertmacro MUI_UNPAGE_WELCOME
67+
!ifmacrodef customUnWelcomePage
68+
!insertmacro customUnWelcomePage
69+
!else
70+
!insertmacro MUI_UNPAGE_WELCOME
71+
!endif
72+
6873
!endif
6974
!ifndef INSTALL_MODE_PER_ALL_USERS
7075
!insertmacro PAGE_INSTALL_MODE

0 commit comments

Comments
 (0)