Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions lyse/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@
import labscript_utils.excepthook
import importlib.metadata

APPLICATION_NAME = 'lyse'
LYSE_DIR = os.path.dirname(__file__)

# Associate app windows with OS menu shortcuts, must be before any GUI calls, apparently
import desktop_app
desktop_app.set_process_appid('lyse')
desktop_app.set_process_appid(APPLICATION_NAME)

# Splash screen
import labscript_utils.splash
splash = labscript_utils.splash.Splash(os.path.join(os.path.dirname(__file__), 'lyse.svg'))
splash = labscript_utils.splash.Splash(
os.path.join(LYSE_DIR, 'lyse.svg'), application_name=APPLICATION_NAME
)
splash.show()

splash.update_text('importing standard library modules')
Expand Down Expand Up @@ -118,7 +123,7 @@ class Lyse(object):

def __init__(self, qapplication):
# First: Start logging
self.logger = setup_logging('lyse')
self.logger = setup_logging(APPLICATION_NAME)
labscript_utils.excepthook.set_logger(self.logger)
self.logger.info('\n\n===============starting===============\n')
self.logger.info(f'Qt Environment: {QT_ENV}')
Expand All @@ -130,7 +135,7 @@ def __init__(self, qapplication):

# Third: connect to zprocess and set a meaningful name for zlock client id:
self.process_tree = ProcessTree.instance()
self.process_tree.zlock_client.set_process_name('lyse')
self.process_tree.zlock_client.set_process_name(APPLICATION_NAME)

# Forth: start remote communication server
self.port = int(self.exp_config.get('ports', 'lyse'))
Expand Down
7 changes: 7 additions & 0 deletions lyse/analysis_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import labscript_utils.excepthook # I do magic stuff, so import must be in place
import labscript_utils.h5_lock, h5py
import labscript_utils.splash

from labscript_utils.ls_zprocess import ProcessTree

Expand Down Expand Up @@ -520,6 +521,12 @@ def reset_figs(self):
qapplication = QtWidgets.QApplication.instance()
if qapplication is None:
qapplication = QtWidgets.QApplication(sys.argv)
qapplication.setProperty(
'_labscript_icon_path', os.path.join(lyse.utils.LYSE_DIR, 'lyse.svg')
)
qapplication.setApplicationName('lyse')
qapplication.setApplicationDisplayName('lyse')
labscript_utils.splash.configure_qapplication(qapplication)
worker = AnalysisWorker(filepath, to_parent, from_parent)
qapplication.exec()

2 changes: 1 addition & 1 deletion lyse/desktop-app.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"product_name": "Labscript Suite",
"modules": {"lyse": {"display_name": "lyse - the labscript suite"}}
"modules": {"lyse": {"display_name": "lyse - the labscript suite", "short_display_name": "lyse"}}
}