0
votes

I have created a electron desktop app and created a installer using electron-builder.

Now I want to try macro like customInstall and customUnInstall

My installer.nsh file is

!macro customInstall
  MessageBox MB_OK "Test output 1"
!macroend

!macro customUnInstall
  MessageBox MB_OK "Test output 2"
!macroend

My electron-builder config is

"build": {
    "nsis": {
      "include": "installer.nsh"
    },
    "mac": {
      "icon": "build/icon.png"
    },
    "win": {
      "icon": "build/icon.png"
    }
  }

But this is not working for me. I have confirmed that installer.nsh is working by introducing error in that.
What I am missing to make it working?

1

1 Answers

-1
votes

Actually everything is working fine at this moment.

Your macros customInstall and customUnInstall are defined correctly, but they are not called from any place.

Simply call them from appropriate section/function/place/situation/etc.

Their execution depends entirely on you, there are no automatic call of them from script.