autostart, include msi for updates

This commit is contained in:
j 2016-04-14 21:26:13 +02:00
parent 4f7c7a6c49
commit 15d9012f5a
3 changed files with 7 additions and 4 deletions

BIN
Open Media Library.msi Normal file

Binary file not shown.

View file

@ -24,9 +24,11 @@ class OMLTrayIcon(object):
FIRST_ID = 1023 FIRST_ID = 1023
def __init__(self): def __init__(self, autostart):
self.autostart = autostart
self.thread_id = win32api.GetCurrentThreadId() self.thread_id = win32api.GetCurrentThreadId()
launch(self) if not self.autostart:
launch(self)
name = "Open Media Library" name = "Open Media Library"
self.icon = "ico/oml.ico" self.icon = "ico/oml.ico"
self.hover_text = name self.hover_text = name
@ -272,6 +274,7 @@ if __name__ == '__main__':
base = os.path.dirname(sys.executable) base = os.path.dirname(sys.executable)
else: else:
base = os.path.dirname(os.path.realpath(__file__)) base = os.path.dirname(os.path.realpath(__file__))
autostart = len(sys.argv) > 1 and sys.argv[1] == '--autostart'
base = os.path.abspath(base) base = os.path.abspath(base)
os.chdir(base) os.chdir(base)
OMLTrayIcon() OMLTrayIcon(autostart)

View file

@ -37,7 +37,7 @@ oml = Executable(
setup( setup(
name = "Open Media Library", name = "Open Media Library",
version = "0.1", version = "0.2",
description = "Open Media Library", description = "Open Media Library",
options = { options = {
"build_exe": build_exe_options, "build_exe": build_exe_options,