Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If install.executable starts with a leading slash, os.path.join discards the install path and fails to launch game #42

Closed
cybercyst opened this issue May 22, 2020 · 8 comments

Comments

@cybercyst
Copy link

game_exe = os.path.join(install.install_path, install.executable)

https://docs.python.org/3/library/os.path.html#os.path.join

If a component is an absolute path, all previous components are thrown away and joining continues from the absolute path component.

Not sure why my executables in install.json have a leading slash, but it breaks legendary for me

@derrod
Copy link
Owner

derrod commented May 22, 2020

What game? Can you share the manifest from .config/legendary/manifests?

@cybercyst
Copy link
Author

cybercyst commented May 22, 2020

the code above doesn't use the manifest, it uses the $XDG_CONFIG/legendary/installed.json

{
  "Parakeet": {
    "app_name": "Parakeet",
    "base_urls": [
      "https://epicgames-download1.akamaized.net/Builds/Org/o-sa7ewerl9ha4ddzrjkjac7rh8sjgyc/50af5c44f34f454e98e2154f146eec6e/default",
      "https://download.epicgames.com/Builds/Org/o-sa7ewerl9ha4ddzrjkjac7rh8sjgyc/50af5c44f34f454e98e2154f146eec6e/default",
      "https://download2.epicgames.com/Builds/Org/o-sa7ewerl9ha4ddzrjkjac7rh8sjgyc/50af5c44f34f454e98e2154f146eec6e/default",
      "https://download3.epicgames.com/Builds/Org/o-sa7ewerl9ha4ddzrjkjac7rh8sjgyc/50af5c44f34f454e98e2154f146eec6e/default",
      "https://download4.epicgames.com/Builds/Org/o-sa7ewerl9ha4ddzrjkjac7rh8sjgyc/50af5c44f34f454e98e2154f146eec6e/default"
    ],
    "can_run_offline": true,
    "executable": "/HyperLightDrifter.exe",
    "install_path": "/var/games/epic/HyperLightDrifter",
    "is_dlc": false,
    "launch_parameters": "",
    "manifest_path": null,
    "needs_verification": false,
    "prereq_info": null,
    "requires_ot": false,
    "save_path": null,
    "title": "Hyper Light Drifter",
    "version": "1.0.0"
  }
}

i manually updated the above "executable", removing the leading / and it made launching the game work!

@cybercyst
Copy link
Author

how can i post the manifest in a readable way for you?

@derrod
Copy link
Owner

derrod commented May 22, 2020

The executable path is read from the manifest, it's a binary file. I'd like to check if there's anything wrong with that. For hyper light drifter it should be fairly small, so maybe attaching to a comment works? Otherwise firefox send or something like that.

@cybercyst
Copy link
Author

so not sure what added that leading / to the executable... it isn't from the manifest

@derrod
Copy link
Owner

derrod commented May 22, 2020

That's not the manifest file, that's the output of list-files, the manifest file should be called Parakeet.manifest and be in in the manifests/ directory.

@cybercyst
Copy link
Author

@derrod
Copy link
Owner

derrod commented May 23, 2020

Double checked the parser and indeed it seems the launch exe was specified with a leading slash for some reason, I'll just make it strip that.

@derrod derrod closed this as completed in e9a959e May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants