Windows auto-upgrade fix

- (Fix) Windows auto-upgrade was downloading `.zip` instead of `.msi` (Bug was introduced on v3.1.0). You still need to download v3.1.1 manually in order to get this fix on future releases.
This commit is contained in:
Tiago Conceição
2022-03-21 05:00:32 +00:00
parent 29559fbb05
commit 9083666d0e
3 changed files with 5 additions and 0 deletions
+1
View File
@@ -6,6 +6,7 @@
- (Add) Linux AppImage binaries (You won't get them with auto-update, please download AppImage once before can use auto-update feature in the future)
- (Change) Rename "layer compression method" to "layer compression codec", please redefine the codec setting if you changed before
- (Improvement) Linux and macOS releases are now compiled, published and packed under Linux (WSL). Windows release still and must be published under windows.
- (Fix) Windows auto-upgrade was downloading `.zip` instead of `.msi` (Bug was introduced on v3.1.0). You still need to download v3.1.1 manually in order to get this fix on future releases.
## 17/03/2022 - v3.1.0
@@ -44,6 +44,9 @@ public class AppVersionChecker : BindableBase
var package = File.ReadAllText(file);
if (!string.IsNullOrWhiteSpace(package) && (package.EndsWith("-x64") || package.EndsWith("-arm64")))
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
return $"{About.Software}_{package}_v{_version}.msi";
return SystemAware.IsRunningLinuxAppImage()
? $"{About.Software}_{package}_v{_version}.AppImage"
: $"{About.Software}_{package}_v{_version}.zip";
+1
View File
@@ -388,6 +388,7 @@ if($null -ne $enableMSI -and $enableMSI)
Write-Output "################################"
Write-Output "Clean and build MSI components manifest file"
Remove-Item "$msiTargetFile" -ErrorAction Ignore
(Get-Content "$msiComponentsFile") -replace 'SourceDir="\.\.\\publish\\.+"', "SourceDir=`"..\publish\${software}_win-x64_v$version`"" | Out-File "$msiComponentsFile"
$msiComponentsXml = [Xml] (Get-Content "$msiComponentsFile")