I should mention - when I say it built ok, I mean it compiled without
complaint, but there was no version. It was just my_cool_software.msi

So I'm not sure if variable substitution works and I haven't put the setting
of filever in the right place, or variable substitution does not work for
output names.

On Fri, Jan 16, 2009 at 11:56 AM, Colin Fox <greenene...@gmail.com> wrote:

> I am using WiX v3, so I'll give this a try. I haven't heard of binder
> variables, so I'll go look them up.
>
> One other issue is that of the msi filename itself. I would really like to
> be able to use a variable in the OutputName field, so I could do something
> like: OutputName=my_cool_software_$(filever), assuming I can take the
> version number and replace the periods with underscores, so the final msi is
> named my_cool_software_1_2_3.msi
>
> Unfortunately, athough there seems to be numerous places in the wixproj
> file that let you use variables, when I set the OutputName to have $()
> characters, I get this:
>
> my_cool_software%24%28filever%29
>
> So is variable substitution not allowed in output names? Or is this a bug?
>
> I did set the value manually in the file with a plain text editor, and it
> built ok, but when I tried to change it in Votive it stomped my nice
> variable declaration with this.
>
> Thanks,
>    Colin
>
>
> On Thu, Jan 15, 2009 at 8:02 AM, Rob Mensching <
> rob.mensch...@microsoft.com> wrote:
>
>> Another option, if you are using WiX v3 is to use a binder variable to
>> grab the file version directly.  Something like
>> "!(bind.FileVersion.FileId)".
>>
>> -----Original Message-----
>> From: Reggie Burnett [mailto:r...@comcast.net]
>> Sent: Thursday, January 15, 2009 04:50
>> To: General discussion for Windows Installer XML toolset.
>> Subject: Re: [WiX-users] Getting the version from the Assembly file
>>
>> I ship 4 binary components that all have the same version so I use a
>> small snippet in my msbuild script that reads the version # from one
>> of the components and then passes that into to wix through a
>> preprocessor var.
>>
>> On Tue, Jan 13, 2009 at 6:44 PM, Michael Osmond <mosm...@baytech.com.au>
>> wrote:
>> > Colin,
>> >
>> > You can set an environment variable in the build process and then access
>> > that inside wix as $(env.projectVersion)
>> >
>> > Or you can set an Wix variable in the candle command line
>> >        "candle -dMyProject.Version=<value>"
>> >
>> > Michael
>> >
>> > -----Original Message-----
>> > From: Colin Fox [mailto:greenene...@gmail.com]
>> > Sent: Wednesday, 14 January 2009 10:11 AM
>> > To: General discussion for Windows Installer XML toolset.
>> > Subject: Re: [WiX-users] Getting the version from the Assembly file
>> >
>> > Yes - our current release strategy is to always release major upgrades.
>> > The entire MSI is under 10 megs so it's not a huge deal.
>> >
>> > I'm relatively new to the company, and this process has been in place
>> > since long before I got here, but part of the build process is to use a
>> > build tool to set the version number, and it goes and modifies some
>> > files. I was hoping to streamline things a bit and just modify one file
>> > and have the version be deduced by the rest of the system.
>> >
>> > If it can't be done through a wix variable, then I can probably modify
>> > the build tool to change the wix file, but that just feels wrong (not to
>> > mention will cause unnecessary changes for our revision control system).
>> >
>> > On Tue, Jan 13, 2009 at 3:14 PM, Rob Mensching
>> > <rob.mensch...@microsoft.com>wrote:
>> >
>> >> Are you always going to release using Major Upgrades?  If not, then
>> >> you need to keep the name constant.  That fact is why you don't see
>> >> many people putting the version number in the MSI name.  Not a common
>> >> request thus not necessarily simple to implement.
>> >>
>> >> -----Original Message-----
>> >> From: Colin Fox [mailto:greenene...@gmail.com]
>> >> Sent: Tuesday, January 13, 2009 14:36
>> >> To: wix-users
>> >> Subject: [WiX-users] Getting the version from the Assembly file
>> >>
>> >> Hi everyone.
>> >>
>> >> I'd like go be able to set the version of my application in the
>> >> assembly.cs file, and have it used in both the wix file and also in
>> > the wix file name.
>> >>
>> >> So if my app is version 1.2.3, I'd like the .msi file to be called
>> >> "MyAmazingApp_1_2_3.msi" or something equivalent.
>> >>
>> >> I've seen some articles on the net about pulling an assembly version
>> >> and putting it into the wix file but they all seem like giant hacks.
>> >>
>> >> It seems to me that since versions seem to feature so prominently, it
>> >> makes sense to integrate them more smoothly into the build system. And
>> >
>> >> you shouldn't have to set it in more than one place.
>> >>
>> >> How difficult would it be to create another candle varable, such as
>> >> $(var.MyProject.Version) ?
>> >>
>> >> Is this something I can add myself, or do I have to jump through those
>> >
>> >> ugly hoops?
>> >>
>> >> --
>> >> Regards,
>> >>  cf
>> >>
>>
>>
>
>
> --
> Regards,
>  cf
>



-- 
Regards,
 cf
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to