From 256ce72ed1658a91534cac834e42754f43a3c590 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 1 Aug 2017 17:24:31 -0700 Subject: [PATCH] Remove appx packaging related script (#4376) --- build.psm1 | 111 --------------------------------- tools/packaging/packaging.psm1 | 12 +--- 2 files changed, 1 insertion(+), 122 deletions(-) diff --git a/build.psm1 b/build.psm1 index 5e31ad8b1d..d3544287e6 100644 --- a/build.psm1 +++ b/build.psm1 @@ -2168,117 +2168,6 @@ function New-MSIPackage $msiLocationPath } -# Function to create an Appx package compatible with Windows 8.1 and above -function New-AppxPackage -{ - [CmdletBinding()] - param ( - - # Name of the Package - [ValidateNotNullOrEmpty()] - [string] $PackageName = 'PowerShell', - - # Suffix of the Name - [string] $PackageNameSuffix, - - # Version of the Package - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $PackageVersion, - - # Source Path to the Binplaced Files - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $PackageSourcePath, - - # Path to Assets folder containing Appx specific artifacts - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $AssetsPath - ) - - $PackageSemanticVersion = Get-PackageSemanticVersion -Version $PackageVersion - - $PackageVersion = Get-PackageVersionAsMajorMinorBuildRevision -Version $PackageVersion - Write-Verbose "Package Version is $PackageVersion" - - $win10sdkBinPath = Get-Win10SDKBinDir - - Write-Verbose "Ensure Win10 SDK is present on the machine @ $win10sdkBinPath" - if (-not (Test-Win10SDK)) { - throw "Install Win10 SDK prior to running this script - https://go.microsoft.com/fwlink/p/?LinkID=698771" - } - - Write-Verbose "Ensure Source Path is valid - $PackageSourcePath" - if (-not (Test-Path $PackageSourcePath)) { - throw "Invalid PackageSourcePath - $PackageSourcePath" - } - - Write-Verbose "Ensure Assets Path is valid - $AssetsPath" - if (-not (Test-Path $AssetsPath)) { - throw "Invalid AssetsPath - $AssetsPath" - } - - Write-Verbose "Initialize MakeAppx executable path" - $makeappxExePath = Join-Path $win10sdkBinPath "MakeAppx.exe" - - $appxManifest = @" - - - - PowerShell - Microsoft Corporation - #LOGO# - - - - - - - - - - - - - - - - - - -"@ - - $appxManifest = $appxManifest.Replace('#VERSION#', $PackageVersion) - $appxManifest = $appxManifest.Replace('#LOGO#', 'Assets\Powershell_256.png') - $appxManifest = $appxManifest.Replace('#SQUARE150x150LOGO#', 'Assets\Powershell_256.png') - $appxManifest = $appxManifest.Replace('#SQUARE44x44LOGO#', 'Assets\Powershell_48.png') - - Write-Verbose "Place Appx Manifest in $PackageSourcePath" - $appxManifest | Out-File "$PackageSourcePath\AppxManifest.xml" -Force - - $assetsInSourcePath = Join-Path $PackageSourcePath 'Assets' - New-Item $assetsInSourcePath -type directory -Force | Out-Null - - Write-Verbose "Place AppxManifest dependencies such as images to $assetsInSourcePath" - Copy-Item "$AssetsPath\*.png" $assetsInSourcePath -Force - - $appxPackageName = $PackageName + "-" + $PackageSemanticVersion - if ($PackageNameSuffix) { - $appxPackageName = $appxPackageName, $PackageNameSuffix -join "-" - } - $appxLocationPath = "$pwd\$appxPackageName.appx" - Write-Verbose "Calling MakeAppx from $makeappxExePath to create the package @ $appxLocationPath" - & $makeappxExePath pack /o /v /d $PackageSourcePath /p $appxLocationPath | Write-Verbose - - Write-Verbose "Clean-up Appx artifacts and Assets from $SourcePath" - Remove-Item $assetsInSourcePath -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item "$PackageSourcePath\AppxManifest.xml" -Force -ErrorAction SilentlyContinue - - Write-Verbose "You can find the APPX @ $appxLocationPath" -Verbose - $appxLocationPath -} - function Start-CrossGen { [CmdletBinding()] param( diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index bb6351079f..aab019d55d 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -19,7 +19,7 @@ function Start-PSPackage { [string]$Name = "powershell", # Ubuntu, CentOS, Fedora, OS X, and Windows packages are supported - [ValidateSet("deb", "osxpkg", "rpm", "msi", "appx", "zip", "AppImage", "nupkg")] + [ValidateSet("deb", "osxpkg", "rpm", "msi", "zip", "AppImage", "nupkg")] [string[]]$Type, # Generate windows downlevel package @@ -144,16 +144,6 @@ function Start-PSPackage { New-MSIPackage @Arguments } } - "appx" { - $Arguments = @{ - PackageNameSuffix = $NameSuffix - PackageSourcePath = $Source - PackageVersion = $Version - AssetsPath = "$PSScriptRoot\..\..\assets" - Force = $Force - } - New-AppxPackage @Arguments - } "AppImage" { if ($Environment.IsUbuntu14) { $null = Start-NativeExecution { bash -iex "$PSScriptRoot/../appimage.sh" }