Skip to content

Commit

Permalink
Release 0.13.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ngld committed Oct 16, 2018
2 parents 496dd6d + 6321576 commit 57bb3f1
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 11 deletions.
2 changes: 1 addition & 1 deletion html/js/mod_button_methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion knossos/center.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
29 changes: 23 additions & 6 deletions knossos/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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...')
Expand Down Expand Up @@ -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):
Expand All @@ -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...')
Expand Down Expand Up @@ -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
Expand All @@ -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)


Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions knossos/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion releng/ubuntu/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 57bb3f1

Please sign in to comment.