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

Allow silent launch via environment variable #1501

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
1 change: 1 addition & 0 deletions src/XIVLauncher.Common/EnvironmentSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public static class EnvironmentSettings
public static bool IsNoRunas => CheckEnvBool("XL_NO_RUNAS");
public static bool IsIgnoreSpaceRequirements => CheckEnvBool("XL_NO_SPACE_REQUIREMENTS");
public static bool IsOpenSteamMinimal => CheckEnvBool("XL_OPEN_STEAM_MINIMAL");
public static bool IsSilent => CheckEnvBool("XL_SILENT");
private static bool CheckEnvBool(string var) => bool.Parse(System.Environment.GetEnvironmentVariable(var) ?? "false");
}
}
9 changes: 8 additions & 1 deletion src/XIVLauncher/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,14 @@ private void App_OnStartup(object sender, StartupEventArgs e)
Log.Information("Starting update check...");

_updateWindow = new UpdateLoadingDialog();
_updateWindow.Show();
if (!EnvironmentSettings.IsSilent)
{
_updateWindow.Show();
}
else
{
App.Settings.AutologinEnabled = true
}

var updateMgr = new Updates();
updateMgr.OnUpdateCheckFinished += OnUpdateCheckFinished;
Expand Down