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

Heroic using Flatpak Steam dir even after uninstalling the Steam Flatpak #1612

Closed
felipecrs opened this issue Jul 21, 2022 · 12 comments · Fixed by #1675
Closed

Heroic using Flatpak Steam dir even after uninstalling the Steam Flatpak #1612

felipecrs opened this issue Jul 21, 2022 · 12 comments · Fixed by #1675

Comments

@felipecrs
Copy link
Contributor

Or perhaps, this is a side-effect of the settings page entry for Steam default path not applying the changes made (have to manually set it in the config.json to make effect).

Originally posted by @felipecrs in #1331 (comment)

@Nocccer
Copy link
Collaborator

Nocccer commented Jul 21, 2022

There is no easy way to detect the paths. What we do is prefer steam flatpak over steam none-flatpak:

export function getSteamCompatFolder() {
// Paths are from https://savelocation.net/steam-game-folder
if (isWindows) {
const defaultWinPath = join(process.env['PROGRAMFILES(X86)'], 'Steam')
return defaultWinPath
// Reading of steam registry key should work with registry-js
// in electron enviroment but there is a npm node-gyp problem so far:
// https://github.com/desktop/registry-js/issues/224
//
// try {
// const entry = enumerateValues(
// HKEY.HKEY_LOCAL_MACHINE,
// 'SOFTWARE\\WOW6432Node\\Valve\\Steam'
// ).filter((value) => value.name === 'InstallPath')[0]
// return (entry && String(entry.data)) || defaultWinPath
// } catch {
// return defaultWinPath
// }
} else if (isMac) {
return normalize(join(userHome, 'Library/Application Support/Steam'))
} else {
const flatpakSteamPath = normalize(
join(userHome, '.var/app/com.valvesoftware.Steam/.steam/steam')
)
if (existsSync(flatpakSteamPath)) {
return flatpakSteamPath
}
return normalize(join(userHome, '.steam/steam'))
}
}

@felipecrs
Copy link
Contributor Author

That makes sense. So, the only issue is:

Heroic_BI3qEzAgMM.mp4

@Nocccer
Copy link
Collaborator

Nocccer commented Jul 21, 2022

That makes sense. So, the only issue is:

Heroic_BI3qEzAgMM.mp4

#1611

Workaround for now would be adapt the path and toggle a other option.

@Nocccer
Copy link
Collaborator

Nocccer commented Aug 7, 2022

I think we should consider using fltapak steam as last resort?
@flavioislima @CommandMC @arielj opinions?

@flavioislima
Copy link
Member

The problem is thst on flatpak when you uninstall the app it keep the data files, so how would we know?
Maybe rely on flatpak only it heroic is flatpak as well? Still won't work for everyone.

@Nocccer
Copy link
Collaborator

Nocccer commented Aug 7, 2022

The question is if we wanna change the order here? So we check for none flatpak first and flatpak second.

} else {
const flatpakSteamPath = normalize(
join(userHome, '.var/app/com.valvesoftware.Steam/.steam/steam')
)
if (existsSync(flatpakSteamPath)) {
return flatpakSteamPath
}
return normalize(join(userHome, '.steam/steam'))
}

@flavioislima
Copy link
Member

I don't think this will make much of a difference. More and more people are using flatpak now and changing the order will give false positives for people that changed the distro steam for the flatpak one.

I thibk we just need a wiki in the page with a troubleshooting for that until we find a way of checking if steam is installed.

Also, another edge case if a person has two steams installed.

@Nocccer
Copy link
Collaborator

Nocccer commented Aug 7, 2022

Ok wait a minute. I'm dumb. I added a option to set the steam path. Need to check if this works for every function that relies on steam path, but i think i covered everything.

So in next release people can workaround by setting the steam path in general settings, if needed.

I think we can close the ticket.

@felipecrs
Copy link
Contributor Author

It should not be too difficult to run a 'flatpak' command to check if Steam is currently installed by flatpak or not.

@Nocccer
Copy link
Collaborator

Nocccer commented Aug 7, 2022

Yes we could do that. But we only run it once if we setup the default settings. So if you already installed heroic and install flatpak steam aferwards, maybe it is not picked up.

@felipecrs
Copy link
Contributor Author

So, in that sense, you could add a new checkbox that says:

  • Custom Steam install path

If the user ticks it, the install path field can be customized and so on.

@Nocccer
Copy link
Collaborator

Nocccer commented Aug 7, 2022

So, in that sense, you could add a new checkbox that says:

  • Custom Steam install path

If the user ticks it, the install path field can be customized and so on.

Why a checkbox? Just guess the default path and if it is not correct the user can fix it by itself in settings.
Only thing i will add is the flatpak check, if steam is installed via flatpak.

@Nocccer Nocccer linked a pull request Aug 8, 2022 that will close this issue
4 tasks
@Nocccer Nocccer closed this as completed Aug 8, 2022
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 a pull request may close this issue.

3 participants