Skip to content

Commit

Permalink
Skip stuff that does not work on win32 for now
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Oct 6, 2023
1 parent 507ef99 commit cc184ca
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
26 changes: 14 additions & 12 deletions mod/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = ""
Expand Down
2 changes: 2 additions & 0 deletions mod/screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit cc184ca

Please sign in to comment.