2
votes

I am currently working on an installer for app made in electron, during the installation process i need to make simple POST request to verify credentials. I found that there is this inetc plugin that can do it. However since i am using electron builder which comes with nsis i dont really know how to install that plugin within this environment.

So this is where i found the nsis source (i think):

node_modules\app-builder-lib\templates

nsis-source

and then this is what i already tried:

  1. copy Plugins directory from inetc package to (screen above) nsis directory
  2. copy all contents of inetc package to (screen above) nsis directory and run build_msvc file

at the end when i try to compile my app i always get error:

Plugin not found, cannot call inetc::post

How it is possible to install that plugin and use it?

2

2 Answers

3
votes

I was experimenting with Anders answer however without much luck, then by utilising some git issue tracker and try - error method i figured out how its done for nsis with electron builder setup.

so these are the steps you take:

  1. download inetc plugin and unpack it, then open Plugins directory step2
  2. open your electron project directory, open build directory step1
  3. copy contents of Plugins directory from intec into your project build location step3

At this point you are good to go and you can use inetc functionality inside your installer.nsh file.

2
votes

I don't know anything about electron-builder but it looks like it stores its plug-ins in a folder called nsis-resources, it might be somewhere under %localappdata%\electron-builder\cache perhaps. You could also try searching for nsProcess.dll because that is one of the 3rd-party plug-ins it bundles.

If all else fails, you can add a custom directory:

!addplugindir /x86-unicode "c:\mynsisplugins\x86-unicode"

You must also remember to use the correct plug-in target (/x86-unicode vs /x86-ansi).