Archive: GetDllVersionLocal and others outside of functions, sections and macros


GetDllVersionLocal and others outside of functions, sections and macros
Hola People,

I am using v2.0b3 on WinXP Pro.

I would like to get the version of executables and libraries at compile time. I can use GetDllVersionLocal to get the version information. I would like to store this in a global variable at compile time so the installer will have the correct information at run time.

For example:
I want to populate the following with the correct data at compile time
!define VER_MAJOR 0
!define VER_MINOR 00
!define VER_REVISION 0000

Since GetDllVersionLocal can not be used outside of a function, macro or other block, I would like to know what the best method of updating the above variables with the correct version information of the appropriate executable.


Thanx

-V-


How about using a second installer which calls GetDllVersionLocal (or whatever it needs to do to extract the version information) and then this installer invokes the installer that wants the data, defining inside it the variables using the /D (I think it's /D) makensis command line argument.

If this sounds weird try thinking of the second installer (the one that extracts the version info) as a little tool program you just happen to have created using NSIS. NSIS is good for stuff like that, e.g. it's a compiled NSIS script that backs up the NSIS Archive, a task that has nothing to do with installing anything.


Hmm. Thanx for the idea. I think I would be better off (as would the community) if I tackled this problem in the NSIS source.

I was hoping there was a quick, reliable, easy way of doing this first.



-V-