diff --git a/Open Media Library.msi b/Open Media Library.msi new file mode 100644 index 0000000..32d1039 Binary files /dev/null and b/Open Media Library.msi differ diff --git a/trayicon/Open Media Library.py b/trayicon/Open Media Library.py index 8e20639..90890da 100644 --- a/trayicon/Open Media Library.py +++ b/trayicon/Open Media Library.py @@ -24,9 +24,11 @@ class OMLTrayIcon(object): FIRST_ID = 1023 - def __init__(self): + def __init__(self, autostart): + self.autostart = autostart self.thread_id = win32api.GetCurrentThreadId() - launch(self) + if not self.autostart: + launch(self) name = "Open Media Library" self.icon = "ico/oml.ico" self.hover_text = name @@ -272,6 +274,7 @@ if __name__ == '__main__': base = os.path.dirname(sys.executable) else: base = os.path.dirname(os.path.realpath(__file__)) + autostart = len(sys.argv) > 1 and sys.argv[1] == '--autostart' base = os.path.abspath(base) os.chdir(base) - OMLTrayIcon() + OMLTrayIcon(autostart) diff --git a/trayicon/setup.py b/trayicon/setup.py index 3389b05..dac22f6 100644 --- a/trayicon/setup.py +++ b/trayicon/setup.py @@ -37,7 +37,7 @@ oml = Executable( setup( name = "Open Media Library", - version = "0.1", + version = "0.2", description = "Open Media Library", options = { "build_exe": build_exe_options,