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

[Feat] - Improve compatibility layer initialization for Mac and Linux #1214

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

Conversation

flavioislima
Copy link
Contributor

@flavioislima flavioislima commented Jan 21, 2025

This pull request includes several changes to the compatibility layer initialization and wine version management for different platforms. The main changes involve updating the initialization logic for Linux and Mac, modifying the default wine version download criteria, and adjusting the UI settings for the Wine Manager.

It makes Proton-GE default on Linux since Wine-GE is not maintained anymore.

Compatibility Layer Initialization:

  • src/backend/utils/compatibility_layers.ts: Updated the initializeCompatibilityLayer function to include Linux in the compatibility layer setup and replaced setGPTKDefaultOnMacOS with a more generic setDefaultCompatibilityLayer function. [1] [2]

Wine Version Management:

UI Adjustments:

  • src/frontend/screens/WineManager/index.tsx: Updated the Wine Manager UI settings to use 'Proton-GE' instead of 'Wine-GE' for Linux and adjusted the initial state and settings accordingly. Also added a check to refresh wine version information if the list is empty on initial load. [1] [2] [3]

HOW TO TEST

  • On Linux, go to the App Settings > Game SEttings. Set Wine-GE as default.
  • Restart the app, it should change it to Proton-GE.
  • On the Wine Manager on Linux, check if Proton-GE is now the default tab.

Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

…x support

- Updated `initializeCompatibilityLayer` to include Linux in the compatibility checks.
- Renamed `setGPTKDefaultOnMacOS` to `setDefaultCompatibilityLayer` for broader applicability.
- Enhanced wine version selection logic to accommodate Proton-GE for Linux and improved compatibility checks for MacOS.
- Added early return conditions to streamline the process based on platform compatibility.

This refactor improves the overall compatibility layer setup for both Mac and Linux environments.
- Changed the default count for wine version info fetching from 50 to 15 to optimize performance.
- Renamed Wine-GE settings to Proton-GE in the WineManager component for clarity and consistency.
- Updated the state initialization to reflect the new Proton-GE settings.
- Added a condition to refresh wine version info if no versions are available, enhancing user experience.
@flavioislima flavioislima self-assigned this Jan 21, 2025
@flavioislima flavioislima added PR: Ready-For-Review PR is ready to be reviewed by peers and removed PR: WIP labels Jan 22, 2025
@flavioislima flavioislima added PR: Ready-For-Test PR is ready to be tested by a QA and removed PR: Ready-For-Review PR is ready to be reviewed by peers labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Ready-For-Test PR is ready to be tested by a QA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants