Properly launch games on Windows
This commit is contained in:
@@ -129,7 +129,11 @@ def heroic_parser(parent_widget, action):
|
||||
|
||||
values["name"] = game["title"]
|
||||
values["developer"] = game["developer"]
|
||||
values["executable"] = "xdg-open heroic://launch/" + app_name
|
||||
values["executable"] = (
|
||||
"start heroic://launch/" + app_name
|
||||
if os.name == "nt"
|
||||
else "xdg-open heroic://launch/" + app_name
|
||||
)
|
||||
values["hidden"] = False
|
||||
values["source"] = "heroic_epic"
|
||||
values["added"] = current_time
|
||||
@@ -189,7 +193,11 @@ def heroic_parser(parent_widget, action):
|
||||
save_cover(values, parent_widget, image_path)
|
||||
break
|
||||
|
||||
values["executable"] = "xdg-open heroic://launch/" + app_name
|
||||
values["executable"] = (
|
||||
"start heroic://launch/" + app_name
|
||||
if os.name == "nt"
|
||||
else "xdg-open heroic://launch/" + app_name
|
||||
)
|
||||
values["hidden"] = False
|
||||
values["source"] = "heroic_gog"
|
||||
values["added"] = current_time
|
||||
@@ -220,7 +228,11 @@ def heroic_parser(parent_widget, action):
|
||||
continue
|
||||
|
||||
values["name"] = item["title"]
|
||||
values["executable"] = "xdg-open heroic://launch/" + app_name
|
||||
values["executable"] = (
|
||||
"start heroic://launch/" + app_name
|
||||
if os.name == "nt"
|
||||
else "xdg-open heroic://launch/" + app_name
|
||||
)
|
||||
values["hidden"] = False
|
||||
values["source"] = "heroic_sideload"
|
||||
values["added"] = current_time
|
||||
|
||||
@@ -28,6 +28,8 @@ def run_command(executable):
|
||||
subprocess.Popen(
|
||||
["flatpak-spawn --host " + executable]
|
||||
if os.getenv("FLATPAK_ID") == "hu.kramo.Cartridges"
|
||||
else executable.split()
|
||||
if os.name == "nt"
|
||||
else [executable],
|
||||
shell=True,
|
||||
start_new_session=True,
|
||||
|
||||
@@ -63,7 +63,11 @@ def get_game(task, datatypes, current_time, parent_widget, appmanifest, steam_di
|
||||
task.return_value(None)
|
||||
return
|
||||
|
||||
values["executable"] = "xdg-open steam://rungameid/" + values["appid"]
|
||||
values["executable"] = (
|
||||
"start steam://rungameid/" + values["appid"]
|
||||
if os.name == "nt"
|
||||
else "xdg-open steam://rungameid/" + values["appid"]
|
||||
)
|
||||
values["hidden"] = False
|
||||
values["source"] = "steam"
|
||||
values["added"] = current_time
|
||||
|
||||
Reference in New Issue
Block a user