Commit 48aa5cb1 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Config: Update config with new mage_fake7 solver and new mage path.

No related merge requests found
Pipeline #54431 passed with stages
in 3 minutes and 51 seconds
Showing with 25 additions and 3 deletions
+25 -3
......@@ -1231,7 +1231,6 @@ class Mage8(Mage):
return results
class MageFake7(Mage8):
_type = "mage_fake7"
......
......@@ -37,7 +37,7 @@ logger = logging.getLogger()
class Config(SQL):
def __init__(self):
self._version = '0.0.4'
self._version = '0.0.5'
self.filename = Config.filename()
self.set_default_value()
......@@ -132,6 +132,28 @@ class Config(SQL):
"VALUES ('last_solver_name', '')"
)
if int(release) < 5:
posix = os.name == 'posix'
ext = "" if posix else ".exe"
self.execute(
"UPDATE solver SET cmd_solver=" +
f"'@install_dir/mage8/mage{ext} @args @input' "
"WHERE name='default-mage'"
)
self.execute(f"""
INSERT INTO solver VALUES (
'mage_fake7',
'default-mage-fake-7',
'Default Pamhyr2 mage fake version 7',
'', '', '',
'',
'@install_dir/mage8/mage_as7{ext} @args @input',
''
)
""")
self.execute(
f"UPDATE info SET value='{self._version}' " +
"WHERE key='version'"
......@@ -296,7 +318,8 @@ class Config(SQL):
ctor = solver_type_list["mage_fake7"]
new = ctor("default-mage-fake-7")
new._description = "Default Pamhyr2 mage fake version 7"
new._cmd_solver = f""""@install_dir/mage8/mage_as7{ext}" @args @input"""
new._cmd_solver = f"""\
"@install_dir/mage8/mage_as7{ext}" @args @input"""
self._solvers.append(new)
# Backup
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment