Archive: changing the version number via command line


changing the version number via command line
Hi all, I've only looked at this install program for a couple days. I'd like to be able to modify the parameters VIProductVersion and VIAddVersionKey via the command line when we build an install. I've looked through the forums and help files but I haven't found anything yet. Any help would be greatly appreciated.


You can pass VIProductVersion and VIAddVersionKey on the command line using the /X command line parameter. You could also define a constant using /D and use its value in either of those.

makensis /X"VIProductVersion 1.2.3.4"

makensis /DVERSION=1.2.3.4
# in script
VIProductVersion ${VERSION}

Hi! thanks for the really quick response. :D
When I try that i get an error saying:
"invalid VIProductVersion format, should be X.X.X.X"


sorry just to clarify, in the dos window when i try
makensis /X"VIProductVersion 1.2.3.4"

I get Invalid command: VERSION

when I try
makensis /DVERSION=1.2.3.4

I get invalid VIProductVersion format, shoudl be X.X.X.X


ah i got it, I can't have the script say VIProductVersion $(VERSION). If I comment or remove the line and use:
makensis /X"VIProductVersion X.X.X.X path
that works.

Thanks for the help!


you got a typo:

VIProductVersion $(VERSION) is wrong
VIProductVersion ${VERSION} is correct.

with the last one you can use the /D switch.


ahh thats why, silly typo. Thanks!