From 54d0d946290ecce7c9d29df866beeea14b7a578d Mon Sep 17 00:00:00 2001 From: xirreal Date: Wed, 30 Oct 2024 12:13:10 +0100 Subject: [PATCH] Fix version mismatch between bundle and appinstaller Should make the installer actually work now --- package.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.ps1 b/package.ps1 index 34ac908..ccd746a 100644 --- a/package.ps1 +++ b/package.ps1 @@ -12,9 +12,16 @@ dotnet restore $projectFile dotnet msbuild $projectFile -t:Rebuild -p:Platform=x64 -p:Configuration=Release -p:OutDir="$outputDir/x64/" dotnet msbuild $projectFile -t:Rebuild -p:Platform=arm64 -p:Configuration=Release -p:OutDir="$outputDir/arm64/" +$appxManifest = Join-Path -Path $outputDir -ChildPath "x64/AppxManifest.xml" +[xml]$manifestXml = Get-Content $appxManifest +$identityNode = $manifestXml.Package.Identity +$publisher = $identityNode.Publisher +$version = $identityNode.Version +$appName = $identityNode.Name + makeappx.exe pack /h SHA256 /d "./Dist/x64" /o /p "./Dist/msix/TailscaleClient_x64.msix" makeappx.exe pack /h SHA256 /d "./Dist/arm64" /o /p "./Dist/msix/TailscaleClient_arm64.msix" -makeappx.exe bundle /d "./Dist/msix" /p "./Dist/TailscaleClient.msixbundle" +makeappx.exe bundle /bv $version /d "./Dist/msix" /p "./Dist/TailscaleClient.msixbundle" signtool.exe sign /fd SHA256 /sha1 "$thumbprint" /t http://timestamp.digicert.com "./Dist/TailscaleClient.msixbundle" msbuild /t:TailscaleClientInstaller /p:Configuration=Release /p:OutDir="../Dist/" @@ -24,13 +31,6 @@ $cert = Get-ChildItem -Path Cert:/CurrentUser/My | Where-Object { $_.Thumbprint $certPath = "$outputDir/TailscaleClient.cer" Export-Certificate -Cert $cert -FilePath $certPath -$appxManifest = Join-Path -Path $outputDir -ChildPath "x64/AppxManifest.xml" -[xml]$manifestXml = Get-Content $appxManifest -$identityNode = $manifestXml.Package.Identity -$publisher = $identityNode.Publisher -$version = $identityNode.Version -$appName = $identityNode.Name - Write-Output "Creating .appinstaller file..." $appInstallerFile = "$outputDir/TailscaleClient.appinstaller" $appInstallerXml = @"