Merge remote-tracking branch 'origin/development' into consistent-orientation-from
This commit is contained in:
commit
a0b63c029b
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit d23fd7972321de2c629865fac80a1548c234ad0e
|
Subproject commit 459326e9840c843ade72b04cf28e50889c9779f1
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import glob
|
import glob
|
||||||
import argparse
|
import argparse
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -13,7 +14,7 @@ def copy_and_patch(patch,orig,editor):
|
||||||
shutil.copyfile(orig,orig.parent/patch.stem)
|
shutil.copyfile(orig,orig.parent/patch.stem)
|
||||||
except shutil.SameFileError:
|
except shutil.SameFileError:
|
||||||
pass
|
pass
|
||||||
damask.util.run(f'patch {orig.parent/patch.stem} {patch} -b')
|
damask.util.run(f'patch {orig.parent/patch.stem} {patch} --backup --forward')
|
||||||
with open(orig.parent/patch.stem) as f_in:
|
with open(orig.parent/patch.stem) as f_in:
|
||||||
content = f_in.read()
|
content = f_in.read()
|
||||||
with open(orig.parent/patch.stem,'w') as f_out:
|
with open(orig.parent/patch.stem,'w') as f_out:
|
||||||
|
@ -25,7 +26,7 @@ parser = argparse.ArgumentParser(
|
||||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||||
|
|
||||||
parser.add_argument('--editor', dest='editor', metavar='string', default='vi',
|
parser.add_argument('--editor', dest='editor', metavar='string', default='vi',
|
||||||
help='Name of the editor for Marc Mentat (executable)')
|
help='Name of the editor (executable) used by Marc Mentat')
|
||||||
parser.add_argument('--marc-root', dest='marc_root', metavar='string',
|
parser.add_argument('--marc-root', dest='marc_root', metavar='string',
|
||||||
default=damask.solver._marc._marc_root,
|
default=damask.solver._marc._marc_root,
|
||||||
help='Marc root directory')
|
help='Marc root directory')
|
||||||
|
@ -49,6 +50,13 @@ matches = {'Marc_tools': [['comp_user','comp_damask_*mp'],
|
||||||
['kill1','kill?']],
|
['kill1','kill?']],
|
||||||
'Mentat_menus':[['job_run.ms','job_run.ms']]}
|
'Mentat_menus':[['job_run.ms','job_run.ms']]}
|
||||||
|
|
||||||
|
for cmd in ['patch','xvfb-run']:
|
||||||
|
try:
|
||||||
|
damask.util.run(f'{cmd} --help')
|
||||||
|
except FileNotFoundError:
|
||||||
|
print(f'"{cmd}" not found, please install')
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
|
||||||
print('patching files...')
|
print('patching files...')
|
||||||
|
|
||||||
|
@ -63,7 +71,7 @@ print('compiling Mentat menu binaries...')
|
||||||
|
|
||||||
executable = marc_root/f'mentat{marc_version}/bin/mentat'
|
executable = marc_root/f'mentat{marc_version}/bin/mentat'
|
||||||
menu_file = marc_root/f'mentat{marc_version}/menus/linux64/main.msb'
|
menu_file = marc_root/f'mentat{marc_version}/menus/linux64/main.msb'
|
||||||
os.system(f'xvfb-run -a {executable} -compile {menu_file}')
|
damask.util.run(f'xvfb-run -a {executable} -compile {menu_file}')
|
||||||
|
|
||||||
print('setting file access rights...')
|
print('setting file access rights...')
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
v3.0.0-alpha6-146-g3618e36ab
|
v3.0.0-alpha6-154-g9d134b87b
|
||||||
|
|
Loading…
Reference in New Issue