Skip to content

Commit

Permalink
Use Python 3 to modify WINE config
Browse files Browse the repository at this point in the history
We don't have python2 installed on our Windows
build machines.
  • Loading branch information
benmwebb committed Nov 14, 2024
1 parent ab7b96f commit 38ce4db
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -396,19 +396,19 @@ use_modeller_svn() {

# Modify wine's default path so that IMP binaries will run from the build dir
add_imp_to_wine_path() {
python2 - "$1" <<END
python3 - "$1" <<END
import os, sys
dbl_bksl = '\\\\\\\\'
imp = 'Z:' + sys.argv[1].replace('/', dbl_bksl)
sysreg = os.path.join(os.environ['HOME'], '.wine', 'system.reg')
outfh = open(sysreg + '.new', 'w')
for line in open(sysreg):
if line.startswith('"PATH"='):
print >> outfh, \\
r'"PATH"=str(2):"C:\\\\windows\\\\system32;C:\\\\windows;' \\
+ dbl_bksl.join((imp, 'lib')) + ';' \\
+ dbl_bksl.join((imp, 'bin')) + ';' \\
+ dbl_bksl.join((imp, 'src', 'dependency', 'RMF')) + '"'
print(r'"PATH"=str(2):"C:\\\\windows\\\\system32;C:\\\\windows;'
+ dbl_bksl.join((imp, 'lib')) + ';'
+ dbl_bksl.join((imp, 'bin')) + ';'
+ dbl_bksl.join((imp, 'src', 'dependency', 'RMF')) + '"',
file=outfh)
else:
outfh.write(line)
os.rename(sysreg + '.new', sysreg)
Expand Down

0 comments on commit 38ce4db

Please sign in to comment.