Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 13th August 2003, 23:02   #1
VirGin
Junior Member
 
Join Date: Aug 2003
Posts: 5
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-
VirGin is offline   Reply With Quote
Old 13th August 2003, 23:10   #2
Sunjammer
Major Dude
 
Join Date: Jun 2002
Location: Swindon, UK
Posts: 559
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.
Sunjammer is offline   Reply With Quote
Old 26th August 2003, 21:34   #3
VirGin
Junior Member
 
Join Date: Aug 2003
Posts: 5
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-
VirGin 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