Customizing Output .EXE name...

Got a problem you cannot solve? Try here.
Post Reply
Edhy
Posts: 138
Joined: Sun Jul 31, 2005 4:09 pm
Location: New York, USA

Customizing Output .EXE name...

Post 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
Edhy Rijo
Thom Child and Family Services
sdeschenes
Posts: 76
Joined: Wed Sep 12, 2007 3:34 pm

Re: Customizing Output .EXE name...

Post 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.
Edhy
Posts: 138
Joined: Sun Jul 31, 2005 4:09 pm
Location: New York, USA

Re: Customizing Output .EXE name...

Post 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!
Edhy Rijo
Thom Child and Family Services
ALive
Posts: 109
Joined: Mon Apr 27, 2009 5:54 am
Location: Russia

Re: Customizing Output .EXE name...

Post 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.
Attachments
OutputFile.png
OutputFile.png (22.32 KiB) Viewed 25966 times
Edhy
Posts: 138
Joined: Sun Jul 31, 2005 4:09 pm
Location: New York, USA

Re: Customizing Output .EXE name...

Post by Edhy »

Hi ALive,
Thanks for the information, will give it a try.
Edhy Rijo
Thom Child and Family Services
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: Customizing Output .EXE name...

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Edhy
Posts: 138
Joined: Sun Jul 31, 2005 4:09 pm
Location: New York, USA

Re: Customizing Output .EXE name...

Post by Edhy »

Thanks Michael.
Edhy Rijo
Thom Child and Family Services
tofutim
Posts: 176
Joined: Thu Mar 01, 2012 1:16 pm

Re: Customizing Output .EXE name...

Post 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 25618 times
Can I safely ignore the tip?
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Customizing Output .EXE name...

Post by FrancescoT »

Dear tofutim,

you should not ignore that warning.
Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply