From 9d27fae5748511f555b799e81e04f9b2bc9b0630 Mon Sep 17 00:00:00 2001 From: Tal Regev Date: Sun, 5 Jun 2022 13:35:18 +0300 Subject: [PATCH] Fix version util and files --- set-vboxwrapper-version.py | 18 ++++++++--------- set-version.py | 27 ++++++++++++------------- set-wrapper-version.py | 18 ++++++++--------- win_build/installerv2/BOINCx64.ism | 2 +- win_build/installerv2/BOINCx64_vbox.ism | 2 +- win_build/wrapper.vcxproj | 2 +- win_build/wrapper_vs2013.vcxproj | 2 +- 7 files changed, 35 insertions(+), 36 deletions(-) diff --git a/set-vboxwrapper-version.py b/set-vboxwrapper-version.py index 63a76e4bed..87e8a34295 100644 --- a/set-vboxwrapper-version.py +++ b/set-vboxwrapper-version.py @@ -23,7 +23,7 @@ def set_configure_ac(version): with open('configure.ac', 'w') as f: for line in lines: if line.startswith('VBOXWRAPPER_RELEASE='): - line = 'VBOXWRAPPER_RELEASE=%s\n' % (version) + line = f'VBOXWRAPPER_RELEASE={version}\n' f.write(line) def set_version_h(version): @@ -32,7 +32,7 @@ def set_version_h(version): with open('version.h', 'w') as f: for line in lines: if line.startswith('#define VBOXWRAPPER_RELEASE'): - line = '#define VBOXWRAPPER_RELEASE %s\n' % (version) + line = f'#define VBOXWRAPPER_RELEASE {version}\n' f.write(line) def set_vcxproj(version): @@ -44,17 +44,17 @@ def set_vcxproj(version): with open(vcxproj, 'w') as f: for line in lines: if line.startswith(' vboxwrapper_'): - line = ' vboxwrapper_%s_windows_x86_64\n' % (version) + line = f' vboxwrapper_{version}_windows_x86_64\n' elif line.startswith(' vboxwrapper_'): - line = ' vboxwrapper_%s_windows_x86_64\n' % (version) + line = f' vboxwrapper_{version}_windows_x86_64\n' elif line.startswith(' vboxwrapper_'): - line = ' vboxwrapper_%s_windows_intelx86\n' % (version) + line = f' vboxwrapper_{version}_windows_intelx86\n' elif line.startswith(' vboxwrapper_'): - line = ' vboxwrapper_%s_windows_intelx86\n' % (version) + line = f' vboxwrapper_{version}_windows_intelx86\n' elif line.startswith(' vboxwrapper_'): - line = ' vboxwrapper_%s_windows_arm64\n' % (version) + line = f' vboxwrapper_{version}_windows_arm64\n' elif line.startswith(' vboxwrapper_'): - line = ' vboxwrapper_%s_windows_arm64\n' % (version) + line = f' vboxwrapper_{version}_windows_arm64\n' f.write(line) if (len(sys.argv) != 2): @@ -63,7 +63,7 @@ if (len(sys.argv) != 2): version = sys.argv[1] -print('Setting vboxwrapper version to %s...' % (version)) +print(f'Setting vboxwrapper version to {version}...') set_configure_ac(version) set_version_h(version) diff --git a/set-version.py b/set-version.py index 04a7549534..09d3bc6d3d 100644 --- a/set-version.py +++ b/set-version.py @@ -34,7 +34,7 @@ def set_configure_ac(version): with open('configure.ac', 'w') as f: for line in lines: if line.startswith('AC_INIT'): - line = 'AC_INIT(BOINC, %s)\n' % (version) + line = f'AC_INIT(BOINC, {version})\n' f.write(line) def set_version_h(version): @@ -44,17 +44,17 @@ def set_version_h(version): with open('version.h', 'w') as f: for line in lines: if line.startswith('#define BOINC_MAJOR_VERSION'): - line = '#define BOINC_MAJOR_VERSION %s\n' % (major) + line = f'#define BOINC_MAJOR_VERSION {major}\n' elif line.startswith('#define BOINC_MINOR_VERSION'): - line = '#define BOINC_MINOR_VERSION %s\n' % (minor) + line = f'#define BOINC_MINOR_VERSION {minor}\n' elif line.startswith('#define BOINC_RELEASE'): - line = '#define BOINC_RELEASE %s\n' % (release) + line = f'#define BOINC_RELEASE {release}\n' elif line.startswith('#define BOINC_VERSION_STRING'): - line = '#define BOINC_VERSION_STRING "%s.%s.%s"\n' % (major, minor, release) + line = f'#define BOINC_VERSION_STRING "{major}.{minor}.{release}"\n' elif line.startswith('#define PACKAGE_STRING'): - line = '#define PACKAGE_STRING "BOINC %s.%s.%s"\n' % (major, minor, release) + line = f'#define PACKAGE_STRING "BOINC {major}.{minor}.{release}"\n' elif line.startswith('#define PACKAGE_VERSION'): - line = '#define PACKAGE_VERSION "%s.%s.%s"\n' % (major, minor, release) + line = f'#define PACKAGE_VERSION "{major}.{minor}.{release}"\n' elif line.find('#define BOINC_PRERELEASE 1') != -1: if is_release(minor): line = '//#define BOINC_PRERELEASE 1\n' @@ -64,7 +64,7 @@ def set_version_h(version): def set_version_log(version): with open('version.log', 'w') as f: - line = '%s\n' % (version) + line = f'{version}\n' f.write(line) def set_build_gradle(version): @@ -76,7 +76,7 @@ def set_build_gradle(version): with open('android/BOINC/app/build.gradle', 'w') as f: for line in lines: if line.startswith(' def version = '): - line = ' def version = \'%s : DEVELOPMENT\'\n' % (version) + line = f' def version = \'{version} : DEVELOPMENT\'\n' f.write(line) def set_vcpkg_json(version): @@ -84,7 +84,6 @@ def set_vcpkg_json(version): 'android/vcpkg_config_client/vcpkg.json', 'android/vcpkg_config_libs/vcpkg.json', 'lib/vcpkg.json', - 'lib/vcpkg_config_android/vcpkg.json', 'linux/vcpkg_config_apps/vcpkg.json', 'linux/vcpkg_config_client/vcpkg.json', 'linux/vcpkg_config_libs/vcpkg.json', @@ -96,7 +95,7 @@ def set_vcpkg_json(version): with open(json, 'w') as f: for line in lines: if line.startswith(' "version-string":'): - line = ' "version-string": "%s",\n' % (version) + line = f' "version-string": "{version}",\n' f.write(line) def set_installshield(version): @@ -106,7 +105,7 @@ def set_installshield(version): with open(ism, 'w') as f: for line in lines: if line.startswith(' ProductVersion'): - line = ' ProductVersion%s\n' % (version) + line = f' ProductVersion{version}\n' f.write(line) if (len(sys.argv) != 2): @@ -118,10 +117,10 @@ version = sys.argv[1] _, minor, release = split_version(version) if (not is_release(minor) and release != 0): - print('ERROR: for development version release number should be 0 but it\'s set to %s' % (release)) + print(f'ERROR: for development version release number should be 0 but it\'s set to {release}') exit(1) -print('Setting BOINC version to %s...' % (version)) +print(f'Setting BOINC version to {version}...') set_configure_ac(version) set_version_h(version) diff --git a/set-wrapper-version.py b/set-wrapper-version.py index 906e6e42e5..193dbf9731 100644 --- a/set-wrapper-version.py +++ b/set-wrapper-version.py @@ -23,7 +23,7 @@ def set_configure_ac(version): with open('configure.ac', 'w') as f: for line in lines: if line.startswith('WRAPPER_RELEASE='): - line = 'WRAPPER_RELEASE=%s\n' % (version) + line = f'WRAPPER_RELEASE={version}\n' f.write(line) def set_version_h(version): @@ -32,7 +32,7 @@ def set_version_h(version): with open('version.h', 'w') as f: for line in lines: if line.startswith('#define WRAPPER_RELEASE'): - line = '#define WRAPPER_RELEASE %s\n' % (version) + line = f'#define WRAPPER_RELEASE {version}\n' f.write(line) def set_vcxproj(version): @@ -44,17 +44,17 @@ def set_vcxproj(version): with open(vcxproj, 'w') as f: for line in lines: if line.startswith(' wrapper_'): - line = ' wrapper_%s_windows_x86_64\n' % (version) + line = f' wrapper_{version}_windows_x86_64\n' elif line.startswith(' wrapper_'): - line = ' wrapper_%s_windows_x86_64\n' % (version) + line = f' wrapper_{version}_windows_x86_64\n' elif line.startswith(' wrapper_'): - line = ' wrapper_%s_windows_intelx86\n' % (version) + line = f' wrapper_{version}_windows_intelx86\n' elif line.startswith(' wrapper_'): - line = ' wrapper_%s_windows_intelx86\n' % (version) + line = f' wrapper_{version}_windows_intelx86\n' elif line.startswith(' wrapper_'): - line = ' wrapper_%s_windows_arm64\n' % (version) + line = f' wrapper_{version}_windows_arm64\n' elif line.startswith(' wrapper_'): - line = ' wrapper_%s_windows_arm64\n' % (version) + line = f' wrapper_{version}_windows_arm64\n' f.write(line) if (len(sys.argv) != 2): @@ -63,7 +63,7 @@ if (len(sys.argv) != 2): version = sys.argv[1] -print('Setting wrapper version to %s...' % (version)) +print(f'Setting wrapper version to {version}...') set_configure_ac(version) set_version_h(version) diff --git a/win_build/installerv2/BOINCx64.ism b/win_build/installerv2/BOINCx64.ism index ed09656e24..6712a1040f 100644 --- a/win_build/installerv2/BOINCx64.ism +++ b/win_build/installerv2/BOINCx64.ism @@ -4548,7 +4548,7 @@ VwBlAGIAAQBXAEUAQgB4ADYANAA= ProductIDnone ProductLanguage1033 ProductNameBOINC - ProductVersion7.16.11 + ProductVersion7.19.0 ProgressType0install ProgressType1Installing ProgressType2installed diff --git a/win_build/installerv2/BOINCx64_vbox.ism b/win_build/installerv2/BOINCx64_vbox.ism index bcf14e2ad1..221eeb03be 100644 --- a/win_build/installerv2/BOINCx64_vbox.ism +++ b/win_build/installerv2/BOINCx64_vbox.ism @@ -4549,7 +4549,7 @@ VwBlAGIAAQBXAEUAQgB4ADYANAA= ProductIDnone ProductLanguage1033 ProductNameBOINC - ProductVersion7.16.11 + ProductVersion7.19.0 ProgressType0install ProgressType1Installing ProgressType2installed diff --git a/win_build/wrapper.vcxproj b/win_build/wrapper.vcxproj index d7b124b5b0..cde1545f4d 100644 --- a/win_build/wrapper.vcxproj +++ b/win_build/wrapper.vcxproj @@ -90,7 +90,7 @@ wrapper_26017_windows_x86_64 wrapper_26017_windows_intelx86 - wrapper_6.1_windows_x86_64 + wrapper_26017_windows_x86_64 diff --git a/win_build/wrapper_vs2013.vcxproj b/win_build/wrapper_vs2013.vcxproj index 3403c6fbc8..9809da2212 100644 --- a/win_build/wrapper_vs2013.vcxproj +++ b/win_build/wrapper_vs2013.vcxproj @@ -95,7 +95,7 @@ wrapper_26017_windows_x86_64 wrapper_26017_windows_intelx86 - wrapper_6.1_windows_x86_64 + wrapper_26017_windows_x86_64