diff --git a/Launcher.py b/Launcher.py index f84488c86a..89421ff305 100644 --- a/Launcher.py +++ b/Launcher.py @@ -218,12 +218,17 @@ def launch(exe, in_terminal=False): def create_shortcut(button: Any, component: Component) -> None: from pyshortcuts import make_shortcut - script = sys.argv[0] - wkdir = Utils.local_path() + env = os.environ + if "APPIMAGE" in env: + script = env["ARGV0"] + wkdir = None # defaults to ~ on Linux + else: + script = sys.argv[0] + wkdir = Utils.local_path() script = f"{script} \"{component.display_name}\"" make_shortcut(script, name=f"Archipelago {component.display_name}", icon=local_path("data", "icon.ico"), - startmenu=False, terminal=False, working_dir=wkdir) + startmenu=False, terminal=False, working_dir=wkdir, noexe=Utils.is_frozen()) button.menu.dismiss()