Modify the wixproj.  You can do the heavy lifting in MSBuild and then just pass 
the constants across.

Ex:
  <Target Name="BeforeBuild">
    <ReadLinesFromFile File=" D:\Project\ESI\Code\trunk\lastVersion.txt ">
      <Output TaskParameter="Lines" PropertyName="SVNInfo" />
    </ReadLinesFromFile>
    <PropertyGroup>
      <DefineConstants>$(DefineConstants); SVNInfo=$(SVNInfo); 
</DefineConstants>
    </PropertyGroup>
  </Target>

As for the string tokenizing, you could write a simple inline task to strip 
everything after (and including) Build.

-----Original Message-----
From: Walter Dexter [mailto:wfdex...@gmail.com] 
Sent: Tuesday, February 11, 2014 8:23 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Read a value from a text file and use it in WIX source 
file

It may not be the most elegant way, but I'm doing the same thing by passing the 
contents of the file (first line anyway) as a command line argument to the 
linker.

I use a .cmd file to run the WiX ci mpile and link so its just a bit of batch 
file processing.

If you need an example I can get it for you once I get to work. Let me know.
On Feb 11, 2014 12:40 AM, "Suvrajyoti Panda" <suvrajyo...@contata.co.in>
wrote:

> Hi All,
>
> I have a requirement wherein in i need to read a value from a text 
> file located at  D:\Project\ESI\Code\trunk\lastVersion.txt. This file 
> contains a single  line as below:
>
> 6.0.0 Build 3280
>
> This 6.0.0 is basically the "version" . Now i want to read this value 
> of version and use it in the name of the product in the WIX source 
> file as
> below:
>
> <Product *Name**='Tort Installer 1.0'* 
> Id='5A1581BE-27C3-46A1-8699-4F1D642C97E0'
> UpgradeCode='C54B7D5D-0E66-43E8-A770-C9750693F057'
>      Language='1033' Codepage='1252' Version='1.0.0'
> Manufacturer='$(var.ManufacturerName)'>
>
> Instead of the "1.0" in the "Name" attribute i want to use the value 
> of "6.0.0" that is there in the text file mentioned above.
>
> Please let me know how can i go about solving this issue.
>
> Regards,
> Suvra Jyoti
>
> ----------------------------------------------------------------------
> --------
> Android apps run on BlackBerry 10
> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
> Now with support for Jelly Bean, Bluetooth, Mapview and more.
> Get your Android app in front of a whole new audience.  Start now.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.
> clktrk _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to