-
Notifications
You must be signed in to change notification settings - Fork 42
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
Steam Compatibility Tool installer #99
Conversation
Cleaned up Steam Tool Settings Tab Added command line install options: --deck-install, --deck-remove to install to default paths --install=/path/to/Steam, --remove= to specify path
Apologies for letting this languish, as well as your other PRs. Is this/the other PRs still good to go? Anything you'd like to change? |
I need to test two changes before this can be merged. Should have it done in the next 24 hours. Edit: At the moment, this will trigger the stuttering bug unless LD_PRELOAD= is set in the steam launch arguments. I am testing a fix which seems to work. |
Assuming we want to move forward with this, I would like to advocate that we encourage the player install the game to wherever Steam wants to install it (that is, the game install should be next to the Steam-downloaded launcher files). At least in my experience, all the normal issues that come with the launcher on SD card no longer exist when a compatibility tool is used. Users would be able to install FFXIV fully to the SD card and experience a normal play environment, and net us the added benefit of users being able to easily uninstall FFXIV to free up space without manually editing directories. I'm not sure how possible/valuable it would be to attempt to get XLCore to also use the "standard" paths for everything, but it would be nice if the user could swap back to standard Proton at will and keep their save files/game configurations. Env vars on my test system:
|
What is the IgnoreChildProcess? Any documentation on that? |
Unsure - I brought it in as a synced var from |
Alright, this should be ready to go. Problem I was troubleshooting turned out to be elsewhere. |
Is it possible to hide the non-Steam Deck buttons on the Steam Deck? |
Absolutely. I've done that. Also, the flatpak install option will be hidden if flatpak steam settings folder is not detected. There's no quick and easy path to check to find out if flatpak steam is installed. The best I could figure is actually |
Flatpak test build: https://github.com/rankynbass/XIVLauncher.Core/releases/tag/steamtool-1 |
Code looks good to me. Can someone try that test build? If it's alright, I'll merge it |
"\nuninstall button."); | ||
return; | ||
} | ||
ImGui.Text("\nUse this tab to install XIVLauncher.Core as a Steam compatibility tool."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be a good idea to have the opening explain quickly what a "steam tool" is and why a user might want to use it. (We could also do this in the FaQ or link to an explainer elsewhere?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mostly just have some phrasing adjustments that I think make sense, feel free to not use my wording if you think it doesn't make sense though.
I do however have reservations about how we implement this as having users to manually update the steam compat tool every time we update the flatpak feels like a recipe for having users just never update the launcher which is going to be a headache. If we can solve that problem I'm happy to continue.
I'd also like if the flatpak and native steam options were condensed into singular option with buttons underneath the path for the default locations of native steam and flatpak steam. Do people use both together?
} | ||
if (!steamToolInstalled) ImGui.EndDisabled(); | ||
|
||
if (CoreEnvironmentSettings.IsDeck != true && steamFlatpakInstalled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (CoreEnvironmentSettings.IsDeck != true && steamFlatpakInstalled) | |
if (!CoreEnvironmentSettings.IsDeck && steamFlatpakInstalled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I made a mistake here. This should be !Program.IsSteamDeckHardware
. CoreEnvironmentSettings is just checking environment variables.
{ | ||
Entries = new SettingsEntry[] | ||
{ | ||
steamPath = new SettingsEntry<string>("Steam Path (native install)", "Path to the native steam config files. Only change this if you have your steam config stored somewhere else.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
steamPath = new SettingsEntry<string>("Steam Path (native install)", "Path to the native steam config files. Only change this if you have your steam config stored somewhere else.", | |
steamPath = new SettingsEntry<string>("Steam Path (native)", "Path to the native steam installation. Only change this if you have steam installed in a non-default location.", |
{ | ||
steamPath = new SettingsEntry<string>("Steam Path (native install)", "Path to the native steam config files. Only change this if you have your steam config stored somewhere else.", | ||
() => Program.Config.SteamPath ?? Path.Combine(CoreEnvironmentSettings.HOME, ".local", "share", "Steam"), s => Program.Config.SteamPath = s), | ||
steamFlatpakPath = new SettingsEntry<string>("Steam Path (flatpak install)", "Path to the flatpak steam config files. Only change this if you have your steam config stored somewhere else.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
steamFlatpakPath = new SettingsEntry<string>("Steam Path (flatpak install)", "Path to the flatpak steam config files. Only change this if you have your steam config stored somewhere else.", | |
steamFlatpakPath = new SettingsEntry<string>("Steam Path (flatpak)", "Path to the flatpak steam installation. Only change this if you have your flatpak steam installed in a non-default location.", |
|
||
public override SettingsEntry[] Entries { get; } | ||
|
||
public override bool IsUnixExclusive => true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I'm aware steam compatibility tools are Linux exclusive and this property only hides this page from Windows users. We don't actually release on Mac at all right now but I still wanna point this out.
ImGui.Text("If you are trying to upgrade, you must first update your local install of XIVLauncher.Core. Then launch the local" + | ||
"\nversion, navigate back to this tab, and re-install as a Steam compatibility tool."); | ||
ImGui.Text("\nIf you are trying to uninstall, you should likewise launch the native version of XIVLauncher, and click the appropriate" + | ||
"\nuninstall button."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way for us to do these updates on behalf on the end user instead of having them update the tool manually every time XIVLauncher updates? If we know they want the steam tool installed via a config field like wantsSteamTool
then we can transparently update it on their behalf on launch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least in my experimental config on Steam Deck, XLCore launched through the flatpak
command works just fine. I'm curious if we can generate the script accordingly. We can probably both check for XIVLauncher.Core
in $PATH
and try to launch via Flatpak if the binary does not exist where we expect it to.
I'm not immediately aware of downsides to allowing $PATH
to resolve xlcore nor attempting a Flatpak run, but admittedly my own scope here is pretty narrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only issue I see with calling the flatpak is that the flatpak version of steam is not able to do that easily unless it has flatpak-spawn --host
privilege iirc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually possible to download a tar.gz file and overwrite the steam tool in place, although you have to restart both the launcher and steam for some changes to take effect. I've successfully done this when I explored steam tool possibility back around 1.0.4. That would leave the flatpak or native install un-updated, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhals we could distribute a small installer script that installs XL as a compatibility tool and then having it auto update itself, skipping the Flatpak?
ImGui.Text("\nAfter you have installed XIVLauncher as a Steam tool, close this program, and launch Steam. Select Final Fantasy XIV from the library,"); | ||
ImGui.Text("and go to Compatibility. Force the use of a specific Steam Play compatibility tool, and choose XIVLauncher.Core as Compatibility Tool."); | ||
ImGui.Text("XIVLauncher.Core will now be used to launch Final Fantasy XIV."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to reword this to be a little more explicit for users that may get confused why it doesn't show up in the list, or cannot find the compatibility tab.
ImGui.Text("\nAfter you have installed XIVLauncher as a Steam tool, close this program, and launch Steam. Select Final Fantasy XIV from the library,"); | |
ImGui.Text("and go to Compatibility. Force the use of a specific Steam Play compatibility tool, and choose XIVLauncher.Core as Compatibility Tool."); | |
ImGui.Text("XIVLauncher.Core will now be used to launch Final Fantasy XIV."); | |
ImGui.Text("\nAfter you have installed XIVLauncher as a Steam compatibility tool please close XIVLauncher and launch or restart Steam. Find 'Final Fantasy XIV Online' in your steam library"); | |
ImGui.Text("and open the 'Properties' menu and navigate to the 'Compatibility' tab. Enable 'Force the use of a specific Steam Play compatibility tool' and from the dropdown menu select 'XIVLauncher.Core'. If this option does not show up then restart Steam and try again."); | |
ImGui.Text("After finishing these steps, XIVLauncher will now be used when launching FINAL FANTASY XIV from steam."); |
ImGui.Text("XIVLauncher.Core will now be used to launch Final Fantasy XIV."); | ||
if (CoreEnvironmentSettings.IsDeck != true && steamFlatpakInstalled) | ||
{ | ||
ImGui.Text("\nIf you wish to install into Flatpak Steam, you must use Flatseal to give XIVLauncher access to Steam's flatpak path. This is probably something like:"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ImGui.Text("\nIf you wish to install into Flatpak Steam, you must use Flatseal to give XIVLauncher access to Steam's flatpak path. This is probably something like:"); | |
ImGui.Text("\nIf you wish to install into Flatpak Steam, you must use Flatseal to give XIVLauncher access to Steam's flatpak path. This is commonly found at:"); |
if (CoreEnvironmentSettings.IsDeck != true && steamFlatpakInstalled) | ||
{ | ||
ImGui.Text("\nIf you wish to install into Flatpak Steam, you must use Flatseal to give XIVLauncher access to Steam's flatpak path. This is probably something like:"); | ||
ImGui.Text($"{CoreEnvironmentSettings.HOME}/.var/app/com.valvesoftware.Steam. If you do not give this permission, installation will fail. You will probably also want to"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ImGui.Text($"{CoreEnvironmentSettings.HOME}/.var/app/com.valvesoftware.Steam. If you do not give this permission, installation will fail. You will probably also want to"); | |
ImGui.Text($"{CoreEnvironmentSettings.HOME}/.var/app/com.valvesoftware.Steam. If you do not give this permission, installation will fail. You will also want to"); |
// File.SetUnixFileMode() doesn't exist, for some reason, so just run chmod | ||
var psi = new ProcessStartInfo("/bin/chmod"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very strange that SetUnixFileMode isn't available here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not available in dotnet 6. We can switch to it if we upgrade to 8. https://learn.microsoft.com/en-us/dotnet/api/system.io.file.setunixfilemode?view=net-8.0. You can see in the Applies To section that it's for 7 and later.
Added the rewording suggestions, and fixed the deck check to use the correct variable. |
Okay, I think this is the best state I can get this in without building a newer version of Facepunch Steamworks with Floating Keyboard. Steam input works fine in Gaming Mode, and external keyboard entry works fine in desktop mode. Desktop with Big Picture Mode steam functions like Gaming Mode, but clunky. External keyboard is (probably) needed to edit launcher text boxes in desktop mode, but I'm not 100% sure of that, since I'm using an AMD mini-pc with HoloIso instead of an actual steam deck. The steam deck may be able to bring up a software keyboard in places HoloIso can't. |
Tested Floating Keyboard after it was added to XL.Common, and unfortunately it doesn't really work in desktop mode. It's actually possible to get it to pop up, but only if using gamescope (why? who knows). Even then, it doesn't actually function. However, I was able to install CoreKeyboard from the Discover store, and it did work, so it should now be possible to use the compatibility tool in desktop mode as long as CoreKeyboard or some other software keyboard, or an external keyboard, is installed. |
src/XIVLauncher.Core/Components/SettingsPage/Tabs/SettingsTabSteamTool.cs
Outdated
Show resolved
Hide resolved
There are two problems with this as it stands: aria2c won't work on slightly older linux versions and libsecret might have a similar problem. Most of this is because the flatpak now uses 23.08 instead of 22.08, with a newer version of glibc. I've started working on static compiled aria2 binaries here: https://github.com/rankynbass/aria2-static-build. I'm not sure if the libsecret problem actually matters; the vast majority of linux distros come with libsecret already installed. |
The current state of XIVLauncher for steam deck is that if we use |
@electr0sheep please do not recommend people to use unsupported builds. Especially old ones. The SCT build you're linking to is from xlcore 1.0.8 and predates fixes needed for login, news handling, ffxivboot patches failing, and proper Dawntrail handling. |
@reiichi001 Wasn't my intention to recommend it. I'll delete the comment. Would like to get the ball rolling though, as it's frustrating to see the progress made with this PR, but the zombie process issue still persists. |
Poking my head in to see how this is going. With the flatpack changes locking out the old workarounds, restarting steam to reset things is a bit frustrating. If I can be of any help with testing, I have a Steam Deck and am willing to test builds and things, like the keyboard issues mentioned above. |
I think? we're somewhat moving to do this as an independent tool now as integrating it into the launcher required the compatibility tool to be updated manually every time the launcher was updated. I've created and been using XLM which is a compatibility tool that fixes the flatpak problems perfectly and i've been using it for a while now. I want it to become an official goatcorp repository when someone has the time to do that. |
I just gave it a go, following the steamdeck instructions. It went smoothly, worked with the current XIVLauncher settings, and shut down correctly. Thank you very much for a smooth solution. |
This has been implemented as a stand-alone program: https://github.com/Blooym/xlm |
Adds a tab in the settings menu to install as a steam compatibility tool. The tab also provides some basic instructions. Once the tool is installed and configured in FFXIV in steam, xlcore can be launched directly from the FFXIV steam entry. It is not inside a flatpak, so FFXIV will properly close.
There are two downsides that I can't work around.
Tab when launched as a Flatpak:
Tab when launched as a Steam compatibility tool:
Entry in Steam compatibility list: