Electron-Builder Version: 22.14.5 Node Version: 16.15.1 Electron Version: 18.3.0 Electron Type (current, beta, nightly): current
Target: win nsis ia32 based on this PR #1173
Hi, based on this feature, it seems there is an issue to interact with the unwelcome page. by default when we use electron builder with nsis, we have now during the uninstallation, the unwelcome page and the unfinish page like you described bellow. And it's cool but we didn't interact with them like this
.define MUI_PAGE_CUSTOMFUNCTION_PRE un.custom_pre_page !define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.custom_leave_page !define MUI_WELCOMEPAGE_TITLE_3LINES !define MUI_WELCOMEPAGE_TITLE 'unwelcome_title' !define MUI_WELCOMEPAGE_TEXT 'unwelcome_text' !insertmacro MUI_UNPAGE_WELCOME
so when we have are in a language where the default text is too long we don't have the 3 lines. and we can't change the text. see the screenshot.
I've test many ways to solve it, manage anothe unpage welcome and it works for the othe page but the default page that you added is never removed. I tried to manipulate the window item to hide it, try to click on the next button with a command to navigate but it doesn't work. And I verified that handles are correct.
so what it the solution in this context to interact with your unwelcome page or to remove it? thanks in advance
Electron-Builder Version: 22.14.5 Node Version: 16.15.1 Electron Version: 18.3.0 Electron Type (current, beta, nightly): current
Target: win nsis ia32 based on this PR #1173
Hi, based on this feature, it seems there is an issue to interact with the unwelcome page. by default when we use electron builder with nsis, we have now during the uninstallation, the unwelcome page and the unfinish page like you described bellow. And it's cool but we didn't interact with them like this
.define MUI_PAGE_CUSTOMFUNCTION_PRE un.custom_pre_page !define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.custom_leave_page !define MUI_WELCOMEPAGE_TITLE_3LINES !define MUI_WELCOMEPAGE_TITLE 'unwelcome_title' !define MUI_WELCOMEPAGE_TEXT 'unwelcome_text' !insertmacro MUI_UNPAGE_WELCOME
so when we have are in a language where the default text is too long we don't have the 3 lines. and we can't change the text. see the screenshot.
I've test many ways to solve it, manage anothe unpage welcome and it works for the othe page but the default page that you added is never removed. I tried to manipulate the window item to hide it, try to click on the next button with a command to navigate but it doesn't work. And I verified that handles are correct.
so what it the solution in this context to interact with your unwelcome page or to remove it? thanks in advance
https://github.com/electron-userland/electron-builder/issues/6987
after searched deeper, I can see in the electron-builder code (after cloning the repo) that the assistedInstaller.nsh managed the uninstaller as is
...
!else
!insertmacro MUI_UNPAGE_WELCOME
!ifndef INSTALL_MODE_PER_ALL_USERS
!insertmacro PAGE_INSTALL_MODE
!endif
!insertmacro MUI_UNPAGE_INSTFILES
!ifmacrodef customUninstallPage
!insertmacro customUninstallPage
!endif
!insertmacro MUI_UNPAGE_FINISH
!endif
the.insertmacro MUI_UNPAGE_WELCOME is added without condition whereas the customWelcomePage is added with a condition. I guess it's the root cause of my problem. If I try to add a custom unwelcome page like this
!define MUI_PAGE_CUSTOMFUNCTION_SHOW un.ModifyUnWelcome
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.LeaveUnWelcome
!insertmacro MUI_UNPAGE_WELCOME
Var mycheckbox ;
Function un.ModifyUnWelcome
${NSD_CreateCheckbox} 120u -18u 50% 12u "Clean Configuration"
Pop $mycheckbox
SetCtlColors {MUI_BGCOLOR}
${NSD_Check} $mycheckbox ; Check it by default
FunctionEnd
Function un.LeaveUnWelcome
${NSD_GetState} $mycheckbox $0
${If} $0 <> 0
MessageBox MB_TOPMOST 'We remove configuration'
${EndIf}
FunctionEnd
I have my custom unwelcomePage, but when click on next I go to the second unwelcome page placed in the assistedInstaller.nsh
And I have no ways to change this file.
if someone knows how to manage this file. I guess that I must rebuild electron-builder with a change for that but It will be better that electron-builder team fix the problem isn't it?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.