[Feat] Add option to download Proton-GE directly to Steam compatibility tools #4524
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new setting on the General settings to download Proton directly to steam
compatibilitytools.d
directory on linux.I thought on adding this setting to the wine manager screen but since we dont have settings implemented there it would be tricky.
Fixed some types as well.
AI Summary
This pull request introduces a new feature that allows users to download Proton-GE directly to the Steam compatibility tools directory on Linux systems, along with some related code improvements and adjustments. Below is a summary of the most important changes:
New Feature: Download Proton-GE to Steam Directory
downloadProtonToSteam
in the global configuration, allowing users to specify whether Proton-GE should be downloaded directly to Steam's compatibility tools directory instead of the default Heroic path (src/backend/config.ts
,src/common/types.ts
). [1] [2]getInstallDir
function to check for this setting and use the Steam directory if the path exists. A fallback mechanism ensures compatibility if the directory is missing (src/backend/wine/manager/utils.ts
).DownloadProtonToSteam
to the settings screen, enabling users to toggle this feature through the UI. This component includes a description and help icon for better usability (src/frontend/screens/Settings/components/DownloadProtonToSteam.tsx
,src/frontend/screens/Settings/components/index.ts
,src/frontend/screens/Settings/sections/GeneralSettings/index.tsx
). [1] [2] [3] [4]Localization Updates
downloadProtonToSteam
feature to provide localized text for the UI (public/locales/en/translation.json
). [1] [2]Code Improvements
installWineVersion
function to use stricter return types by appendingas const
to string return values, improving type safety (src/backend/wine/manager/utils.ts
). [1] [2] [3] [4]removeWineVersion
function by adding an explicitawait
statement (src/backend/wine/manager/utils.ts
).These changes collectively enhance the user experience by providing more flexibility for Linux users and improving code quality.
Use the following Checklist if you have changed something on the Backend or Frontend: