mirror of
https://github.com/quexten/goldwarden.git
synced 2024-12-12 12:56:36 +01:00
Add macos startup scripts
This commit is contained in:
parent
275ba9a3d2
commit
a41c91ca6b
@ -1,4 +1,12 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import src.linux.main as linux_main
|
|
||||||
|
|
||||||
linux_main.main()
|
import platform
|
||||||
|
|
||||||
|
if platform.system() == 'Darwin':
|
||||||
|
import src.macos.main as macos_main
|
||||||
|
macos_main.main()
|
||||||
|
elif platform.system() == 'Linux':
|
||||||
|
import src.linux.main as linux_main
|
||||||
|
linux_main.main()
|
||||||
|
else:
|
||||||
|
print("Unsupported OS " + platform.system() + "... exiting...")
|
13
gui/src/macos/main.py
Normal file
13
gui/src/macos/main.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
import os
|
||||||
|
|
||||||
|
root_path = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir, os.pardir))
|
||||||
|
|
||||||
|
def main():
|
||||||
|
token = "abc"
|
||||||
|
print("Starting Goldwarden GUI")
|
||||||
|
if not "--hidden" in sys.argv:
|
||||||
|
p = subprocess.Popen(["python3", "-m", "src.gui.settings"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, cwd=root_path, start_new_session=True)
|
||||||
|
p.stdin.write(f"{token}\n".encode())
|
||||||
|
p.stdin.flush()
|
Loading…
Reference in New Issue
Block a user