Open yoniabitbolkryon opened 2 months ago
I'm not too sure where isUpdated
is being set, it's not being actually set to a value in any of the .nsh
scripts. I'm wondering if it's a default value supplied by nsis scripts?
Here's an alternative route that could be used though!
${if} $1 != 'install'
https://github.com/electron-userland/electron-builder/issues/5633#issuecomment-779997166
I'm wondering if isUpdated
is simply not defined. In your custom nsh script, can you try using these? I think the ifNot
may be obscurring the actual value of isUpdated
!macro customUnInstall
${If} ${isUpdated}
MessageBox MB_ICONEXCLAMATION|MB_OK "I'm inside customUnInstall -> isUpdated"
${Else}
MessageBox MB_ICONEXCLAMATION|MB_OK "I'm inside customUnInstall -> not isUpdated"
${EndIf}
!macroend
!macro customUnInit
${If} ${isUpdated}
MessageBox MB_ICONEXCLAMATION|MB_OK "I'm inside customUnInit -> isUpdated"
${Else}
MessageBox MB_ICONEXCLAMATION|MB_OK "I'm inside customUnInit -> not isUpdated"
${EndIf}
!macroend
@mmaietta I was able to see the message ("I'm inside customUnInstall -> isUpdated") from customUnInit, but after that the app says there was an error and I don't get to see customUnInstall message.
I'm not too sure where
isUpdated
is being set, it's not being actually set to a value in any of the.nsh
scripts. I'm wondering if it's a default value supplied by nsis scripts?Here's an alternative route that could be used though!
${if} $1 != 'install'
#5633 (comment)
where is $1 defined?
where is $1 defined?
See comment https://github.com/electron-userland/electron-builder/issues/5633#issuecomment-779997166
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Electron-Builder Version: v24.13.3
Node Version: v20.10.0
Electron Version: v28.0.0
Electron Type (current, beta, nightly): current
Target: win nsis
I have a custom installer.nsh script I'm overriding macros customWelcomePage, customInstall, customRemoveFiles, customUnInstall, customUnInit. when I manually upgrade my app, the ${isUpdated} is false in customInstall.. although in other macros it's true. what am I doing wrong?
installer.nsh :
electron-builder.json: