I'm trying create custom page of uninstaller with feedback form. I read documentation (https://www.electron.build/configuration/nsis#NsisOptions-script) and made all stuff with macros customUnInstall. I found some issues with same problem, but it unresolved (https://github.com/electron-userland/electron-builder/issues/3871). The problem is using functions.
An error is returned when attempting to build: "warning 6020: Uninstaller script code found but WriteUninstaller never used - no uninstaller will be created. Error: warning treated as error"
There is the code of script, that I insert in customUnInstall script with !insertmacro:
Function un.TestFunc
MessageBox MB_OK "HELLO"
FunctionEnd
!macro testmacro
Var /GLOBAL Dialog
Var /GLOBAL CheckBox
nsDialogs::Create 1018
Pop $Dialog
${NSD_CreateCheckbox} 0 25u 100% 10u "&Checkbox 1"
Pop $CheckBox
${NSD_OnClick} $CheckBox un.TestFunc
nsDialogs::Show
!macroend
For more information, there is some stuff about creating custom installer with electron-builder utilites https://www.electron.build/configuration/nsis#NsisOptions-script
So, what i'm doing wrong? I would be very grateful if you could help me.
UPD: Question #2. I found answer about custom installer page (Add custom page/field to NSIS setup created with electron-builder), but if I do same with uninstall section, same error appears. Of cource, in package.json I include uninstall.nsh instead installer.nsh.
!include nsDialogs.nsh
XPStyle on
Var Dialog
Var Text
UninstPage custom un.myCustomPage
Function un.myCustomPage
nsDialogs::Create 1018
Pop $Dialog
${If} $Dialog == error
Abort
${EndIf}
${NSD_CreateLabel} 0 15 100% 20u "We are looking forward your return!"
Pop $Text
nsDialogs::Show
FunctionEnd
Section
SectionEnd