Update calculation of patch versions for Windows store

For Windows store we combine the patch version with the build number to
ensure continuously growing version numbers for upgrades.
Reduce the version numbers to be multiplied to 1000 to allow for two
digit patch version numbers.
This commit is contained in:
Philipp Wolfer
2023-06-07 08:28:01 +02:00
parent 88c8dbced8
commit ecafcbe79d

View File

@@ -302,7 +302,10 @@ class picard_build(build):
generate_file('win-version-info.txt.in', 'win-version-info.txt', {**args, **version_args})
default_publisher = 'CN=Metabrainz Foundation Inc., O=Metabrainz Foundation Inc., L=San Luis Obispo, S=California, C=US'
store_version = (PICARD_VERSION.major, PICARD_VERSION.minor, PICARD_VERSION.patch * 10000 + self.build_number, 0)
# Combine patch version with build number. As Windows store apps require continuously
# growing version numbers we combine the patch version with a build number set by the
# build script.
store_version = (PICARD_VERSION.major, PICARD_VERSION.minor, PICARD_VERSION.patch * 1000 + min(self.build_number, 999), 0)
generate_file('appxmanifest.xml.in', 'appxmanifest.xml', {
'app-id': "MetaBrainzFoundationInc." + PICARD_APP_ID,
'display-name': PICARD_DISPLAY_NAME,