我有一个脚本,让我的产品给一个变量“的ProductVersion”的IE版本号期间在威克斯动态改变产品版本,如何每个MSI创建
PRODUCTVERSION= subprocess.check_output('svnversion c:\sandbox -n', shell=False)
我想通过这个变量“ PRODUCTVERSION'作为wix的msbuild属性。下面是我试过,但有一个错误结束了他说的代码,
light.exe : error LGHT0001: Illegal characters in path.
这里是我的脚本,
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])
凡在我的WiX的项目性质是,
<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>
我想将我的输出名称显示为'myapp-2.0.PRODUCTVERSION',其中PRODUCTVERSION是我从我的python脚本获得的版本号。请帮我找到一个解决方案。
我想PRODUCTVERSION,我发送作为属性wix在%(myVersionNumber)。我将如何使用该? – Aramanethota 2013-03-25 03:58:11
我认为这可能是你之后:http://stackoverflow.com/questions/13233143/anyway-to-create-a-custom-msbuild-property-in-wix-wxs-file – mattyB 2013-03-25 09:08:38