1. 先添加配置
"nsis": {
"include": "scripts/installer.nsi",
"allowToChangeInstallationDirectory": true,
"createDesktopShortcut": true,
"oneClick": false,
"menuCategory": false,
"perMachine": true
},
2. 新建installer.nsi文件,写入下面的内容,这里面的内容根据需要自己修改
; HM NIS Edit Wizard helper defines
!include "MUI2.nsh"
; ; MUI Settings
!define MUI_ABORTWARNING
; 欢迎页面
!insertmacro MUI_PAGE_WELCOME
ShowInstDetails show
ShowUnInstDetails show
SpaceTexts show
; 安装脚本
!macro customInstall
!macroend