I have a script where i get the version number of my product to a variable 'PRODUCTVERSION' i.e,
PRODUCTVERSION= subprocess.check_output('svnversion c:\sandbox -n', shell=False)
I want to pass this variable 'PRODUCTVERSION' as a msbuild property to wix. Below is the code which i tried but ending up with an error saying,
light.exe : error LGHT0001: Illegal characters in path.
Here's my script,
def build(self,projpath):
PRODUCTVERSION= subprocess.check_output('svnversion c:\sandbox -n', shell=False)
arg1 = '/t:Rebuild'
arg2 = '/p:Configuration=Release'
arg3 = '/p:Platform=x86'
arg4 = '/p:ProductVersion=%PRODUCTVERSION%'
p = subprocess.call([self.msbuild,projpath,arg1,arg2,arg3])
where properties in my wix projects is,
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>$(ProductVersion)</ProductVersion>
<ProjectGuid>{d559ac98-4dc7-4078-b054-fe0da8363ad0}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>myapp.$(ProductVersion)</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixVariables>Version=$(ProductVersion)</WixVariables>
</PropertyGroup>
I want to display my output name as 'myapp-2.0.PRODUCTVERSION' ,where PRODUCTVERSION is the version number what i get from my python script.Please help me find a solution for this.