Page 1 of 1

Customizing Output .EXE name...

Posted: Thu May 20, 2010 4:57 pm
by Edhy
Hi all,
Is there a way to add the Product Version to the Output .EXE file so when build the file name will have the Product Version number as part of its name like this:

v1.2_MySetup.exe

Re: Customizing Output .EXE name...

Posted: Fri May 21, 2010 10:32 am
by sdeschenes
You would have to add the version number manually in the project settings every time you build your installer. You cannot use variables in the output file name.

The best way is to use the command line for building your installer. Then have a script get the version number of your product and add it to the file name.

Re: Customizing Output .EXE name...

Posted: Fri May 21, 2010 10:59 am
by Edhy
sdeschenes wrote:You would have to add the version number manually in the project settings every time you build your installer.

That is what I have been doing all the time, is there a way to get the version number updated automatically instead of manually enter it?

sdeschenes wrote:]You cannot use variables in the output file name.

That is sad, probably it could be a nice feature :)

sdeschenes wrote:]The best way is to use the command line for building your installer. Then have a script get the version number of your product and add it to the file name.

I will think about that, thanks for the suggestion!

Re: Customizing Output .EXE name...

Posted: Mon May 24, 2010 6:50 am
by ALive
Actually, we use version number inside output EXE file name.
Just type the compiler variable name inside "Output filename" text field as shown in the screenshot (surrounded with #, that's to specify compiler variable), when building your project with miabuild don't forget to specify that compiler variable.
i.e. miabuild <youp_project_path> OUTPUTFILE=YourInstallerName_x.y.z.r.exe

the output file will be YourInstallerName_x.y.z.exe
where x.y.z.r - is major, minor, build, revision numbers
this is the way we use on our build machines.

P.S. For debugging purposes you can set a certain value inside IA designer, for example YourInstallerName_1.2.3.4.exe, but don't forget to disable it, before commiting the code into VCS. Specified compiler variables inside IA does overwrite the variables provided from misbuild. It would be a nice feature to be vice verse instead.

Hope this helps.

Re: Customizing Output .EXE name...

Posted: Mon May 24, 2010 7:12 am
by Edhy
Hi ALive,
Thanks for the information, will give it a try.

Re: Customizing Output .EXE name...

Posted: Mon May 24, 2010 5:37 pm
by MichaelNesmith
Are you sure compiler variables inside the IDE actually overwrite values provided in miabuild.exe? It is the exact opposite according to documentation and my testing (which is the only sensible way, it would seem).

You can also set a compiler variable in your version field and make that same compiler variable part of the output file name. This way, you specify the version once, and that takes care of it in both places for you!

You just cannot refer to the existing version field through another "compiler variable". It is easy enough to just use a compiler variable in the version field and use the same value elsewhere instead.

Re: Customizing Output .EXE name...

Posted: Mon May 24, 2010 6:03 pm
by Edhy
Thanks Michael.

Re: Customizing Output .EXE name...

Posted: Fri Mar 02, 2012 5:43 pm
by tofutim
Hi Michael, I wanted to use a variable for the version field per your suggestion but ran into this issue:

2012-03-02_1553.png
2012-03-02_1553.png (20.86 KiB) Viewed 22597 times


Can I safely ignore the tip?

Re: Customizing Output .EXE name...

Posted: Mon Mar 05, 2012 5:38 am
by FrancescoT
Dear tofutim,

you should not ignore that warning.
Regards