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

Semi-comprehensive linux port of the client. #40

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

asier-ochoa
Copy link

@asier-ochoa asier-ochoa commented Sep 26, 2023

General objective:

With this PR, sc4mp's client should work on linux and steam without having to mess around manually with the wine prefixes. Configuration files and data should be saved on ~/.local/sc4mp-client by default. Applying client plugins should be done via symlinks to the Documents/Simcity 4 folder. The final goal is to be able to distribute the client in such a way that it should run ootb on common linux distributions. (Maybe distribute on the AUR if permission is granted?)

Goals:

  • Monitor SC4's process as seamlessly as it is on windows
  • Automatically launch the game from either a specified wine prefix or directly from steam (watch out for flatpak steam)
  • Symlinking of plugins to the Documents folder on the prefix
  • Modifying the core logic of the client such that it accomodates these changes but doesn't affect current windows functionality
  • Implementing the "first_time" user logic so that linux users can specify their paths. Attempt to implement for windows as well.

Asier added 3 commits September 25, 2023 20:53
…ol. Created function to monitor sc4's process on linux.

Lots of hacky changes were made, make sure to rollback before submitting a PR.
… more easily declared (NEEDS WINDOWS TESTING). Added LINUX section to configuration
…rrent working direction. Added extra linux specific config options to allow for non-steam linux play. Created small path checking function specific to linux (Not as robust as windows, need to consult devs about the logic behind the original). Separated sc4 launching logic for linux into it's own function. Moved sc4mp-client's data directory into .local/share.
@asier-ochoa
Copy link
Author

This issue regarding launching a steam version of SC4 on windows could be fixed by using steam's browser protocol. This functionality is partially in this PR (implemented here). Could try to add it to the windows function for launching sc4.

Asier added 2 commits September 27, 2023 15:17
… Should be restored as soon as the game closes.

Tested on a public server, most things seem to be working fine. (consider integration tests)
…s closed when opening game. Added cleanup in case launching crashes using the finally clause. Process monitor now tries to get process until found or until timeout hit.
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

1 participant