Skip to content

Commit

Permalink
Merge pull request #5958 from BOINC/vko_add_installer_version_updater
Browse files Browse the repository at this point in the history
[windows] adjust set-client-version.py file to update boinc.json file
  • Loading branch information
AenBleidd authored Dec 15, 2024
2 parents a746bfa + 181607d commit 33b95bd
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions set-client-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with BOINC. If not, see <http://www.gnu.org/licenses/>.

import json
import os
import subprocess
import sys
Expand Down Expand Up @@ -87,15 +88,15 @@ def set_build_gradle(version):
line = f' def version = \'{version} : DEVELOPMENT\'\n'
f.write(line)

def set_installshield(version):
for ism in ['win_build/installerv2/BOINCx64_vbox.ism', 'win_build/installerv2/BOINCx64.ism']:
with open(ism, 'r') as f:
lines = f.readlines()
with open(ism, 'w') as f:
for line in lines:
if line.startswith(' <row><td>ProductVersion</td><td>'):
line = f' <row><td>ProductVersion</td><td>{version}</td><td/></row>\n'
f.write(line)
def set_boinc_json(version):
with open('installer/boinc.json','r') as f:
data = json.load(f)
for item in data['Property']:
if item['Property'] == 'ProductVersion':
item['Value'] = version
break
with open('installer/boinc.json','w') as f:
json.dump(data, f, indent=4)

def set_snapcraft(version):
with open('snap/snapcraft.yaml','r') as f:
Expand Down Expand Up @@ -133,7 +134,7 @@ def set_snap_boinc_desktop(version):
set_version_h(version)
set_version_h_in(version)
set_build_gradle(version)
set_installshield(version)
set_boinc_json(version)
set_snapcraft(version)
set_snap_boinc_desktop(version)

Expand Down

0 comments on commit 33b95bd

Please sign in to comment.