Permalink
Browse files

Windows Installation

Adds a Wix 3.6 project for the Windows installer.
  • Loading branch information...
1 parent 30efb90 commit 4d6c2f4c6737a72e5a01c2cd360f8624dd528ef6 @jeffwilcox jeffwilcox committed Dec 14, 2012
Showing with 209 additions and 0 deletions.
  1. +119 −0 tools/windows/Product.wxs
  2. +20 −0 tools/windows/azure-cli.sln
  3. +53 −0 tools/windows/azure-cli.wixproj
  4. +17 −0 tools/windows/build.cmd
View
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+
+ <?define ProductVersion="0.6.8" ?>
+
+ <?define ProductName = "Windows Azure Command Line Tools" ?>
+ <?define ProductDescription = "Node.js" ?>
+ <?define ProductAuthor = "Microsoft Corporation" ?>
+ <?define ProductResources = "..\resources\" ?>
+
+ <Product Id="*"
+ Name="$(var.ProductName)"
+ Language="1033"
+ Version="$(var.ProductVersion)"
+ Manufacturer="$(var.ProductAuthor)"
+ UpgradeCode="6dd1d1f3-4908-450d-8127-d9ce638646d9">
+
+ <Package InstallerVersion="200"
+ Compressed="yes"
+ InstallScope="perMachine" />
+
+ <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
+
+ <Media Id="1" Cabinet="WindowsAzureCLI.cab" EmbedCab="yes" CompressionLevel="high" />
+
+ <Icon Id="AzureIcon" SourceFile="$(var.ProductResources)windowsazure.ico" />
+
+ <Property Id="ARPPRODUCTICON" Value="AzureIcon" />
+ <Property Id="ARPHELPLINK" Value="http://www.microsoft.com/windowsazure/sdk" />
+ <Property Id="ARPURLINFOABOUT" Value="http://www.microsoft.com/windowsazure/support" />
+ <Property Id="ARPURLUPDATEINFO" Value="http://www.microsoft.com/windowsazure/sdk" />
+ <Property Id="ApplicationFolderName" Value="Microsoft SDKs\Windows Azure" />
+ <Property Id="WixAppFolder" Value="WixPerMachineFolder" />
+
+ <Feature Id="ProductFeature"
+ Title="Windows Azure Command Line Tools"
+ Level="1"
+ AllowAdvertise="no">
+ <ComponentGroupRef Id="ProductComponents" />
+ </Feature>
+
+ <!-- User Interface -->
+ <WixVariable Id="WixUILicenseRtf" Value="$(var.ProductResources)License.rtf"/>
+ <WixVariable Id="WixUIDialogBmp" Value="$(var.ProductResources)Dialog.bmp" />
+ <WixVariable Id="WixUIBannerBmp" Value="$(var.ProductResources)Banner.bmp" />
+
+ <UIRef Id="WixUI_Advanced"/>
+
+ </Product>
+
+ <Fragment>
+ <Directory Id="TARGETDIR" Name="SourceDir">
+ <Directory Id="ProgramFilesFolder">
+ <Directory Id="APPLICATIONFOLDER">
+ <Directory Id="AZURECLIFOLDER" Name="CLI">
+ <Directory Id="VersionDir" Name="$(var.ProductVersion)">
+ <Directory Id="DynamicCliDir"/>
+ </Directory>
+ </Directory>
+ </Directory>
+ </Directory>
+ </Directory>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="AzureCliSettingsGroup">
+ <Component Id="AzureCliSystemPath"
+ Directory="DynamicCliDir"
+ Guid="{5169C84A-A6EF-4D2E-9A54-A9247FE09016}">
+ <Environment Id="AzureCliAddedToPATH"
+ Name="PATH"
+ Value="[DynamicCliDir]wbin"
+ Permanent="yes"
+ Part="last"
+ Action="set"
+ System="yes" />
+ <CreateFolder />
+ </Component>
+ <Component Id="AzureCliUserPath"
+ Directory="DynamicCliDir"
+ Guid="{ED34DCDF-112F-4CAF-8BCC-06C2EB005308}">
+ <Environment Id="AzureCliAddedToUserPATH"
+ Name="PATH"
+ Value="[DynamicCliDir]wbin"
+ Permanent="yes"
+ Part="last"
+ Action="set"
+ System="no" />
+ <CreateFolder />
+ </Component>
+ <Component Id="AzureCliRegistry"
+ Directory="DynamicCliDir"
+ Guid="{9D27CB5B-40F9-475C-AC1C-0DD48D87088B}">
+ <RegistryValue Root="HKCU"
+ Key="Software\Microsoft\$(var.ProductName)"
+ Name="installed"
+ Type="integer"
+ Value="1"
+ KeyPath="yes"/>
+ </Component>
+ <Component Id="AzureCliVersion"
+ Directory="DynamicCliDir"
+ Guid="{5D62AC48-3FC1-4664-854F-864FBCBA394A}">
+ <RegistryValue Root="HKCU"
+ Key="Software\Microsoft\$(var.ProductName)"
+ Name="version"
+ Type="string"
+ Value="$(var.ProductVersion)"
+ KeyPath="yes"/>
+ </Component>
+ </ComponentGroup>
+
+ <ComponentGroup Id="ProductComponents">
+ <ComponentGroupRef Id="AzureCliComponentGroup"/>
+ <ComponentGroupRef Id="AzureCliSettingsGroup"/>
+ </ComponentGroup>
+
+ </Fragment>
+</Wix>
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "azure-cli", "azure-cli.wixproj", "{9A0DC66D-3186-4EE4-B471-6C0F1DD6E159}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x86 = Debug|x86
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9A0DC66D-3186-4EE4-B471-6C0F1DD6E159}.Debug|x86.ActiveCfg = Debug|x86
+ {9A0DC66D-3186-4EE4-B471-6C0F1DD6E159}.Debug|x86.Build.0 = Debug|x86
+ {9A0DC66D-3186-4EE4-B471-6C0F1DD6E159}.Release|x86.ActiveCfg = Release|x86
+ {9A0DC66D-3186-4EE4-B471-6C0F1DD6E159}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <!-- Local WiX -->
+ <PropertyGroup>
+ <LocalWixRoot>..\..\..\azure-sdk-for-net-installer\Binaries\wix\3.6.3303.0\</LocalWixRoot>
+ <WixToolPath>$(LocalWixRoot)</WixToolPath>
+ <WixTargetsPath>$(WixToolPath)Wix.targets</WixTargetsPath>
+ <WixTasksPath>wixtasks.dll</WixTasksPath>
+ </PropertyGroup>
+ <!-- Project -->
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>3.6</ProductVersion>
+ <ProjectGuid>9a0dc66d-3186-4ee4-b471-6c0f1dd6e159</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>Windows Azure Command Line Tools</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>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>out\$(Configuration)\</OutputPath>
+ <IntermediateOutputPath>out\obj\$(Configuration)\</IntermediateOutputPath>
+ <DefineConstants>Debug;AzureCliSource=$(TEMP)\azure-cli</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>out\</OutputPath>
+ <IntermediateOutputPath>out\obj\$(Configuration)\</IntermediateOutputPath>
+ <DefineConstants>AzureCliSource=$(TEMP)\azure-cli</DefineConstants>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="out\azure-cli.wxs">
+ <Link>azure-cli.wxs</Link>
+ </Compile>
+ <Compile Include="Product.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\resources\windowsazure.ico" />
+ </ItemGroup>
+ <!-- UI -->
+ <ItemGroup>
+ <WixExtension Include="WixUIExtension">
+ <HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
+ <Name>WixUIExtension</Name>
+ </WixExtension>
+ </ItemGroup>
+ <Import Project="$(WixTargetsPath)" />
+ <Target Name="BeforeBuild">
+ <!-- Directory=".\out\azure-cli" -->
+ <HeatDirectory Directory="$(TEMP)\azure-cli" ToolPath="$(WixToolPath)" AutogenerateGuids="true" ComponentGroupName="AzureCliComponentGroup" SuppressRootDirectory="true" DirectoryRefId="DynamicCliDir" OutputFile="out\azure-cli.wxs" PreprocessorVariable="var.AzureCliSource" />
+ </Target>
+</Project>
View
@@ -0,0 +1,17 @@
+@echo off
+echo Building the Windows Installer...
+echo NOTE: This needs to be run from a .NET developer command prompt with msbuild in the path.
+echo.
+
+pushd %~dp0
+
+echo Creating a local close of the current repo bits...
+CALL scripts\prepareRepoClone.cmd
+
+echo Building MSI...
+msbuild /t:rebuild /p:Configuration=Release
+
+echo.
+start .\out\
+
+popd

0 comments on commit 4d6c2f4

Please sign in to comment.