Skip to content
⌘ NSIS Forum Archive

On POSIX compile gives .onInit error, but...

5 posts

onad#

On POSIX compile gives .onInit error, but...

On POSIX compile gives .onInit error. but..

If I compile my script under Win32 all is OK! but under POSIX it hangs here. I think .onInit should be only called if you RUN an installer not compiletime error. INSTL_MUTEX is defined ealier in script ofcourse. I CAN succesfully build e.g. example1.nsi and other scripts unded this machine, but not if it adds something like below.

See below where it goes wrong:

...

Function .onInit

;Allow only one installer instance
System::Call 'kernel32::CreateMutexA(i 0, i 0, t ${INSTL_MUTEX}) i .r1 ?e'
Pop $R0
StrCmp $R0 0 +3
Abort

...
--------

Invalid command: System::Call
Error in script "/usr/websites/{hidden}/testzone/myscript.nsi" on line 123 -- aborting creation process

Any clue how to solve it?
onad#
and aditional

...

!ifdef __UNIXSERVERBASEDBUILD
!define cSeparator "/"
!define cMainScriptDirectory "/usr/websites/{hidden}/testzone"
!define cRegularIncludes "/usr/share/nsis/Include"
!define cAdditionalIncludes01 "${cMainScriptDirectory}"
!define cAdditionalIncludes02 "${cMainScriptDirectory}/Include"
!define cRegularExamples "${cMainScriptDirectory}/Examples"
!define cRegularPlugins "/usr/share/nsis/Plugins"
!define cAdditionalPlugins01 "${cMainScriptDirectory}"
!define cAdditionalPlugins02 "${cMainScriptDirectory}/Plugins"
!define cAdditionalResources01 "${cMainScriptDirectory}/Resources"
!define cAdditionalLanguageItems01 "${cMainScriptDirectory}/Languages"

...
onad#
I think the "System.dll" did not somehow make it in the nsis Plugins folder, strange :-? I will investigate more..
onad#
Yes, my fault, I think I need some sleep... 😉 adding System.dll to an aditional directory and adding to my script

!addplugindir "${cAdditionalPlugins02}${cSeparator}"

soved this problem on to the next problems.. 🙁(
kichik#
System.dll cannot yet be built using MinGW. You must use a precompiled version from the nightly snapshot or a released version.