Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ Cross-platform version of XIVLauncher, optimized for Steam Deck. Comes with a ve
## Using on Steam Deck
If you want to use XIVLauncher on your Steam Deck, feel free to [follow our guide in our FAQ](https://goatcorp.github.io/faq/steamdeck). If you're having trouble, you can [join our Discord server](https://discord.gg/3NMcUV5) - please don't use the GitHub issues for troubleshooting unless you're sure that your problem is an actual issue with XIVLauncher.

## Environment Variables for troubleshooting
| Variable | Description |
| ------------- | -------------- |
| `XL_USERDIR` | Set to an alternate path to override the default `~/.xlcore` config path. For example, `XL_USERDIR=~/.local/share/xlcore`. This will try to create the path if it does not exist, so be careful.
| `XL_SECRET_PROVIDER` | Set to `file` if using the Steam Deck or other desktop session that doesn't have a secret provider. Set to `none` to disable secret provider. |
Copy link
Member

Choose a reason for hiding this comment

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

Might wanna remove the -RB from the readme here

| `XL_DECK` | Force XIVLauncher to pretend it's Steam Deck. Does not enable the Steam keyboard. |
| `XL_GAMEMODE` | Forces XIVLauncher to pretend it's in Steam Deck Game Mode. Also does not enable the Steam keyboard. |
| `XL_USE_STEAM` | Set to 0 or 1 to enable or disable steam API checks. |
| `XL_APPID` | Set to a steam AppID number to hook that application instead of FFXIV or the free trial. Ignored when using XLM. |

## Building & Contributing
1. Clone this repository with submodules
2. Make sure you have a recent(.NET 6.0.400+) version of the .NET SDK installed
Expand Down
23 changes: 21 additions & 2 deletions src/XIVLauncher.Core/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,27 @@ private static DalamudUpdater CreateDalamudUpdater()
private static void Main(string[] args)
{
mainArgs = args;
storage = new Storage(APP_NAME);

bool badxlpath = false;
var badxlpathex = new Exception();
string? useAltPath = Environment.GetEnvironmentVariable("XL_USERDIR");
try
{
storage = new Storage(APP_NAME, useAltPath);
}
catch (Exception e)
{
storage = new Storage(APP_NAME);
badxlpath = true;
badxlpathex = e;
}

SetupLogging(mainArgs);

if (badxlpath)
{
Log.Error(badxlpathex, $"Bad value for XL_PATH: {useAltPath}. Using ~/.xlcore instead.");
}

if (CoreEnvironmentSettings.ClearAll)
{
Expand All @@ -189,7 +209,6 @@ private static void Main(string[] args)
if (CoreEnvironmentSettings.ClearLogs) ClearLogs();
}

SetupLogging(mainArgs);
LoadConfig(storage);

Secrets = GetSecretProvider(storage);
Expand Down
Loading