summaryrefslogtreecommitdiff
path: root/qpid/packaging/windows/installer.proj
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/packaging/windows/installer.proj')
-rw-r--r--qpid/packaging/windows/installer.proj248
1 files changed, 248 insertions, 0 deletions
diff --git a/qpid/packaging/windows/installer.proj b/qpid/packaging/windows/installer.proj
new file mode 100644
index 0000000000..8481c7b8a2
--- /dev/null
+++ b/qpid/packaging/windows/installer.proj
@@ -0,0 +1,248 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!--
+ Packaging script for Apache Qpid on Windows
+
+ Builds the C++, .NET, and WCF components, and packages those along with user
+ documentation and the python pieces needed to generate QMF stuff.
+-->
+
+<Project DefaultTargets="Clean;Installer"
+ xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <PropertyGroup>
+ <build_dir>$(MSBuildProjectDirectory)\build</build_dir>
+ <source_root>$(MSBuildProjectDirectory)\..\..</source_root>
+ <staging_dir>$(MSBuildProjectDirectory)\stage</staging_dir>
+ <bits Condition="'$(bits)' == ''">32</bits>
+ <OutputName>qpidc</OutputName>
+ <OutputType>Package</OutputType>
+ <WixToolPath>C:\Program Files (x86)\Windows Installer XML v3.5\bin</WixToolPath>
+ <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.5\wix.targets</WixTargetsPath>
+ </PropertyGroup>
+
+ <Choose>
+ <When Condition="'$(bits)' == '64'">
+ <PropertyGroup>
+ <ProgramFiles>ProgramFiles64Folder</ProgramFiles>
+ <CmakeGenerator>%22Visual Studio 9 2008 Win64%22</CmakeGenerator>
+ <Architecture>x64</Architecture>
+ <CSProjArchitecture>x64</CSProjArchitecture>
+ <DotNetBindingsArchitecture>x64</DotNetBindingsArchitecture>
+ </PropertyGroup>
+ </When>
+ <Otherwise>
+ <PropertyGroup>
+ <ProgramFiles>ProgramFilesFolder</ProgramFiles>
+ <CmakeGenerator>%22Visual Studio 9 2008%22</CmakeGenerator>
+ <Architecture>x86</Architecture>
+ <CSProjArchitecture>Win32</CSProjArchitecture>
+ <DotNetBindingsArchitecture>Win32</DotNetBindingsArchitecture>
+ </PropertyGroup>
+ </Otherwise>
+ </Choose>
+
+ <ItemGroup>
+ <CppDebugProjects Include="$(build_dir)\src\qpidtypes.vcproj"/>
+ <CppDebugProjects Include="$(build_dir)\src\qpidcommon.vcproj"/>
+ <CppDebugProjects Include="$(build_dir)\src\qpidclient.vcproj"/>
+ <CppDebugProjects Include="$(build_dir)\src\qpidmessaging.vcproj"/>
+ <CppDebugProjects Include="$(build_dir)\src\qmfconsole.vcproj"/>
+ </ItemGroup>
+
+ <ItemGroup>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qpidtypesd.dll"/>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qpidtypesd.lib"/>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qpidtypesd.pdb"/>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qpidcommond.dll"/>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qpidcommond.lib"/>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qpidcommond.pdb"/>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qpidclientd.dll"/>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qpidclientd.lib"/>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qpidclientd.pdb"/>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qpidmessagingd.dll"/>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qpidmessagingd.lib"/>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qpidmessagingd.pdb"/>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qmfconsoled.dll"/>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qmfconsoled.lib"/>
+ <CppDebugArtifacts Include="$(build_dir)\src\Debug\qmfconsoled.pdb"/>
+ </ItemGroup>
+
+ <ItemGroup>
+ <WcfProjects Include="$(source_root)\wcf\src\Apache\Qpid\**\*.csproj"/>
+ <WcfArtifacts Include="$(source_root)\wcf\src\Apache\Qpid\Channel\bin\Release\Apache.Qpid.Channel.dll"/>
+ <WcfArtifacts Include="$(source_root)\wcf\src\Apache\Qpid\Channel\bin\Release\Apache.Qpid.Interop.dll"/>
+ <WcfExamples Include="$(source_root)\wcf\samples\**\*"
+ Exclude="$(source_root)\wcf\samples\**\.svn\**"/>
+ </ItemGroup>
+
+ <ItemGroup>
+ <DotNetBindingArtifacts Include="$(build_dir)\src\Release\org.apache.qpid.messaging.dll"/>
+ <DotNetBindingArtifacts Include="$(build_dir)\src\Release\org.apache.qpid.messaging.pdb"/>
+ <DotNetBindingArtifacts Include="$(build_dir)\src\Release\org.apache.qpid.messaging.sessionreceiver.dll"/>
+ <DotNetBindingArtifacts Include="$(build_dir)\src\Release\org.apache.qpid.messaging.sessionreceiver.pdb"/>
+ </ItemGroup>
+
+ <ItemGroup>
+ <DotNetBindingDebugArtifacts Include="$(build_dir)\src\Debug\org.apache.qpid.messaging.dll"/>
+ <DotNetBindingDebugArtifacts Include="$(build_dir)\src\Debug\org.apache.qpid.messaging.pdb"/>
+ <DotNetBindingDebugArtifacts Include="$(build_dir)\src\Debug\org.apache.qpid.messaging.sessionreceiver.dll"/>
+ <DotNetBindingDebugArtifacts Include="$(build_dir)\src\Debug\org.apache.qpid.messaging.sessionreceiver.pdb"/>
+ </ItemGroup>
+
+ <ItemGroup>
+ <BoostDlls Include="$(staging_dir)\bin\boost_*.dll"/>
+ </ItemGroup>
+
+ <ItemGroup>
+ <WixExtension Include="WixUtilExtension">
+ <HintPath>$(WixToolPath)\WixUtilExtension.dll</HintPath>
+ </WixExtension>
+ <WixExtension Include="WixUIExtension">
+ <HintPath>$(WixToolPath)\WixUIExtension.dll</HintPath>
+ </WixExtension>
+ </ItemGroup>
+ <Import Project="$(WixTargetsPath)" />
+
+
+ <Target Name="Clean">
+ <RemoveDir
+ Directories="$(build_dir);$(staging_dir)" />
+ </Target>
+
+ <Target Name="MakeBuildDirs">
+ <MakeDir
+ Directories="$(build_dir);$(staging_dir)" />
+ </Target>
+
+ <Target Name="Configure" DependsOnTargets="MakeBuildDirs">
+ <Message Text="build: $(build_dir)"/>
+ <Message Text="stage: $(staging_dir)"/>
+ <Exec
+ Command="cmake -G $(CmakeGenerator) -DCMAKE_INSTALL_PREFIX=$(staging_dir) $(cmake_options) $(source_root)\cpp"
+ WorkingDirectory="$(build_dir)" />
+ </Target>
+
+ <Target Name="BuildCpp" DependsOnTargets="Configure">
+ <!-- Using VCBuild here with a set of vcproj files misses the
+ dependencies, so use devenv to pick up everything. -->
+ <!-- Need to ignore the exit code until QMF engine builds clean -->
+ <Exec
+ Command="devenv qpid-cpp.sln /build Release /Project ALL_BUILD"
+ WorkingDirectory="$(build_dir)"
+ IgnoreExitCode="true" />
+ </Target>
+
+ <Target Name="BuildCppDebug" DependsOnTargets="Configure">
+ <VCBuild
+ Projects="@(CppDebugProjects)"
+ SolutionFile="$(build_dir)/qpid-cpp.sln"
+ Configuration="Debug" />
+ </Target>
+
+ <!-- StopOnFirstFailure needed to avoid a weird error trying to compile WIN32 -->
+ <Target Name="BuildWcf" DependsOnTargets="BuildCpp">
+ <MSBuild
+ Projects="$(source_root)\wcf\QpidWcf.sln"
+ Properties="Configuration=Release;Platform=$(CSProjArchitecture)"
+ StopOnFirstFailure="false" />
+ </Target>
+
+ <Target Name="BuildDocs" DependsOnTargets="Configure">
+ <VCBuild
+ Projects="$(build_dir)\docs\api\docs-user-api.vcproj"
+ SolutionFile="$(build_dir)/qpid-cpp.sln"
+ Configuration="Release" />
+ </Target>
+
+ <Target Name="BuildDotNetBindings"><!-- DependsOnTargets="BuildCpp;BuildCppDebug" -->
+ <MSBuild
+ Projects="$(source_root)\cpp\bindings\qpid\dotnet\org.apache.qpid.messaging.sessionreceiver.sln"
+ Properties="Configuration=Debug;Platform=$(Architecture)" />
+ <MSBuild
+ Projects="$(source_root)\cpp\bindings\qpid\dotnet\org.apache.qpid.messaging.sessionreceiver.sln"
+ Properties="Configuration=Release;Platform=$(Architecture)" />
+ </Target>
+
+ <Target Name="Stage"
+ DependsOnTargets="BuildCpp;BuildCppDebug;BuildWcf;BuildDocs;BuildDotNetBindings">
+ <Exec
+ Command="cmake -DCMAKE_INSTALL_CONFIG_NAME=%22Release%22 -P $(build_dir)\cmake_install.cmake" />
+ <Copy
+ SourceFiles="@(CppDebugArtifacts)"
+ DestinationFolder="$(staging_dir)\bin" />
+ <Copy
+ SourceFiles="@(WcfArtifacts)"
+ DestinationFolder="$(staging_dir)\bin" />
+ <Copy
+ SourceFiles="@(WcfExamples)"
+ DestinationFiles="@(WcfExamples->'$(staging_dir)\examples\%(RecursiveDir)%(Filename)%(Extension)')" />
+ <Copy
+ SourceFiles="@(DotNetBindingArtifacts)"
+ DestinationFolder="$(staging_dir)\bin" />
+ <Copy
+ SourceFiles="@(DotNetBindingDebugArtifacts)"
+ DestinationFolder="$(staging_dir)\bin\Debug" />
+ </Target>
+
+ <Target Name="Installer" DependsOnTargets="Stage">
+ <!-- Would be nice to use the WiX Tasks but I'm getting what I think are
+ errors mixing 32- and 64-bit artifacts.
+ <HeatDirectory
+ ToolPath="$(WixToolPath)"
+ Directory="$(staging_dir)\include\boost"
+ ComponentGroupName="group_BoostHeaders"
+ OutputFile="boost_headers.wxs" />
+ <HeatFile
+ ToolPath="$(WixToolPath)"
+ File="@(BoostDlls)"
+ ComponentGroupName="group_BoostDlls"
+ DirectoryRefId="QpidBin"
+ OutputFile="boost_dlls.wxs" />
+ <Candle
+ ToolPath="$(WixToolPath)"
+ DefineConstants="qpidc_version=0.11"
+ InstallerPlatform="x64"
+ OutputFile="qpidc-0.11-x64.msi" />
+ -->
+ <Exec
+ Command="heat dir $(staging_dir)\include\qpid -var var.qpid_headers_dir -dr QpidInclude -gg -cg group_QpidHeaders -out qpid_headers.wxs" />
+ <Exec
+ Command="heat dir $(staging_dir)\include\boost -var var.boost_headers_dir -dr QpidInclude -gg -cg group_BoostHeaders -out boost_headers.wxs" />
+ <!-- HEAT5150 warns about self-registering DLLs; don't care -->
+ <Exec
+ Command="heat dir $(staging_dir)\bin\boost -var var.boost_dll_dir -dr QpidBin -srd -gg -cg group_BoostDlls -sw5150 -out boost_dlls.wxs" />
+ <Exec
+ Command="heat file $(staging_dir)\examples\README.txt -var var.examples_dir -dr INSTALLLOCATION -gg -cg group_Examples -out examples_README.wxs" />
+ <Exec
+ Command="heat file $(staging_dir)\examples\examples.sln -var var.examples_dir -dr INSTALLLOCATION -gg -cg group_Examples -out examples_examples.wxs" />
+ <Exec
+ Command="heat dir $(staging_dir)\examples\messaging -var var.examples_dir -dr INSTALLLOCATION -gg -cg group_Examples -out examples_messaging.wxs" />
+ <Exec
+ Command="heat dir $(staging_dir)\examples\qmf-console -var var.examples_dir -dr INSTALLLOCATION -gg -cg group_Examples -out examples_qmf-console.wxs" />
+ <Exec
+ Command="heat dir $(staging_dir)\docs\api -var var.api_docs_dir -dr QpidDoc -gg -cg group_APIDocs -out api_docs.wxs" />
+ <Exec
+ Command="candle -dqpidc_version=0.11 -dProgramFiles=$(ProgramFiles) -dstaging_dir=$(staging_dir) -dqpid_headers_dir=$(staging_dir)\include\qpid -dboost_headers_dir=$(staging_dir)\include\boost -dboost_dll_dir=$(staging_dir)\bin\boost -dexamples_dir=$(staging_dir)\examples -dapi_docs_dir=$(staging_dir)\docs\api -ext WiXNetFxExtension qpidc.wxs qpid_headers.wxs boost_headers.wxs boost_dlls.wxs examples.wxs api_docs.wxs -arch $(Architecture)" />
+ <Exec
+ Command="light -ext WiXNetFxExtension -ext WixUtilExtension -ext WixUIExtension -cultures:en-us -out qpidc-0.11-$(Architecture).msi qpidc.wixobj qpid_headers.wixobj boost_headers.wixobj boost_dlls.wixobj examples_README.wixobj examples_examples.wixobj examples_messaging.wixobj examples_qmf-console.wixobj api_docs.wixobj" />
+ </Target>
+
+</Project>