-
-
Notifications
You must be signed in to change notification settings - Fork 21
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: Linux launch support #116
Conversation
This only has GUI elements, and slight changes to the utils.launch() function, but none that would result in anything working yet.
extras/findgame.js is now extras/find.js, as it now also is able to find the prefix of your Steam install and the path to Origin. Generally speaking you can technically launch the game right now, both Vanilla and Northstar (from what I can tell), albeit Wine is being weird for me currently and leads to the game freezing while it's loading, or simply never running because Origin is technically already running in the background. Maybe I should add a "kill" function to the launch screen. Besides that some status text would also be nice i.e change "Launch" to "Launching", to make sure the user doesn't think Viper isn't doing anything. On the Windows side of things I also made the NS Launch use "Titanfall2.exe -northstar" instead of "NorthstarLauncher.exe" to prevent some authentication issues, I haven't tested it yet, and will do later, we unfortunately can't do that on Linux as "-northstar" never gets passed, hence why we manually have to launch Origin and everything. Overall needs more testing, and not complete. As I'm still missing a way to find Proton, which would in the end lead to a hassle free experience.
Overall we should now be able to find the latest version of Proton, the Prefix, and everything a like, all automatically. Albeit launching is sort of iffy, and seems to work, but with some issues that seem to be caused mostly by my system.
When the game is running the buttons will go from saying "Launch" to "Running" and the buttons will also disable, so you can't run the game multiple times, avoiding a lot of issues.
Currently the Vanilla game should launch just fine, however there seems to be some weird issues with Origin stopping NS from launching correctly, I'll make an update when this should be fixed... |
Added linux related strings with their respective translations and some corrections.
Something to note: Invoking Proton outside of Steam is not supported. Its better to invoke steam directly for that. |
Requiring invocation of Steam, and removing the ability of launching Northstar from a user set or auto detected prefix, with a user or auto detected version of Proton, would also make it far more trivial to get it to work outside of Steam installs. One thing is having the option to launch by invoking Steam, another is enforcing it. Besides this, Viper should be as automagic as possible, a user in a perfect world should install Titanfall somehow, install Viper and then in as few clicks as possible launch the game. Hence auto detecting Steam installs, and setting paths through it, attempting to find the prefix, and Proton build as well, and letting the user know to set it manually if not found. Ideally the only user who would ever have to set it manually is someone who understands what that means. A user who decides to use Lutris or other means of installing the game should still have it as easy as possible, and not be treated like second class citizens, and with all that reasoning I am unlikely to merge your PR (#170), but I'm not going to close it yet, as this really is a discussion.
It may not be, but Proton is Wine with Valve's patches, it may operate slightly different but Steam only wraps around it, and it's really, logically speaking no less supported than running your local executable of Wine. The only real difference here is that we may use the wrong Proton version, but that's not realistically, a problem. Or we may be missing some environment variables and so forth, that the user may have set inside Steam. Again, not much of an issue, mostly because we can add options for these. I cannot overstate that I am not against invoking Steam as well, but for reasons stated above, we can't remove the ability to run Proton and the prefix directly. This PR itself is currently outdated and needs to pull from upstream and correct conflicts soon, and I've intended on finishing Linux launch support for a bit, I simply have not had the motivation or time to actually get it done. Feel free to give me your feedback on all this! TL;DR: I won't remove the ability to launch Proton and prefixes directly. |
Steam's library list may be outdated, or a drive may not be mounted currently, however we would still attempt to read the folder that doesn't currently exist, causing an error.
This is no longer the case as I've just gotten it up to date. |
The thought was not to force Steam but to not use invoke Proton.
Okay? The idea behind #170 is to, instead of manually running wine and praying nothing breaks because of environment, implement support for wherever Titanfall was installed and invoke that instead. No need to bother with runtimes or broken wine versions.
No
It may work but its not supported and known to break due to different/missing dependencies and other shenanings. One solution to that would be to implement a proper Proton wrapper, but that would require the Steam Runtime.
The idea is not to cut out wine prefixes at all. Instead Viper would need to create and manage its own wine prefix.
Never asked you to. |
Because you opened a PR that abolishes all the code in this PR, and only supports invoking Steam, I incorrectly so, assumed that you didn't want any manual Wine and prefix options. And I will admit that I still don't quite understand why you made an entirely new PR instead of working upon the code already in this one. I do not intend to remove the code for detecting and using Steam installed Proton builds, nor it's prefixes. Missing dependencies will be an issue no matter what, unless we vendor all of them, which I don't feel is a good option whatsoever. Instead detecting that dependencies are missing would be a better idea. As I've said in other discussions before, I would like to avoid packaging and downloading external builds and tools just to use Viper. Out of curiosity, what headaches do you anticipate we would face, not counting issues with dependencies or the only Proton/Wine builds being found being ones that are outdated or similar. If the user has Steam installed, chances are Viper would find a Proton build that's recent enough, the idea would also be to allow the user to select through them, in case they want to use a specific build. Again, I personally think the best option is to invoke Steam and or Lutris if possible and then falling back to searching and using Proton builds and prefixes manually. |
... I've managed to completely miss this PR multiple times and wasn't aware it exist until I had already written that code.
Sure, you do you.
You can't have it both ways.
It depends I guess. The Proton wrapper tends to do a lot of setup for e.g. DXVK, Nvidia Drivers, dll's, fonts, etc. and the way the modify the environment to make it more predictable e.g. setting the userename to Prefix management too.
You do you. |
Is a german translation needed or? |
Yes and no, the language strings will likely change and have some added by the time it's actually ready to be merged. I think when this PR was originally opened there was no German localization? maybe? I've added it to the list, but localizing it now may be a little dumb. I'll ping when it's needed :) |
I have an idea for Lutris. |
As briefly discussed in #38 the plan is now the following:
Option 2 would essentially be equivalent to your suggestion, however we could add an option to launch desktop files, and show the ones that are automatically found in The only issue with this is differing between launching vanilla and Northstar... |
Different prefixes and names in Lutris for both. |
I'm referring to doing all that automatically. |
I don't think it can be done automatically, because there's no single rungameid like on Steam. |
Not entirely, no. |
Any updates to this? |
Currently, no. The plan is to close this PR and open a new one, as this one is nearly 50 commits behind the main branch. And it'd frankly be more work to resolve the conflicts than to simply make a new one. On top of this, I intend to simply add support for launching it through Steam directly, and then on top of that, options for setting a prefix, a Wine binary and launch with that, like this PR achieves. Whether those arrive in the same release and or PR I don't know quite yet. The plan is still to get Linux launch support added sooner or later. I just have not had the time to look into it myself, and in the past my setup for the game was quite unorthodox and it therefore made it hard to make something that worked on other's setups. |
How about adopting the behavior I previously proposed, where the user can choose the launch method in the settings? |
The intention would be to add such an option, but it'd obviously only have a use if both methods of launching are implemented. But yes, when both are implemented, such an option would be added. |
Any updates to this? |
The plan is still the same, open a new PR at some point, and redo the implementation, having support for launching with Steam and being able to choose a custom command to launch the game with (2 separate options for base game and with Northstar) As for an ETA, soon'ish? Maybe? I have had the time and motivation to work on Viper a lot more recently. I've also finally moved my game over to being installed through Steam, instead of manually with weird Wine prefixes, which makes things easier. I would also point out that I no longer have the intention of making it possible for a user to select a Wine prefix + Wine/Proton executable and then run that way, at least for now, unless there's a good reason to add it, as you'd be able to achieve the same thing quite easily with the custom launch command. Hope that clarifies things! |
Closing this, as a new PR has been opened to add Linux launch support: #229 |
This PR when merged should ideally completely add support for Linux users being able to click "Launch", with little to no effort, (if the user install the game through Steam), a few things are missing, but generally everything works.
Notably I need everything verified to be working, not only the Linux side of things, but also Windows, as I made some slight changes to the launch code, some to make Linux launching possible, but others because I switched away from running
NorthstarLauncher.exe
and insteadTitanfall.exe -northstar
, it should work just fine, but I can't test this.As for Linux testing, I can't easily test this, as I don't currently have a hard disk on hand to install the game onto (however I will attempt to jerry rig something if nobody is able to test it, I'll probably end up doing that anyway), and I use very low storage SSD's, so I don't have the space to install the game again.
And then there's the localizations... Found below (@Alystrasz, @AA-Delta)
I took the liberty of adding
gui.settings.title.linux
myself to all the localizations, however feel free to edit it if "Linux" is spelt differently in your language, I doubted that, which was why I added it.I've created Pre-Release which I'll update when new commits are added here, so you don't have to build Viper manually when testing.
TODO
de.json
)fr.json
)es.json
)find.proton()
)find.prefix().path
)find.prefix().origin
)