Can a compiler variable (or regular var) come from a file?

Got a problem you cannot solve? Try here.
cmead
Posts: 8
Joined: Tue May 01, 2007 8:33 am

Can a compiler variable (or regular var) come from a file?

Postby cmead » Wed May 23, 2007 4:53 pm

I was hoping to be able to read a version string from a text file external to InstallAware and use it as a compiler variable or regular variable. I want to do this in order to share the version string between my product and the installer (which is in a text file).

Does anyone know a way to do this?

Thanks in advance,
Chris

jweksej
Posts: 93
Joined: Wed Sep 27, 2006 4:54 am

Postby jweksej » Mon Jun 04, 2007 2:59 pm

I've done it in external batch files. The file is read and then IA is called and version info is passed as command line parameters. If you are interested in details, let me know.
Jarek

cmead
Posts: 8
Joined: Tue May 01, 2007 8:33 am

Postby cmead » Mon Jun 04, 2007 5:23 pm

Thanks Jarek,
I solved it the same way... using the command line build for IA to override my default compiler constant values.
Cheers,
Chris

kcchenkd
Posts: 4
Joined: Fri Apr 21, 2006 1:06 pm

Postby kcchenkd » Mon Jun 18, 2007 7:10 am

hi jarek,

How can i pass version info as command line parameters?

Thanks.

cmead
Posts: 8
Joined: Tue May 01, 2007 8:33 am

Postby cmead » Mon Jun 18, 2007 8:13 am

Just use miabuild.exe to pass compiler constants. The values that you pass will overwrite whatever is set inside the IDE. Something like this:

miabuild.exe projFile.mpr PRODUCTVERSION=1.2.3.4

where you have a PRODUCTVERSION compiler constant.

kcchenkd
Posts: 4
Joined: Fri Apr 21, 2006 1:06 pm

Postby kcchenkd » Mon Jun 18, 2007 8:39 am

Thanks Chris,

then how do i set install product version to that complier constant? I had try to put something like $PRODUCTVERSION$ on Product version on project properties page, but it does not work.

Thanks.

cmead
Posts: 8
Joined: Tue May 01, 2007 8:33 am

Postby cmead » Mon Jun 18, 2007 8:53 am

On my 'project options'/'compiler variables' page, I have:

PRODUCTVERSION 0.0.000.0

In my code, I use: #PRODUCTVERSION#

kcchenkd
Posts: 4
Joined: Fri Apr 21, 2006 1:06 pm

Postby kcchenkd » Mon Jun 18, 2007 9:29 am

Thanks, it works,

I don't know why I use "$" instead of "#" before.

Thanks for your help


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 81 guests