how to get version from a file?

Got a problem you cannot solve? Try here.
binkle

how to get version from a file?

Postby binkle » Mon Dec 11, 2006 7:30 am

Hi,
I don't linke to set the version for the setup every time.
How can I set the version by getting it from a file(version)?

Harry

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Mon Dec 11, 2006 10:00 am

You can use compiler variables for the product version field, but you will still need to set the version yourself before building.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

binkle

Postby binkle » Mon Dec 11, 2006 10:29 am

Fine, but it's not possible to get a file version in windows (XP) commandline.
Or do you know how to do that in a makefile?

Other setup programs do support this very easy e.g. Innosetup:

Code: Select all

#define AppVersion GetStringFileInfo(AddBackslash(SourcePath)+"..\\MyApp.exe", PRODUCT_VERSION)
#define BuildVersion GetStringFileInfo(AddBackslash(SourcePath)+"..\\MyApp.exe", FILE_VERSION)


Greetings

Harry

binkle

Postby binkle » Mon Dec 11, 2006 10:47 am

Ok,
wrote my own little command line util,
but where is the setup-file-version assigned?
I don't know where/when to assign my compile variable.

Harry

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Mon Dec 11, 2006 5:01 pm

Please read the help file topics for compiler variables - their usage is described thoroughly.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

binkle

Postby binkle » Tue Dec 12, 2006 3:30 am

Michael,
you missed my question.
I know how to use compiler variables.
But I don't know which variable I need to override with my compiler variable to set the setup version.
I know there is the predefined variable VERSION. I suppose this is the one to be changed. But I did not find it in my MSI script.
Where/when does this variable get the value I entered in the options?
Because I need to assign my compiler variable instead.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Dec 12, 2006 5:47 pm

I think the help also says that you can set compiler variables from the command line build tool, or the IDE Project Options window which is where you first declare them.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

binkle

Postby binkle » Wed Dec 13, 2006 3:36 am

Micheal,
let me reformulate my question:
I need to set the predefined variable VERSION for compiling to make the setup.exe file have the fileversion I specify in commandline build.
Where should I do this?
There is no hint in the help how to do this, or can you tell me where, or paste the related part of the help.

So I need to do something like:

Code: Select all

miabuild.exe mysetup.mpr /r /b=2 /p=testPASSWORD SETUPVERSION=1.2.3"

Then I should get a setup file mysetup.exe having the fileversion 1.2.3.
When/where in the setup script do I have to assign #SETUPVERSION# to the predefined variable VERSION?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Wed Dec 13, 2006 11:33 am

When/where in the setup script do I have to assign #SETUPVERSION# to the predefined variable VERSION?


I don't see why its hard to see this. Enter the compiler variable where you normally type a fixed version in the IDE. There are two places you type the fixed version in the IDE, both which edit the same property. One is in the Project Options window and the other is in the Project Properties designer in the visual IDE.

I'm sorry if I wasn't verbose enough, but this really seems obvious to me, since you have already set the version once, you know where it is, and I don't see why you just didn't try to put the compiler variable in there.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

binkle

Postby binkle » Thu Dec 14, 2006 3:44 am

It is hard to see because on entering a compiler variable you get a balloon saying "Incorrect Product version Value" – in both the Project Options window and the Project Properties in the designer. So I didn’t tried to compile.
But it works.

Thank you for your patients!

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Dec 14, 2006 1:53 pm

That's a valid issue, seems like the confusion was at least partially our fault.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

binkle

Does version 7 of InstallAware support this?

Postby binkle » Fri Jul 20, 2007 6:02 am

Does version 7 of InstallAware support getting the setup version from a file(version)?


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 127 guests