I think there are a number of alternatives, but the one I use personally is to
include a dependent project in the VS2010 solution that generates a version.wxi
file that I then include in the installer's wxs file using the WiX preprocessor
e.g. <?include "version.wxi"?>. The generated version.wxi looks something like:
<?xml version="1.0" encoding="utf-8"?>
<Include>
<?define ProductVersion = "1.0.0" ?>
</Include>
so it is very easy to generate and could even be done with a Makefile project
and a batch script, or even in a pre-build step. I use a separate project
because I also generate version information for resources, splash screens, etc.
Once you have included version.wxi in your wxs you can refer to the product
version as $(var.ProductVersion).
Daniel Madill
www.quanser.com
-----Original Message-----
From: Don Reba [mailto:[email protected]]
Sent: February-10-13 2:05 AM
To: [email protected]
Subject: [WiX-users] VS - version number from file
If I run Candle from the command line, I can set an environmental variable
to the contents of the file containing my project version number:
set/p ProjectVersion=<version.txt
I can then use refer to it as $(env.ProjectVersion) in the Candle source
file. However, I have not found a way to do the same in Visual Studio 2010.
Environmental variables set in a pre-build event do not seem to show up. Is
there an alternative?
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users