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

Linux+Proton support #3

Merged
merged 8 commits into from
May 23, 2023
Merged

Conversation

JonLiuFYI
Copy link
Contributor

@JonLiuFYI JonLiuFYI commented May 10, 2023

When complete, this closes #2 and increases the version number to 1.2.

Tasks

  • Abstract away Windows/Linux differences from profiles.py
  • Conditionally import ctypes windll
  • Change Windows-specific hardcoded paths (like config.json) to work on linux
  • Update README: python min ver (3.8?), OS support
  • Authors file

Acceptance

  • Works on Windows without regressions
  • Reproduce that it works on Linux+Proton
  • Works with PyInstaller

After merging

Build and release version 1.2 for

  • Windows
  • Linux

JonLiuFYI added 5 commits May 8, 2023 22:46
* Replaced OS checks in profiles.py with a dependency injection
* Extracted Game_Choice to a separate module (fixes a circular import
caused by the above)
* Converted most `os.path` uses into `pathlib.Path`, which is friendlier
  * Some `os.path`s still exist in Windows-specific code
  * `get_latest_directory` logic updated to work with Path
* Added new exception `SaveDataNotFound` for UserOS
Changed how CONFIG.config_path finds the app's directory path. The Linux
PyInstaller onefile now chooses the right place for the config.json.
@JonLiuFYI JonLiuFYI marked this pull request as ready for review May 15, 2023 03:48
@JonLiuFYI
Copy link
Contributor Author

My changes to complete #2 are done. I live tested these changes on my PC running Fedora, and it properly changes mouse sensitivity and saves a config.json file.

46d9b1f changes how the config_path is determined, which allows PyInstaller onefiles built for Linux to find the right path.

@biggestcookie biggestcookie self-requested a review May 15, 2023 14:23
@biggestcookie
Copy link
Owner

Thanks @JonLiuFYI -- will be giving it a look this week!

Copy link
Owner

@biggestcookie biggestcookie left a comment

Choose a reason for hiding this comment

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

Finished reviewing and testing the solution. Working great on my Windows machine. Once again really appreciate the stellar work and refactoring! I learned a lot such as Python having built-in abstract base class utilities.
Only have minor suggestions for the README that I do not mind much either way on, so after you review I'll approve, merge, and create a release here as well as on Nexus Mods.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
JonLiuFYI and others added 3 commits May 21, 2023 23:15
Co-authored-by: biggestcookie <5748299+biggestcookie@users.noreply.github.com>
Co-authored-by: biggestcookie <5748299+biggestcookie@users.noreply.github.com>
@JonLiuFYI
Copy link
Contributor Author

Ship this bad boy.

@biggestcookie biggestcookie merged commit d6acce9 into biggestcookie:master May 23, 2023
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.

Add Linux+Proton support
2 participants