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

Allow us to start games on linux using hydra and lutris. #155

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

gylli251
Copy link

@gylli251 gylli251 commented May 1, 2024

Allow us to start games on linux using hydra and lutris.

So far just works, if somebody else can test it with me it would be great.

it uses the lutris runtime thats default to run the executable. sadly it needs to make the .exe execute permissions but don't see a way around that.

also changed the way the select and executable its not windows only.

Note that maybe its better to do the detection of what OS is running some way else then using "which lutris"

Copy link
Collaborator

@hydralauncher hydralauncher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove left comments

src/renderer/src/pages/game-details/hero-panel-actions.tsx Outdated Show resolved Hide resolved
src/main/events/library/open-game.ts Outdated Show resolved Hide resolved
src/main/events/library/open-game.ts Outdated Show resolved Hide resolved
src/main/events/library/open-game.ts Outdated Show resolved Hide resolved
src/main/events/library/open-game.ts Outdated Show resolved Hide resolved
src/main/events/library/open-game.ts Outdated Show resolved Hide resolved
src/main/events/library/open-game.ts Outdated Show resolved Hide resolved
src/main/events/library/open-game.ts Outdated Show resolved Hide resolved
src/main/events/library/open-game.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@hydralauncher hydralauncher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/main/events/library/open-game.ts Outdated Show resolved Hide resolved
src/renderer/src/pages/game-details/hero-panel-actions.tsx Outdated Show resolved Hide resolved
src/main/events/library/open-game.ts Outdated Show resolved Hide resolved
@gylli251
Copy link
Author

gylli251 commented May 5, 2024

Done. not sure about the merge conflicts can you take a look @hydralauncher ?

@hydralauncher
Copy link
Collaborator

@gylli251 could you resolve them?

if (process.platform === 'linux') {
const { stdout: lutrisPath } = await exec('which lutris');
if (lutrisPath.trim()) {
await exec(`chmod +x "${executablePath}"`);
Copy link

@scrlkx scrlkx May 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give execution permission to a file that will be downloaded from the internet can lead to major security issues and, as far as I can see, we are doing it without even telling the user about it.

I understand why it's important, but I really believe that it should not be there. We do not handle game installation and we should not handle file permissioning either.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like i said in the original PR:

"it uses the lutris runtime thats default to run the executable. sadly it needs to make the .exe execute permissions but don't see a way around that."

Lutris does not run games without making the .exe an executable. dont see a way around it unless we want to make it a popup for the user to select which .exe to make executable?

Or we can look into using some other tool then lutris

Copy link

@scrlkx scrlkx May 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did succeed on running .exe files when going straight to Wine. It could be a good idea for this feature too as we could skip one layer of software. Even though we stick to calling Lutris, I would rather to let the user take care of this itself, maybe giving him some hints?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any new ideas with this @scrlkx @gylli251?
I fixed the conflict, the PR is now updated with main branch

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

Successfully merging this pull request may close these issues.

None yet

5 participants