fix
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@
|
||||
<pubDate>Tue, 28 Jul 2026 20:33:00 +0400</pubDate>
|
||||
<enclosure
|
||||
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:os="windows"
|
||||
sparkle:dsaSignature="MD4CHQCdoCW5jNymVlRblQpqy8C+jw4W0rVFQX0Bk25PAh0Av2ZcFYwZFQBQlAstQXna/PsuMNWIzXF4jpDuSA=="
|
||||
|
||||
@@ -50,8 +50,11 @@ certificate would not establish trust on player machines.
|
||||
## Version and AppCast Contract
|
||||
|
||||
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
|
||||
compares the Windows product version. Pass the same `X.Y.Z` value to Inno Setup:
|
||||
build-number-only change such as `1.0.0+2` is not sufficient for a public
|
||||
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
|
||||
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>
|
||||
<enclosure
|
||||
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:dsaSignature="SIGNATURE_FROM_SIGN_UPDATE"
|
||||
length="ACTUAL_INSTALLER_SIZE_IN_BYTES"
|
||||
|
||||
@@ -78,9 +78,11 @@ Increase both parts of the version in `pubspec.yaml`:
|
||||
version: 1.0.2+3
|
||||
```
|
||||
|
||||
`X.Y.Z` is the WinSparkle release version. `N` is the Flutter build number.
|
||||
Every production release must have an `X.Y.Z` value greater than the version
|
||||
currently published in AppCast.
|
||||
`X.Y.Z` is the public launcher version. `N` is the Flutter build number.
|
||||
Flutter places the complete `X.Y.Z+N` value in the Windows `ProductVersion`,
|
||||
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:
|
||||
|
||||
|
||||
@@ -179,6 +179,7 @@ function Write-Appcast {
|
||||
param(
|
||||
[Parameter(Mandatory = $true)][string]$Path,
|
||||
[Parameter(Mandatory = $true)][string]$Version,
|
||||
[Parameter(Mandatory = $true)][string]$BuildVersion,
|
||||
[Parameter(Mandatory = $true)][string]$Notes,
|
||||
[Parameter(Mandatory = $true)][string]$InstallerUrl,
|
||||
[Parameter(Mandatory = $true)][string]$Signature,
|
||||
@@ -229,7 +230,7 @@ function Write-Appcast {
|
||||
'sparkle',
|
||||
'version',
|
||||
$script:SparkleNamespace,
|
||||
$Version
|
||||
$BuildVersion
|
||||
)
|
||||
$writer.WriteAttributeString(
|
||||
'sparkle',
|
||||
@@ -469,9 +470,10 @@ try {
|
||||
-UseBasicParsing `
|
||||
-OutFile $publishedPath
|
||||
$publishedVersion = Get-AppcastVersion -Path $publishedPath
|
||||
$publishedReleaseVersion = $publishedVersion.Split('+')[0]
|
||||
if (
|
||||
-not [string]::IsNullOrWhiteSpace($publishedVersion) -and
|
||||
[version]$version -le [version]$publishedVersion
|
||||
[version]$version -le [version]$publishedReleaseVersion
|
||||
) {
|
||||
throw (
|
||||
"Version $version is not newer than published version " +
|
||||
@@ -573,6 +575,7 @@ try {
|
||||
'/' +
|
||||
$S3Key
|
||||
)
|
||||
$appcastBuildVersion = "$version+$buildNumber"
|
||||
$appcastPath = if ($DryRun) {
|
||||
Join-Path $temporaryDirectory 'appcast.xml'
|
||||
}
|
||||
@@ -583,6 +586,7 @@ try {
|
||||
Write-Appcast `
|
||||
-Path $appcastPath `
|
||||
-Version $version `
|
||||
-BuildVersion $appcastBuildVersion `
|
||||
-Notes $ReleaseNotes `
|
||||
-InstallerUrl $installerUrl `
|
||||
-Signature $signature `
|
||||
@@ -592,7 +596,7 @@ try {
|
||||
-LiteralPath $appcastPath `
|
||||
-Raw `
|
||||
-Encoding UTF8
|
||||
if ((Get-AppcastVersion -Path $appcastPath) -ne $version) {
|
||||
if ((Get-AppcastVersion -Path $appcastPath) -ne $appcastBuildVersion) {
|
||||
throw 'The generated AppCast contains the wrong version.'
|
||||
}
|
||||
|
||||
@@ -721,7 +725,7 @@ print("S3_CONTENT_LENGTH=" + str(response["ContentLength"]))
|
||||
$publishedEnclosure.GetAttribute(
|
||||
'version',
|
||||
$script:SparkleNamespace
|
||||
) -ne $version -or
|
||||
) -ne $appcastBuildVersion -or
|
||||
[long]$publishedEnclosure.length -ne $installer.Length -or
|
||||
$publishedEnclosure.url -ne $installerUrl
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user