Skip to content

Commit 275d72d

Browse files
authored
Merge branch 'master' into fix/asar-symlink-check
2 parents 47712e6 + 73696c6 commit 275d72d

File tree

6 files changed

+79
-0
lines changed

6 files changed

+79
-0
lines changed

.changeset/witty-ghosts-kneel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
feat(nsis): add support for more Windows Installer options

packages/app-builder-lib/scheme.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4169,6 +4169,34 @@
41694169
"description": "The uninstaller display name in the control panel.",
41704170
"type": "string"
41714171
},
4172+
"uninstallUrlHelp": {
4173+
"description": "The URL to the uninstaller help page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.",
4174+
"type": [
4175+
"null",
4176+
"string"
4177+
]
4178+
},
4179+
"uninstallUrlInfoABout": {
4180+
"description": "The URL to the uninstaller info about page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.",
4181+
"type": [
4182+
"null",
4183+
"string"
4184+
]
4185+
},
4186+
"uninstallUrlUpdateInfo": {
4187+
"description": "The URL to the uninstaller update info page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.",
4188+
"type": [
4189+
"null",
4190+
"string"
4191+
]
4192+
},
4193+
"uninstallUrlReadme": {
4194+
"description": "The URL to the uninstaller readme in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.",
4195+
"type": [
4196+
"null",
4197+
"string"
4198+
]
4199+
},
41724200
"uninstallerIcon": {
41734201
"description": "The path to uninstaller icon, relative to the [build resources](./contents.md#extraresources) or to the project directory.\nDefaults to `build/uninstallerIcon.ico` or application icon.",
41744202
"type": [

packages/app-builder-lib/src/targets/nsis/Defines.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ export type Defines = {
9090

9191
UNINSTALLER_ICON?: string
9292
UNINSTALL_DISPLAY_NAME?: string
93+
UNINSTALL_URL_HELP?: string
94+
UNINSTALL_URL_INFO_ABOUT?: string
95+
UNINSTALL_URL_UPDATE_INFO?: string
96+
UNINSTALL_URL_README?: string
9397

9498
RECREATE_DESKTOP_SHORTCUT?: null
9599

packages/app-builder-lib/src/targets/nsis/NsisTarget.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,12 @@ export class NsisTarget extends Target {
225225
defines.UNINSTALL_REGISTRY_KEY_2 = `Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${guid}`
226226
}
227227

228+
const { homepage } = this.packager.info.metadata
229+
use(options.uninstallUrlHelp || homepage, it => (defines.UNINSTALL_URL_HELP = it))
230+
use(options.uninstallUrlInfoAbout || homepage, it => (defines.UNINSTALL_URL_INFO_ABOUT = it))
231+
use(options.uninstallUrlUpdateInfo || homepage, it => (defines.UNINSTALL_URL_UPDATE_INFO = it))
232+
use(options.uninstallUrlReadme || homepage, it => (defines.UNINSTALL_URL_README = it))
233+
228234
const commands: Commands = {
229235
OutFile: `"${installerPath}"`,
230236
VIProductVersion: appInfo.getVersionInWeirdWindowsForm(),

packages/app-builder-lib/src/targets/nsis/nsisOptions.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,22 @@ export interface NsisOptions extends CommonNsisOptions, CommonWindowsInstallerCo
155155
* @default ${productName} ${version}
156156
*/
157157
readonly uninstallDisplayName?: string
158+
/**
159+
* The URL to the uninstaller help page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.
160+
*/
161+
readonly uninstallUrlHelp?: string
162+
/**
163+
* The URL to the uninstaller info about page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.
164+
*/
165+
readonly uninstallUrlInfoAbout?: string
166+
/**
167+
* The URL to the uninstaller update info page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.
168+
*/
169+
readonly uninstallUrlUpdateInfo?: string
170+
/**
171+
* The URL to the uninstaller readme page in the control panel. Defaults to [homepage](./configuration.md#homepage) from application package.json.
172+
*/
173+
readonly uninstallUrlReadme?: string
158174

159175
/**
160176
* The path to NSIS include script to customize installer. Defaults to `build/installer.nsh`. See [Custom NSIS script](#custom-nsis-script).

packages/app-builder-lib/templates/nsis/include/installer.nsh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,26 @@
133133
WriteRegStr SHELL_CONTEXT "${UNINSTALL_REGISTRY_KEY}" "Publisher" "${COMPANY_NAME}"
134134
!endif
135135

136+
!ifdef APP_DESCRIPTION
137+
WriteRegStr SHELL_CONTEXT "${UNINSTALL_REGISTRY_KEY}" "Comments" "${APP_DESCRIPTION}"
138+
!endif
139+
140+
!ifdef UNINSTALL_URL_HELP
141+
WriteRegStr SHELL_CONTEXT "${UNINSTALL_REGISTRY_KEY}" "HelpLink" "${UNINSTALL_URL_HELP}"
142+
!endif
143+
144+
!ifdef UNINSTALL_URL_INFO_ABOUT
145+
WriteRegStr SHELL_CONTEXT "${UNINSTALL_REGISTRY_KEY}" "URLInfoAbout" "${UNINSTALL_URL_INFO_ABOUT}"
146+
!endif
147+
148+
!ifdef UNINSTALL_URL_UPDATE_INFO
149+
WriteRegStr SHELL_CONTEXT "${UNINSTALL_REGISTRY_KEY}" "URLUpdateInfo" "${UNINSTALL_URL_UPDATE_INFO}"
150+
!endif
151+
152+
!ifdef UNINSTALL_URL_README
153+
WriteRegStr SHELL_CONTEXT "${UNINSTALL_REGISTRY_KEY}" "Readme" "${UNINSTALL_URL_README}"
154+
!endif
155+
136156
WriteRegDWORD SHELL_CONTEXT "${UNINSTALL_REGISTRY_KEY}" NoModify 1
137157
WriteRegDWORD SHELL_CONTEXT "${UNINSTALL_REGISTRY_KEY}" NoRepair 1
138158

0 commit comments

Comments
 (0)