Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using System.Management.Automation.Remoting.Client;
using System.Management.Automation.Tracing;
using System.Net;
using System.Linq;
using System.Net.Sockets;
using System.Reflection;
using System.Runtime.InteropServices;
Expand Down
10 changes: 5 additions & 5 deletions tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -2370,20 +2370,20 @@ function Get-MacOSPackageIdentifierInfo
param(
[Parameter(Mandatory)]
[string]$Version,

[switch]$LTS
)

$IsPreview = Test-IsPreview -Version $Version -IsLTS:$LTS

# Determine package identifier based on preview status
if ($IsPreview) {
$PackageIdentifier = 'com.microsoft.powershell-preview'
}
else {
$PackageIdentifier = 'com.microsoft.powershell'
}

return @{
IsPreview = $IsPreview
PackageIdentifier = $PackageIdentifier
Expand Down Expand Up @@ -4204,7 +4204,7 @@ function Start-MsiBuild {
# suppress ICE61, because we allow same version upgrades
# suppress ICE57, this suppresses an error caused by our shortcut not being installed per user
# suppress ICE40, REINSTALLMODE is defined in the Property table.
Start-NativeExecution -VerboseOutputOnError {& $wixPaths.wixLightExePath -sice:ICE61 -sice:ICE40 -sice:ICE57 -out $msiLocationPath -pdbout $msiPdbLocationPath $objectPaths $extensionArgs }
Start-NativeExecution -VerboseOutputOnError {& $wixPaths.wixLightExePath -sval -sice:ICE61 -sice:ICE40 -sice:ICE57 -out $msiLocationPath -pdbout $msiPdbLocationPath $objectPaths $extensionArgs }

foreach($file in $objectPaths)
{
Expand Down
14 changes: 10 additions & 4 deletions tools/wix/wix.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,16 @@ function Install-Wix
}
$binPath = Join-Path -Path $targetRoot -ChildPath 'bin'

$psresourceGet = Get-Module -ListAvailable -Name 'Microsoft.PowerShell.PSResourceGet' -ErrorAction SilentlyContinue

if (-not $psresourceGet) {
Install-Module -Name 'Microsoft.PowerShell.PSResourceGet' -Force -AllowClobber -Scope CurrentUser
$psresourceGet = Get-Module -ListAvailable -Name 'Microsoft.PowerShell.PSResourceGet' -ErrorAction SilentlyContinue | Select-Object -First 1

if (-not $psresourceGet -or $psresourceGet.Version -lt [version]"1.2.0") {
try {
Register-PSRepository -Name 'powershell-cfs' -SourceLocation 'https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShell/nuget/v2' -InstallationPolicy Trusted
Install-Module -Name 'Microsoft.PowerShell.PSResourceGet' -Force -AllowClobber -Scope CurrentUser -Repository 'powershell-cfs'
}
finally {
Unregister-PSRepository -Name 'powershell-cfs'
}
}

$respository = Get-PSResourceRepository -Name 'dotnet-eng' -ErrorAction SilentlyContinue
Expand Down
Loading