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: Linux "Launch" support #38

Closed
0neGal opened this issue Jan 12, 2022 · 14 comments · Fixed by #229
Closed

feat: Linux "Launch" support #38

0neGal opened this issue Jan 12, 2022 · 14 comments · Fixed by #229
Assignees
Labels
enhancement New feature or request

Comments

@0neGal
Copy link
Owner

0neGal commented Jan 12, 2022

I would love to add support for Linux users to also be able to Launch the game through Viper, albeit it'll probably take some manual configuration from the user, like setting a command to launch Vanilla and Northstar.

However if the user has Lutris installed we could try and parse lutris --list, and same with Steam. To try and find the launch command.

We'll likely need this in R2Northstar/NorthstarWiki#34 anyway, at least for the Linux side of that issue.

@0neGal 0neGal added the enhancement New feature or request label Jan 12, 2022
@0neGal 0neGal self-assigned this Jan 12, 2022
@0neGal 0neGal pinned this issue Jan 12, 2022
@3top1a
Copy link
Contributor

3top1a commented Jan 25, 2022

One way to do Northstar for steam - move Titanfall2.exe to Titanfall2_old.exe and copy NorthstarLauncher.exe to Titanfall2.exe.
I use this to play Northstar though steam, although it is quite risky and not as sensible.

@0neGal
Copy link
Owner Author

0neGal commented Jan 25, 2022

although it is quite risky and not as sensible.

Which is exactly why we're not going to do that...

@3top1a
Copy link
Contributor

3top1a commented Jan 28, 2022

Another idea: Lutris has a "launch EXE within prefix" option we can use, but I don't know if the CLI has this option.
For steam, perhaps proton tricks has a function for that, or we could use this script that I found.
There's also a AddNonSteamGame option in Steams' Steam Browser Protocol.

@0neGal
Copy link
Owner Author

0neGal commented Jan 28, 2022

Lutris has a "launch EXE within prefix" option we can use

This won't have your environment variables nor will it use the version of Wine that you want.

There's also a AddNonSteamGame option in Steams' Steam Browser Protocol.

I suggest we don't mess with people's Steam library.

As I've mentioned before, the kind of user who uses Linux will most likely not only understand what the game path is, but also be able to install and launch the game.

@0neGal 0neGal changed the title Linux "Launch" support feat: Linux "Launch" support Feb 12, 2022
@0neGal
Copy link
Owner Author

0neGal commented Feb 28, 2022

As I've mentioned before, the kind of user who uses Linux will most likely not only understand what the game path is, but also be able to install and launch the game.

With the release of the SteamDeck this no longer really holds true, however I still believe we shouldn't mess with people's libraries, and instead just let people launch the game through Viper, which'll also ensure the game/NS stays up-to-date.

@0neGal 0neGal linked a pull request Apr 20, 2022 that will close this issue
12 tasks
@GeckoEidechse
Copy link
Contributor

So there's been some interesting new info in regards to Linux launch stuff on Steam. Next to -northstar there also exists run_northstar.txt as an option that works similar in a similar. Basically again the wsock32.dll from Northstar that overwrites the game one, checks for run_northstar.txt and if the file has a single 1 in it launches Northstar, a single 0 would launch vanilla.
R2Northstar/NorthstarDocs#93

With that is has been found that using WINEDLLOVERRIDES we can get Northstar to launch on Linux via WINEDLLOVERRIDES="wsock32=n,b" %command% -northstar as launch arguments on Steam.
(it's not clear yet whether -northstar is actually needed here)
R2Northstar/Northstar#291 (comment)

So this is the closest we have to -northstar on Linux+Steam so far ^^

You still ofc need the right Proton version. We found that the issue with Northstar not working on Proton appears to be related to Proton specific patches as there no/less issues with Wine in regards to Northstar crashing on Linux.

@0neGal
Copy link
Owner Author

0neGal commented Jul 16, 2022

I was actually earlier today reinstalling the game, for various reasons, but mostly some issues with my prefix that made Origin refuse to startup, and considered also installing the Steam version, I guess I'll do that so I can finally get this PR merged...

As for the Proton version, it may just be easiest to make a drop-down of all the versions that are found, and let it be up to the user, having to find what versions wokr and what don't seems like constant upkeep :p

However perhaps note that figuring out the right version could be done through ProtonDB or the Linux channel on the NS Discord...

@GeckoEidechse
Copy link
Contributor

However perhaps note that figuring out the right version could be done through ProtonDB or the Linux channel on the NS Discord...

Through trial and error we basically found that Proton-7.3-GE-1 (not GE-Proton7-3) seems to working for the was majority of players on Linux with Steam

@GeckoEidechse
Copy link
Contributor

Also just tested and WINEDLLOVERRIDES="wsock32=n,b" %command% even works on SteamDeck :D

@0neGal
Copy link
Owner Author

0neGal commented Jul 16, 2022

I would want to avoid installing GE versions through Viper, the note about this version can be added, but again, it seems like constant upkeep, for every single time a better more stable version is found.

But I'm not sure if there's a better solution...

@GeckoEidechse
Copy link
Contributor

Well technically that Proton GE version was the only one recommended one so far :P

But yeah, best solution would be to just have either Northstar patched to work on current Proton (we need someone to investigate the cause of error first, so far no one was willing to look into it) or hope that Proton patches the stuff where we break and Valve make it the new default on Steam (takes time).
I don't expect Viper to handle installing custom Proton version and all ^^

@Jan200101
Copy link
Contributor

Posting this information here so its kept track of

  • Using Proton's Wine is expected to be wrapped and after 5.13 to be containerized. Running manually is unsupported and considered broken.

RUNNING NON-STEAM GAMES WITH PROTON IS NOT SUPPORTED. DO NOT ASK FOR HELP WITH THIS.

proton runs in a container, which uses a runtime environment and libraries specifically built for use within that container. Not running it as intended results in the container and therefore its runtime not being used, and severely breaks library compatibility. It causes wine to search for libraries on your system instead of those it was built with/intended for within proton. It may work, if enough libraries match, but it is not correct and not supportable due to library differences across distros.

- GloriousEggroll (2021)

  • NorthstarProton is the most reliable Proton version for Northstar and endorsed by NorthStar, but is not expected to work standalone or in Lutris.
  • Hijacking existing prefixes will only result in confused tooling and potentially broken prefixes.
  • Steam can be invoked via the Steam Browser Protocol or commandline flags to Launch Titanfall with any arguments.
  • Lutris can output a script to run a game like it does (complete with Lutris Runtime setup).

@GeckoEidechse
Copy link
Contributor

Steam can be invoked via the Steam Browser Protocol or commandline flags to Launch Titanfall with any arguments.

This is probably the lowest hanging fruit solution and something I'm also planning to do in FlightCore. Basically just setup the user's Steam install of Titanfall2 to work with Northstar (add run_northstar.txt, install NorthstarProton) and then invoke Northstar by running Titanfall2 via Steam. (Not sure if -northstar works yet on Linux, if it does, run_northstar.txt shouldn't be needed).

I'm honestly even fine with "officially" just supporting Steam version of Titanfall2 on Linux. IIRC most Linux related tickets we got on the Northstar Discord are with issues when using Lutris. Having to deal with the varieties of Linux distros can be a pain and Steam helps a lot in standardising things a bit ^^

@0neGal
Copy link
Owner Author

0neGal commented Feb 1, 2023

The solution I'll end up at is likely giving the user these options:

  1. Invoke steam
  2. Run a script/executable/command
  3. Give a prefix and wine executable

And then the invoke Steam by default, and optionally ask whether the user wants to download NorthstarProton on top of that, and so forth.

Personally I would never use the Steam method myself, and I'd likely want to resort to a command or manually setting the prefix.

And manually selecting the prefix etc should have a warning that it may break prefixes or work incorrectly.

Feedback on that stance/way of doing it, is very welcome!

@0neGal 0neGal mentioned this issue Feb 7, 2023
12 tasks
@0neGal 0neGal unpinned this issue Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants