Merge pull request #1187 in FS/freeswitch from ~ANDYWOLK/freeswitch:bugfix/FS-10034-fix-wix-to-respect-win32-x64-binary to master

* commit '9aae875bd7349e8602e1b3df2d6194864a54c927':
  FS-10034 [WIX] Fix WIX to respect Win32/x64 binary output folders.
This commit is contained in:
Ken Rice 2017-02-13 07:43:21 -06:00
commit 6049a72121
3 changed files with 49 additions and 12 deletions

View File

@ -0,0 +1,9 @@
REM This script reads the configure.ac
REM and outputs a version parsing the AC_INIT line
FOR /f "delims=" %%i in ('FIND /N "AC_INIT" ..\..\configure.ac') DO SET version_contained_string=%%i
FOR /f "tokens=2 delims=," %%a in ("%version_contained_string%") DO SET dirty_version=%%a
SET almost_clean_version=%dirty_version:[=%
SET version_with_spaces=%almost_clean_version:]=%
SET full_version=%version_with_spaces: =%
echo %full_version%

View File

@ -27,7 +27,7 @@
<?endif ?> <?endif ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="b004a325-1272-47e5-a415-a74e9fc99865" Name="$(var.ProductName)" Language="1033" Version="1.0.0.0" Manufacturer="FreeSWITCH" UpgradeCode="3af7020b-1348-45e8-a0cf-80909d4eb421"> <Product Id="b004a325-1272-47e5-a415-a74e9fc99865" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="FreeSWITCH" UpgradeCode="3af7020b-1348-45e8-a0cf-80909d4eb421">
<Package InstallerVersion="405" Compressed="yes" /> <Package InstallerVersion="405" Compressed="yes" />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /> <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="LoadDynamicVariables" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProductVersion>3.5</ProductVersion>
<ProjectGuid>{47213370-b933-487d-9f45-bca26d7e2b6f}</ProjectGuid> <ProjectGuid>{47213370-b933-487d-9f45-bca26d7e2b6f}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<OutputName>FreeSWITCH</OutputName> <OutputName>FreeSWITCH</OutputName>
@ -10,7 +9,7 @@
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath> <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\Win32\Debug\</OutputPath> <OutputPath>bin\x86\Debug\</OutputPath>
<IntermediateOutputPath>obj\X86\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\X86\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\Win32\debug\sounds;FreeSWITCHBaseDir=$(SolutionDir)Win32\$(Configuration);PlatformDir=Win32;</DefineConstants> <DefineConstants>Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf\vanilla;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\Win32\debug\sounds;FreeSWITCHBaseDir=$(SolutionDir)Win32\$(Configuration);PlatformDir=Win32;</DefineConstants>
<WixVariables> <WixVariables>
@ -415,17 +414,46 @@
<Content Include="filter.xslt" /> <Content Include="filter.xslt" />
</ItemGroup> </ItemGroup>
<Import Project="$(WixTargetsPath)" /> <Import Project="$(WixTargetsPath)" />
<PropertyGroup> <PropertyGroup Condition=" '$(Platform)' == 'x86' ">
<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"
"$(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"
"$(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>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'x64' ">
<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" <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"
"$(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" "$(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"
"$(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> "$(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>
</PropertyGroup> </PropertyGroup>
<Target Name="LoadDynamicVariables">
<Exec Command="$(SolutionDir)w32\Setup\FullVersion.cmd" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="FullVersion" />
</Exec>
<CreateProperty Condition="$(FullVersion) != ''" Value="ProductVersion=$(FullVersion);$(DefineConstants)">
<Output TaskParameter="Value" PropertyName="DefineConstants" />
</CreateProperty>
<CreateProperty Condition="'$(Platform)'=='x86'" Value="win32">
<Output TaskParameter="Value" PropertyName="UserFriendlyPlatform" />
</CreateProperty>
<CreateProperty Condition="'$(Platform)'=='x64'" Value="x64">
<Output TaskParameter="Value" PropertyName="UserFriendlyPlatform" />
</CreateProperty>
<CreateProperty Condition="$(FullVersion) != ''" Value="$(SolutionDir)$(UserFriendlyPlatform)\$(OutputName)-$(FullVersion)-$(UserFriendlyPlatform)-$(Configuration).msi">
<Output TaskParameter="Value" PropertyName="DestinationFileName" />
</CreateProperty>
</Target>
<!-- <!--
To modify your build process, add your task inside one of the targets below and uncomment it. To modify your build process, add your task inside one of the targets below.
Other similar extension points exist, see Wix.targets. Other similar extension points exist, see Wix.targets.
<Target Name="BeforeBuild"> -->
</Target> <Target Name="BeforeBuild">
<Target Name="AfterBuild"> <Message Importance="High" Text="Deleting previously created MSI files."/>
</Target> <Delete Files="$(OutputPath)$(OutputName).msi" />
--> <Delete Files="$(DestinationFileName)" />
</Target>
<Target Name="AfterBuild">
<Copy SourceFiles="$(OutputPath)$(OutputName).msi" DestinationFiles="$(DestinationFileName)" />
<Message Importance="High" Condition="Exists('$(DestinationFileName)')" Text="Success. An output MSI has been copied to $(DestinationFileName)"/>
</Target>
</Project> </Project>