Archive: VS_VERSION_INFO to VIProductVersion


VS_VERSION_INFO to VIProductVersion
I'm trying to get the VS_VERSION_INFO object info out of my MSVC app into the installer script's attributes, such as VIProductVersion or Name.

I can grab the strings I need from the appropriate .rc file in the MSVC project, but in NSIS I have to use variables to do this. Nearly all the NSIS attributes to not accecpt variables as arguments.

Anybody know a work-around?

Thanks,
Russ


Thats because variables are runtime and the version info commands are compile time instructions. As a work around you will most likely have to create an installer or another program that will read the .rc file and generate a nsis script which the can be included into your main script. This can be automated by using !system command.

As a similar example search this forum for a thread about excluding files from recursive directory include as it is a good example of how !system command can be used to generate a semi-dynamic script at compile time.

Vytautas ;)


Yea, I thought of that, but I was hoping for a way to do it in a single nsis script. Oh, well.

Thanks,
Russ


Well in the end to you it should appear as one script which includes the version info from a file generated by a program of some sort. All the program has to do is output a simple text file with VIProductVersion commands with appropriate settings defined.

Of cause there is another way of doing it but it is way more complicated. It involves modifing NSIS Source code to create a function similar to GetLocalDLLVersion.

Also I read in one of the thread a possibility of future versions of NSIS supporting compile-time plugins, or was I dreaming?

Vytautas :D