Electron-builder: [NSIS] `runAfterFinish: false` not working when `oneClick: true`

Created on 25 May 2018  路  5Comments  路  Source: electron-userland/electron-builder

  • Version:
    20.14.7
  • Target:
    NSIS

For quite some time I had:

oneClick: true,
runAfterFinish: false

as I want to build a simple installer but I need the app to not start at the end.
I see that from 20.13.5 the runAfterFinish(RUN_AFTER_FINISH) is not taken into account: https://github.com/electron-userland/electron-builder/commit/edb82afd328e51fe736da92cd389b5061bdf6318

I did check the corresponding tasks for this PR but I do not get the picture what exactly was fixed there and whether removing runAfterFinish was intended or not.

Anyway let me know if we can restore it, or how can I achieve the previous effect 馃檪

bug nsis

Most helpful comment

20.15.1

All 5 comments

It is bug, fixed, will be released soon.

20.15.1

Thanks a lot!

Sorry to bothering you once again but I have two problems after updating to 10.5.2.
When building with my meteor-desktop now the installation is stuck at packaging - it waits there indefinitely (waited 30 min) - it seems to be a issue with the new copyNodeModules - I will check it out more in detail in a moment.
I did remove that commit and tested the fix but the installer now does not close itself, I guess the

!ifdef ONE_CLICK
  !ifdef RUN_AFTER_FINISH
    ${ifNot} ${Silent}
    ${orIf} ${isForceRun}
      !insertmacro doStartApp
    ${endIf}

    !insertmacro quitSuccess
  !endif
!else

should be this way:

!ifdef ONE_CLICK
  !ifdef RUN_AFTER_FINISH
    ${ifNot} ${Silent}
    ${orIf} ${isForceRun}
      !insertmacro doStartApp
    ${endIf}
  !endif
  !insertmacro quitSuccess
!else

About the first issue, it gets stuck here:
await executeAppBuilder(["node-dep-tree", "--dir", platformPackager.info.appDir])

Probably this should not be invoked at all as I do not have node_modules at this point.
Can I do a PR with a similar check for node_modules like we did here? (I guess I can just add it to this if)

Was this page helpful?
0 / 5 - 0 ratings