Prepare for Windows builds

This commit is contained in:
kramo
2023-03-19 01:06:00 +01:00
parent e709617370
commit c5b263c71e
7 changed files with 198 additions and 138 deletions

View File

@@ -25,12 +25,13 @@ from gi.repository import Gio
def run_command(executable):
with subprocess.Popen(
subprocess.Popen(
["flatpak-spawn --host " + executable]
if os.getenv("FLATPAK_ID") == "hu.kramo.Cartridges"
else [executable],
shell=True,
start_new_session=True,
):
if Gio.Settings.new("hu.kramo.Cartridges").get_boolean("exit-after-launch"):
sys.exit()
creationflags=subprocess.CREATE_NEW_PROCESS_GROUP if os.name == "nt" else 0,
)
if Gio.Settings.new("hu.kramo.Cartridges").get_boolean("exit-after-launch"):
sys.exit()