<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="LoadDynamicVariables" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
<PropertyGroup>\r
- <ProductVersion>3.5</ProductVersion>\r
<ProjectGuid>{47213370-b933-487d-9f45-bca26d7e2b6f}</ProjectGuid>\r
<SchemaVersion>2.0</SchemaVersion>\r
<OutputName>FreeSWITCH</OutputName>\r
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">\r
- <OutputPath>bin\Win32\Debug\</OutputPath>\r
+ <OutputPath>bin\x86\Debug\</OutputPath>\r
<IntermediateOutputPath>obj\X86\$(Configuration)\</IntermediateOutputPath>\r
<DefineConstants>Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\Win32\debug\sounds;FreeSWITCHBaseDir=$(SolutionDir)Win32\$(Configuration);PlatformDir=Win32;</DefineConstants>\r
<WixVariables>\r
<Content Include="filter.xslt" />\r
</ItemGroup>\r
<Import Project="$(WixTargetsPath)" />\r
- <PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Platform)' == 'x86' ">\r
+ <PreBuildEvent>"$(WixToolPath)\heat.exe" dir "$(ProjectDir)..\..\conf\vanilla" -cg FreeSWITCHConfFiles -gg -scom -sreg -sfrag -srd -dr CONFLOCATION -var var.FreeSWITCHConfFilesDir -out "$(ProjectDir)Fragments\FreeSWITCHConfFiles.wxs"\r
+"$(WixToolPath)\heat.exe" dir "$(SolutionDir)Win32\$(Configuration)\sounds" -cg FreeSWITCHSoundFiles8 -gg -scom -sreg -sfrag -srd -dr SOUNDLOCATION -var var.FreeSWITCHSoundFilesDir -out "$(ProjectDir)Fragments\FreeSWITCHSoundFiles8.wxs"\r
+"$(WixToolPath)\heat.exe" dir "$(SolutionDir)Win32\$(Configuration)" -t $(ProjectDir)filter.xslt -cg FreeSWITCHBaseFiles -gg -scom -sreg -sfrag -srd -dr INSTALLLOCATION -var var.FreeSWITCHBaseDir -out "$(ProjectDir)Fragments\FreeSWITCHBaseFiles.wxs"</PreBuildEvent>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Platform)' == 'x64' ">\r
<PreBuildEvent>"$(WixToolPath)\heat.exe" dir "$(ProjectDir)..\..\conf\vanilla" -cg FreeSWITCHConfFiles -gg -scom -sreg -sfrag -srd -dr CONFLOCATION -var var.FreeSWITCHConfFilesDir -out "$(ProjectDir)Fragments\FreeSWITCHConfFiles.wxs"\r
"$(WixToolPath)\heat.exe" dir "$(SolutionDir)x64\$(Configuration)\sounds" -cg FreeSWITCHSoundFiles8 -gg -scom -sreg -sfrag -srd -dr SOUNDLOCATION -var var.FreeSWITCHSoundFilesDir -out "$(ProjectDir)Fragments\FreeSWITCHSoundFiles8.wxs"\r
"$(WixToolPath)\heat.exe" dir "$(SolutionDir)x64\$(Configuration)" -t $(ProjectDir)filter.xslt -cg FreeSWITCHBaseFiles -gg -scom -sreg -sfrag -srd -dr INSTALLLOCATION -var var.FreeSWITCHBaseDir -out "$(ProjectDir)Fragments\FreeSWITCHBaseFiles.wxs"</PreBuildEvent>\r
</PropertyGroup>\r
+ <Target Name="LoadDynamicVariables">\r
+ <Exec Command="$(SolutionDir)w32\Setup\FullVersion.cmd" ConsoleToMSBuild="true">\r
+ <Output TaskParameter="ConsoleOutput" PropertyName="FullVersion" />\r
+ </Exec>\r
+ <CreateProperty Condition="$(FullVersion) != ''" Value="ProductVersion=$(FullVersion);$(DefineConstants)">\r
+ <Output TaskParameter="Value" PropertyName="DefineConstants" />\r
+ </CreateProperty>\r
+ <CreateProperty Condition="'$(Platform)'=='x86'" Value="win32">\r
+ <Output TaskParameter="Value" PropertyName="UserFriendlyPlatform" />\r
+ </CreateProperty>\r
+ <CreateProperty Condition="'$(Platform)'=='x64'" Value="x64">\r
+ <Output TaskParameter="Value" PropertyName="UserFriendlyPlatform" />\r
+ </CreateProperty>\r
+ <CreateProperty Condition="$(FullVersion) != ''" Value="$(SolutionDir)$(UserFriendlyPlatform)\$(OutputName)-$(FullVersion)-$(UserFriendlyPlatform)-$(Configuration).msi">\r
+ <Output TaskParameter="Value" PropertyName="DestinationFileName" />\r
+ </CreateProperty>\r
+ </Target>\r
+\r
<!--\r
- To modify your build process, add your task inside one of the targets below and uncomment it.\r
- Other similar extension points exist, see Wix.targets.\r
- <Target Name="BeforeBuild">\r
- </Target>\r
- <Target Name="AfterBuild">\r
- </Target>\r
- -->\r
+ To modify your build process, add your task inside one of the targets below.\r
+ Other similar extension points exist, see Wix.targets.\r
+ -->\r
+ <Target Name="BeforeBuild">\r
+ <Message Importance="High" Text="Deleting previously created MSI files."/>\r
+ <Delete Files="$(OutputPath)$(OutputName).msi" /> \r
+ <Delete Files="$(DestinationFileName)" /> \r
+ </Target>\r
+\r
+ <Target Name="AfterBuild">\r
+ <Copy SourceFiles="$(OutputPath)$(OutputName).msi" DestinationFiles="$(DestinationFileName)" />\r
+ <Message Importance="High" Condition="Exists('$(DestinationFileName)')" Text="Success. An output MSI has been copied to $(DestinationFileName)"/>\r
+ </Target>\r
</Project>
\ No newline at end of file