Skip to content
⌘ NSIS Forum Archive

Building NSIS installer which uses plugins on MacOS

8 posts

Froglis#

Building NSIS installer which uses plugins on MacOS

Dear people,

I was trying to build a Windows NSIS install package on MacOS using makensis. I stumbled on a problem. The NSIS script was originally written on a Windows machine and is using a plugin called FindProcDLL to determine if the application which has to be update/upgraded with the installer is still running. When I build the NSIS script I get the error:
Plugin not found, cannot call FindProcDLL::FindProc
Obviously I have to install the plugin, but somehow I suspect the MacOS version of makensis will not be able to use the Windows version of the FindProcDLL plugin.

My question is. Should the Mac version of makensis be able to use the Windows version of the plugin? If so how do I install it. I have installed makensis with homebrew.

Or do I need a Mac version of the plugin to be able to build the installer package? Or even worse: is it even possible to build install package if it needs plugins?

The reason why I would like to build the package on MacOS is to automate the build. It would be even better if the installer package could be build on Linux.

Grtz Froglis
Anders#
Host machine does not matter, you probably just put the plug-in .DLL file in the wrong directory. From the error message I can see that you are using NSIS v3 and therefore you need to put the .DLL in the correct subfolder under \NSIS\Plugins\...

Alternatively you can use !addplugindir in your script.
Froglis#
Thank you for your answer Anders,

I have tried this, but still get the same error. I have installed makensis with Homebrew and is installed at:
/usr/local/Cellar/makensis/
I found the plugin directory at:
/usr/local/Cellar/makensis/3.03/share/nsis/Plugins

First I created a subfolder FindProc and copied the dll file to that folder.
Ran makensis with my script and still got the error. Then I added the line below at the top my script.

!addplugindir "/usr/local/Cellar/makensis/3.03/share/nsis/Plugins"
And run the command again and still get the same error.

Last thing I tried is moving the dll file one folder up directly in the Plugins folder. But that gives the same results.

Below the script I used to test this.

!addplugindir "/usr/local/Cellar/makensis/3.03/share/nsis/Plugins"

FindProcDLL::FindProc "C:\Program Files\omnis.exe"
${If} $R0 == 1
MessageBox MB_OK|MB_ICONEXCLAMATION "Program is still open"
Quit
${EndIf}
I tried two versions of the DLL file
  1. http://nsis.sourceforge.net/FindProcDLL_plug-in#Usage
  2. http://www.bojankomazec.com/2011/10/...t-windows.html


The last I use when the installer is build on a Windows computer, because the other one is not working properly on a Windows 64Bit PC.
Anders#
There should already be at least a x86-ansi folder inside /nsis/Plugins where the plug-ins should be located, just put your .dll in there along with the others.

!addplugindir needs the path to where the .dll is, subfolders are not searched.

The next NSIS version will list the plug-in directories when a plug-in call fails...
Anders#
Originally Posted by Froglis View Post

That did the trick. Is there some place in the documentation I missed?
There is http://nsis.sourceforge.net/How_can_...l_a_plugin%3F#. I don't remember exactly what the official documentation says about this.
Froglis#
Yeah I saw that page, but is a little bit different from the MacOS situation. On Windows you do not have the Ansi/UTF folder.
Anders#
Originally Posted by Froglis View Post
Yeah I saw that page, but is a little bit different from the MacOS situation. On Windows you do not have the Ansi/UTF folder.
Yes you do. NSIS v2 only had one folder, NSIS v3 has multiple subfolders, on all systems.