diff --git a/html/js/mod_button_methods.js b/html/js/mod_button_methods.js
index 522e8bb5..b3302fc8 100644
--- a/html/js/mod_button_methods.js
+++ b/html/js/mod_button_methods.js
@@ -4,7 +4,7 @@ export default {
},
update() {
- fs2mod.updateMod(this.mod.id, this.mod.versions[0].installed ? this.mod.versions[0].version : '');
+ fs2mod.updateMod(this.mod.id, '');
},
install() {
diff --git a/knossos/center.py b/knossos/center.py
index 249c4152..467305b0 100644
--- a/knossos/center.py
+++ b/knossos/center.py
@@ -24,7 +24,7 @@
# The version should follow the http://semver.org guidelines.
# Only remove the -dev tag if you're making a release!
-VERSION = '0.13.2'
+VERSION = '0.13.3'
UPDATE_LINK = 'https://fsnebula.org/knossos'
INNOEXTRACT_LINK = 'https://fsnebula.org/storage/knossos/innoextract.json'
DEBUG = os.getenv('KN_DEBUG', '0').strip() == '1'
diff --git a/knossos/tasks.py b/knossos/tasks.py
index 57785503..bfcf8824 100644
--- a/knossos/tasks.py
+++ b/knossos/tasks.py
@@ -892,7 +892,7 @@ def work(self, dummy):
for i, name in enumerate(items):
progress.update(i / count, 'Deleting files...')
- os.unlink(name)
+ util.safe_unlink(name)
# Delete the remaining empty directories and other stuff
shutil.rmtree(path)
@@ -1561,6 +1561,7 @@ def __init__(self, gog_path, dest_path):
self.abort()
return
+ create_retail_mod(self._dest_path)
self.mods = [center.installed.query('FS2')]
self._slot_prog = {
'total': ('Status', 0, 'Waiting...')
@@ -1744,15 +1745,20 @@ def finish(self):
'selected data path or contact ngld for more information.'
QtWidgets.QMessageBox.critical(None, translate('tasks', 'Error'), msg)
- return
elif results[0] == -1:
QtWidgets.QMessageBox.critical(None, translate('tasks', 'Error'), self.tr(
'The selected file wasn\'t a proper Inno Setup installer. Are you shure you selected the right file?'))
- return
else:
- create_retail_mod(self._dest_path)
center.main_win.update_mod_list()
center.main_win.browser_ctrl.bridge.retailInstalled.emit()
+ return
+
+ path = os.path.join(self._dest_path, 'mod.json')
+ if os.path.isfile(path):
+ os.unlink(path)
+
+ if center.installed.has('FS2'):
+ center.installed.del_mod(center.installed.query('FS2'))
class GOGCopyTask(progress.Task):
@@ -1769,6 +1775,7 @@ def __init__(self, gog_path, dest_path):
self._makedirs(dest_path)
+ create_retail_mod(self._dest_path)
self.mods = [center.installed.query('FS2')]
self._slot_prog = {
'total': ('Status', 0, 'Waiting...')
@@ -1819,7 +1826,6 @@ def _makedirs(self, path):
def finish(self):
if self._reason == 'done':
- create_retail_mod(self._dest_path)
center.main_win.update_mod_list()
center.main_win.browser_ctrl.bridge.retailInstalled.emit()
return
@@ -1828,6 +1834,13 @@ def finish(self):
else:
msg = 'Copying the retail files failed. Please make sure Knossos can write to the data path.'
+ path = os.path.join(self._dest_path, 'mod.json')
+ if os.path.isfile(path):
+ os.unlink(path)
+
+ if center.installed.has('FS2'):
+ center.installed.del_mod(center.installed.query('FS2'))
+
QtWidgets.QMessageBox.critical(None, 'Error', msg)
@@ -2116,7 +2129,11 @@ def work(self, mod):
self._engine_cache[dep['id']] = is_engine
if is_engine:
- spec = util.Spec(dep['version'])
+ if dep['version']:
+ spec = util.Spec(dep['version'])
+ else:
+ spec = util.Spec('*')
+
engine_id = dep['id']
break
diff --git a/knossos/web.py b/knossos/web.py
index 99dc1285..db6fb242 100644
--- a/knossos/web.py
+++ b/knossos/web.py
@@ -51,11 +51,11 @@ def sendMessage(self, msg):
if isinstance(v, QtCore.QJsonValue):
msg[k] = v.toVariant()
- print('#-> ', json.dumps(msg))
+ # print('#-> ', json.dumps(msg))
self._conn.sendTextMessage(json.dumps(msg))
def socketMessageReceived(self, msg):
- print('#<- ', json.loads(msg))
+ # print('#<- ', json.loads(msg))
self.messageReceived.emit(json.loads(msg), self)
def socketDisconnected(self):
diff --git a/releng/ubuntu/debian/rules b/releng/ubuntu/debian/rules
index f9600585..c7a70504 100644
--- a/releng/ubuntu/debian/rules
+++ b/releng/ubuntu/debian/rules
@@ -8,7 +8,7 @@ export PYBUILD_INSTALL_DIR=/usr/share/knossos
override_dh_link:
dh_link
echo '#!/bin/bash' > debian/knossos/usr/bin/knossos
- echo 'exec python3 /usr/share/knossos/knossos/__main__.py "$@"' >> debian/knossos/usr/bin/knossos
+ echo 'exec python3 /usr/share/knossos/knossos/__main__.py "\$@"' >> debian/knossos/usr/bin/knossos
%:
dh $@ --with python3 --buildsystem=pybuild