diff --git a/mod/host.py b/mod/host.py index caa22692..0f7d2883 100644 --- a/mod/host.py +++ b/mod/host.py @@ -21,7 +21,7 @@ from random import randint from tornado import gen, iostream from tornado.ioloop import IOLoop, PeriodicCallback -import os, json, socket, time, logging +import os, json, socket, time, logging, sys import shutil # only used for HMI screenshots, optional @@ -4063,17 +4063,19 @@ def save_state_mainfile(self, bundlepath, title, titlesym): midiportsOut = [] midiportAlias = {} - for port_symbol, port_alias, _ in self.midiports: - if ";" in port_symbol: - inp, outp = port_symbol.split(";",1) - midiportsIn.append(inp) - midiportsOut.append(outp) - title_in, title_out = port_alias.split(";",1) - midiportAlias[inp] = title_in - midiportAlias[outp] = title_out - else: - midiportsIn.append(port_symbol) - midiportAlias[port_symbol] = port_alias + # TODO support for other kinds of aliases + if sys.platform != "win32": + for port_symbol, port_alias, _ in self.midiports: + if ";" in port_symbol: + inp, outp = port_symbol.split(";",1) + midiportsIn.append(inp) + midiportsOut.append(outp) + title_in, title_out = port_alias.split(";",1) + midiportAlias[inp] = title_in + midiportAlias[outp] = title_out + else: + midiportsIn.append(port_symbol) + midiportAlias[port_symbol] = port_alias # Arcs (connections) arcs = "" diff --git a/mod/screenshot.py b/mod/screenshot.py index 8e515208..d8e177a2 100644 --- a/mod/screenshot.py +++ b/mod/screenshot.py @@ -24,6 +24,8 @@ def generate_screenshot(bundle_path, callback): # running packaged through cxfreeze if os.path.isfile(sys.argv[0]): + # TODO this does not work yet + return cmd = [os.path.join(cwd, 'mod-screenshot'), 'take_screenshot', bundle_path, HTML_DIR, CACHE_DIR] if sys.platform == 'win32': cmd[0] += ".exe"