Archive: library.nsh on Posix without cross-tools


library.nsh on Posix without cross-tools
Hello all,
Perhaps I do not how to search, but I could not find anywhere an answer to my question (pretty strange, I admit). :)

I am trying to compile an NSIS script that utilizes library.nsh header with installlib macros on a Posix system using the previously-compiled and working 2.45 version of "makensis". For reasons beyond my control I do not use cross compiler, eg mingw, or any other similar tools.
Prior to my using library.nsh in my installation script, I was able to successfully compile by simply skipping all the plugins, utilities etc (skipplugins, skiputils etc). However, since I started using installlib macros, my compilation fails with references to minor_version and major_version calls. I know that Appendix that describes the library says that DLL version checkes are required in order for the header to compile, but I am wondering if there is any work-around for this limitation on Posix systems (I use CentOS if that matters).
Also, I can successfully compile the script on Windows, so I know it is working fine.

Again, I am using NSIS 2.45.

Any advice would be much appreciated.
Vic


I am a bit confused. You are talking both about compiling a script and compiling makensis in the same context. I'll assume MINOR|MAJOR_VESRION you're missing is when building LibraryLocal.exe that's used by Library.nsh.

First off, it's no shame not to use cross compiler. It's even preferable. Build only what needs to be built native to work, and use the pre-built zip for everything else. It's always smaller, faster and better tested.

Next, I don't know how exactly you got errors about missing version definition and I won't know without seeing the error itself. That said, simply pass the version information to avoid it.

scons VERSION=2.46 VER_MAJOR=2 VER_MINOR=46 VER_REVISION=0 VER_BUILD=0 SKIP...

Hi,
Apologies for confusing you and everyone else. Indeed, I am trying to recompile the "makensis" file so that I can compile the .nsi script which utilizes library.nsh header.

When I attempt to compile the script with my current version of "makensis" (version 2.45), this is what I get:

sh: LibraryLocal: command not found
warning: unknown variable/constant "{LIBRARY_VERSION_HIGH}" detected, ignoring (
macro:InstallLib:120)
warning: unknown variable/constant "{LIBRARY_VERSION_LOW}" detected, ignoring (m
acro:InstallLib:121)
!undef: "LIBRARY_VERSION_HIGH" not defined!
Error in macro InstallLib on macroline 125

I tried recompiling the "makensis" passing version, version_major, version_minor, version_rev etc constants to the scons, but this did not help any.

Am I missing the LibraryLocal component?

I am a bit lost, so any pointers would be much appreciated.

Thanks,
Vic


Disregard my previous message. After an extensive search in the forums, I found that one has to compile the LibraryLocal using scons with a "LibraryLocal" target. Afterwards, copy "LibraryLocal" from your build/release/LibraryLocal folder into /usr/bin or wherever convenient.

All seems to work now.
Vic