Skip to content

Commit

Permalink
feat: add customUnWelcomePage macro for nsis (#7790)
Browse files Browse the repository at this point in the history
  • Loading branch information
xianyunleo committed Sep 25, 2023
1 parent 562870e commit 1a412f4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-planets-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": minor
---

feat: add customUnWelcomePage macro for NSIS installers
8 changes: 7 additions & 1 deletion docs/configuration/nsis.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Two options are available — [include](#NsisOptions-include) and [script](#Nsis
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.

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

!!! example
```nsis
Expand Down Expand Up @@ -67,6 +67,12 @@ Keep in mind — if you customize NSIS script, you should always state about it
# Welcome Page is not added by default for installer.
!insertMacro MUI_PAGE_WELCOME
!macroend

!macro customUnWelcomePage
!define MUI_WELCOMEPAGE_TITLE "custom title for uninstaller welcome page"
!define MUI_WELCOMEPAGE_TEXT "custom text for uninstaller welcome page $\r$\n more"
!insertmacro MUI_UNPAGE_WELCOME
!macroend
```

* `BUILD_RESOURCES_DIR` and `PROJECT_DIR` are defined.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@
!endif
!else
!ifndef removeDefaultUninstallWelcomePage
!insertmacro MUI_UNPAGE_WELCOME
!ifmacrodef customUnWelcomePage
!insertmacro customUnWelcomePage
!else
!insertmacro MUI_UNPAGE_WELCOME
!endif

!endif
!ifndef INSTALL_MODE_PER_ALL_USERS
!insertmacro PAGE_INSTALL_MODE
Expand Down

0 comments on commit 1a412f4

Please sign in to comment.