From 637b1d39f45674b9df70c85844ac24b7f80ad959 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Fri, 27 Oct 2017 11:21:18 -0700 Subject: [PATCH 1/2] Revert "Add macos launcher. (#5138)" This reverts commit 01fe7c24eb58b18e0bf07c6f1f7fc14c42cf2208. --- .../PowerShell.app/Contents/Info.plist | 28 ------------- .../Contents/MacOS/PowerShell.sh | 2 - tools/packaging/packaging.psm1 | 42 ------------------- 3 files changed, 72 deletions(-) delete mode 100755 tools/packaging/macos/launcher/ROOT/Applications/PowerShell.app/Contents/Info.plist delete mode 100755 tools/packaging/macos/launcher/ROOT/Applications/PowerShell.app/Contents/MacOS/PowerShell.sh diff --git a/tools/packaging/macos/launcher/ROOT/Applications/PowerShell.app/Contents/Info.plist b/tools/packaging/macos/launcher/ROOT/Applications/PowerShell.app/Contents/Info.plist deleted file mode 100755 index f85b0ed0495..00000000000 --- a/tools/packaging/macos/launcher/ROOT/Applications/PowerShell.app/Contents/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleExecutable - PowerShell.sh - CFBundleGetInfoString - 1.0 - CFBundleIconFile - Powershell - CFBundleIdentifier - powershell - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - PowerShell - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSupportedPlatforms - - MacOSX - - CFBundleVersion - 1.0 - - diff --git a/tools/packaging/macos/launcher/ROOT/Applications/PowerShell.app/Contents/MacOS/PowerShell.sh b/tools/packaging/macos/launcher/ROOT/Applications/PowerShell.app/Contents/MacOS/PowerShell.sh deleted file mode 100755 index d20a8780b4a..00000000000 --- a/tools/packaging/macos/launcher/ROOT/Applications/PowerShell.app/Contents/MacOS/PowerShell.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -open /usr/local/bin/pwsh diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 49d55d09bc9..8f9aed023a5 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -629,48 +629,6 @@ function New-UnixPackage { "$GzipFile=$ManFile", "/tmp/pwsh=$Link" ) - - # Add macOS powershell launcher - if($Type -eq "osxpkg") - { - if($pscmdlet.ShouldProcess("Add macOS launch application")) { - # Define folder for launch application. - $macosapp = "$PSScriptRoot/macos/launcher/ROOT/Applications/Powershell.app" - - # Update icns file. - $iconfile = "$PSScriptRoot/../../assets/Powershell.icns" - $iconfilebase = (Get-Item -Path $iconfile).BaseName - # Create Resources folder, ignore error if exists. - New-Item -Force -ItemType Directory -Path "$macosapp/Contents/Resources" | Out-Null - Copy-Item -Force -Path $iconfile -Destination "$macosapp/Contents/Resources" - - # Set values in plist. - $plist = "$macosapp/Contents/Info.plist" - Start-NativeExecution { - defaults write $plist CFBundleIdentifier $Name - defaults write $plist CFBundleVersion $Version - defaults write $plist CFBundleShortVersionString $Version - defaults write $plist CFBundleGetInfoString $Version - defaults write $plist CFBundleIconFile $iconfilebase - } - - # Convert to XML plist, needed because defaults native - # app auto converts it to binary format when it modify - # the plist file. - Start-NativeExecution { - plutil -convert xml1 $plist - } - # Set permissions. - Start-NativeExecution { - find $macosapp | xargs chmod 755 - } - - # Add app folder to fpm paths. - $appsfolder = (Resolve-Path -Path "$macosapp/..").Path - $Arguments += "$appsfolder=/" - } - } - # Build package try { if($pscmdlet.ShouldProcess("Create $type package")) { From 0974b25b65f25e35b4371469ca0f17a8e5a3b1ac Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Fri, 27 Oct 2017 12:52:26 -0700 Subject: [PATCH 2/2] Triggering build