This commit is contained in:
2026-07-28 20:56:19 +04:00
parent bd1e464b5a
commit 33659f6c05
4 changed files with 21 additions and 11 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
<pubDate>Tue, 28 Jul 2026 20:33:00 +0400</pubDate> <pubDate>Tue, 28 Jul 2026 20:33:00 +0400</pubDate>
<enclosure <enclosure
url="https://storage.yandexcloud.net/warcraft-client/moonwell_launcher_setup.exe" url="https://storage.yandexcloud.net/warcraft-client/moonwell_launcher_setup.exe"
sparkle:version="1.0.1" sparkle:version="1.0.1+2"
sparkle:shortVersionString="1.0.1" sparkle:shortVersionString="1.0.1"
sparkle:os="windows" sparkle:os="windows"
sparkle:dsaSignature="MD4CHQCdoCW5jNymVlRblQpqy8C+jw4W0rVFQX0Bk25PAh0Av2ZcFYwZFQBQlAstQXna/PsuMNWIzXF4jpDuSA==" sparkle:dsaSignature="MD4CHQCdoCW5jNymVlRblQpqy8C+jw4W0rVFQX0Bk25PAh0Av2ZcFYwZFQBQlAstQXna/PsuMNWIzXF4jpDuSA=="
+7 -3
View File
@@ -50,8 +50,11 @@ certificate would not establish trust on player machines.
## Version and AppCast Contract ## Version and AppCast Contract
Increase the `X.Y.Z` version in `pubspec.yaml` for every launcher release. A Increase the `X.Y.Z` version in `pubspec.yaml` for every launcher release. A
build-number-only change such as `1.0.0+2` is not sufficient because WinSparkle build-number-only change such as `1.0.0+2` is not sufficient for a public
compares the Windows product version. Pass the same `X.Y.Z` value to Inno Setup: release. Flutter writes the complete `X.Y.Z+N` value into the Windows
`ProductVersion`; `sparkle:version` must match that complete value exactly.
Use `sparkle:shortVersionString` for the human-readable `X.Y.Z` value. Pass
`X.Y.Z` without the build suffix to Inno Setup:
```powershell ```powershell
ISCC.exe /DMyAppVersion=1.1.0 installer\moonwell_launcher.iss ISCC.exe /DMyAppVersion=1.1.0 installer\moonwell_launcher.iss
@@ -75,7 +78,8 @@ Use a public AppCast with absolute URLs:
<pubDate>Sun, 21 Jun 2026 12:00:00 +0400</pubDate> <pubDate>Sun, 21 Jun 2026 12:00:00 +0400</pubDate>
<enclosure <enclosure
url="https://storage.yandexcloud.net/warcraft-client/moonwell_launcher_setup.exe" url="https://storage.yandexcloud.net/warcraft-client/moonwell_launcher_setup.exe"
sparkle:version="1.1.0" sparkle:version="1.1.0+3"
sparkle:shortVersionString="1.1.0"
sparkle:os="windows" sparkle:os="windows"
sparkle:dsaSignature="SIGNATURE_FROM_SIGN_UPDATE" sparkle:dsaSignature="SIGNATURE_FROM_SIGN_UPDATE"
length="ACTUAL_INSTALLER_SIZE_IN_BYTES" length="ACTUAL_INSTALLER_SIZE_IN_BYTES"
+5 -3
View File
@@ -78,9 +78,11 @@ Increase both parts of the version in `pubspec.yaml`:
version: 1.0.2+3 version: 1.0.2+3
``` ```
`X.Y.Z` is the WinSparkle release version. `N` is the Flutter build number. `X.Y.Z` is the public launcher version. `N` is the Flutter build number.
Every production release must have an `X.Y.Z` value greater than the version Flutter places the complete `X.Y.Z+N` value in the Windows `ProductVersion`,
currently published in AppCast. so the script writes that same complete value to `sparkle:version` and writes
`X.Y.Z` to `sparkle:shortVersionString`. Every production release must have an
`X.Y.Z` value greater than the release currently published in AppCast.
Run a dry run first: Run a dry run first:
+8 -4
View File
@@ -179,6 +179,7 @@ function Write-Appcast {
param( param(
[Parameter(Mandatory = $true)][string]$Path, [Parameter(Mandatory = $true)][string]$Path,
[Parameter(Mandatory = $true)][string]$Version, [Parameter(Mandatory = $true)][string]$Version,
[Parameter(Mandatory = $true)][string]$BuildVersion,
[Parameter(Mandatory = $true)][string]$Notes, [Parameter(Mandatory = $true)][string]$Notes,
[Parameter(Mandatory = $true)][string]$InstallerUrl, [Parameter(Mandatory = $true)][string]$InstallerUrl,
[Parameter(Mandatory = $true)][string]$Signature, [Parameter(Mandatory = $true)][string]$Signature,
@@ -229,7 +230,7 @@ function Write-Appcast {
'sparkle', 'sparkle',
'version', 'version',
$script:SparkleNamespace, $script:SparkleNamespace,
$Version $BuildVersion
) )
$writer.WriteAttributeString( $writer.WriteAttributeString(
'sparkle', 'sparkle',
@@ -469,9 +470,10 @@ try {
-UseBasicParsing ` -UseBasicParsing `
-OutFile $publishedPath -OutFile $publishedPath
$publishedVersion = Get-AppcastVersion -Path $publishedPath $publishedVersion = Get-AppcastVersion -Path $publishedPath
$publishedReleaseVersion = $publishedVersion.Split('+')[0]
if ( if (
-not [string]::IsNullOrWhiteSpace($publishedVersion) -and -not [string]::IsNullOrWhiteSpace($publishedVersion) -and
[version]$version -le [version]$publishedVersion [version]$version -le [version]$publishedReleaseVersion
) { ) {
throw ( throw (
"Version $version is not newer than published version " + "Version $version is not newer than published version " +
@@ -573,6 +575,7 @@ try {
'/' + '/' +
$S3Key $S3Key
) )
$appcastBuildVersion = "$version+$buildNumber"
$appcastPath = if ($DryRun) { $appcastPath = if ($DryRun) {
Join-Path $temporaryDirectory 'appcast.xml' Join-Path $temporaryDirectory 'appcast.xml'
} }
@@ -583,6 +586,7 @@ try {
Write-Appcast ` Write-Appcast `
-Path $appcastPath ` -Path $appcastPath `
-Version $version ` -Version $version `
-BuildVersion $appcastBuildVersion `
-Notes $ReleaseNotes ` -Notes $ReleaseNotes `
-InstallerUrl $installerUrl ` -InstallerUrl $installerUrl `
-Signature $signature ` -Signature $signature `
@@ -592,7 +596,7 @@ try {
-LiteralPath $appcastPath ` -LiteralPath $appcastPath `
-Raw ` -Raw `
-Encoding UTF8 -Encoding UTF8
if ((Get-AppcastVersion -Path $appcastPath) -ne $version) { if ((Get-AppcastVersion -Path $appcastPath) -ne $appcastBuildVersion) {
throw 'The generated AppCast contains the wrong version.' throw 'The generated AppCast contains the wrong version.'
} }
@@ -721,7 +725,7 @@ print("S3_CONTENT_LENGTH=" + str(response["ContentLength"]))
$publishedEnclosure.GetAttribute( $publishedEnclosure.GetAttribute(
'version', 'version',
$script:SparkleNamespace $script:SparkleNamespace
) -ne $version -or ) -ne $appcastBuildVersion -or
[long]$publishedEnclosure.length -ne $installer.Length -or [long]$publishedEnclosure.length -ne $installer.Length -or
$publishedEnclosure.url -ne $installerUrl $publishedEnclosure.url -ne $installerUrl
) { ) {