Old 21st June 2018, 08:38   #1
Froglis
Junior Member
 
Join Date: Jun 2018
Posts: 6
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:
code:
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
Froglis is offline   Reply With Quote
Old 21st June 2018, 11:43   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,925
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.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 28th June 2018, 15:22   #3
Froglis
Junior Member
 
Join Date: Jun 2018
Posts: 6
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:
Quote:
/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.

code:
!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.

code:
!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.
Froglis is offline   Reply With Quote
Old 28th June 2018, 15:58   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,925
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...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 4th July 2018, 08:27   #5
Froglis
Junior Member
 
Join Date: Jun 2018
Posts: 6
Thanks again Anders,

That did the trick. Is there some place in the documentation I missed?
Froglis is offline   Reply With Quote
Old 4th July 2018, 12:13   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,925
Quote:
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.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 5th July 2018, 09:11   #7
Froglis
Junior Member
 
Join Date: Jun 2018
Posts: 6
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.
Froglis is offline   Reply With Quote
Old 5th July 2018, 11:05   #8
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,925
Quote:
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.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump