Skip to content

Commit

Permalink
Launch wiki when Windows users select dev updates
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Mar 14, 2024
1 parent f24bf65 commit 220b99c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Cmdline/Action/Upgrade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ public int RunCommand(CKAN.GameInstance instance, object raw_options)
|| (!options.stable_release && (config.DevBuilds ?? false));
if (devBuild != config.DevBuilds)
{
if (!config.DevBuilds.HasValue && devBuild && Platform.IsWindows)
{
// Tell Windows users about malware scanner's false positives
// and how to disable it, if they feel safe doing it
Utilities.ProcessStartURL(HelpURLs.WindowsDevBuilds);
}
config.DevBuilds = devBuild;
user.RaiseMessage(
config.DevBuilds ?? false
Expand Down
1 change: 1 addition & 0 deletions Core/HelpURLs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public static class HelpURLs
public const string ModPacks = "https://github.com/KSP-CKAN/CKAN/wiki/Sharing-a-modlist-%28metapackages%29";
public const string AuthTokens = "https://github.com/KSP-CKAN/CKAN/wiki/Adding-a-GitHub-API-authtoken";
public const string CertificateErrors = "https://github.com/KSP-CKAN/CKAN/wiki/SSL-certificate-errors";
public const string WindowsDevBuilds = "https://github.com/KSP-CKAN/CKAN/wiki/Using-dev-builds-on-Windows";

public const string CloneFakeInstances = "https://github.com/KSP-CKAN/CKAN/pull/2627";
public const string DeleteDirectories = "https://github.com/KSP-CKAN/CKAN/pull/2962";
Expand Down
6 changes: 6 additions & 0 deletions GUI/Main/MainAutoUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ private void AutoUpdatePrompts(IConfiguration coreConfig,
coreConfig.DevBuilds = !YesNoDialog(Properties.Resources.MainReleasesOrDevBuildsPrompt,
Properties.Resources.MainReleasesOrDevBuildsYes,
Properties.Resources.MainReleasesOrDevBuildsNo);
if (coreConfig.DevBuilds.Value && Platform.IsWindows)
{
// Tell Windows users about malware scanner's false positives
// and how to disable it, if they feel safe doing it
Utilities.ProcessStartURL(HelpURLs.WindowsDevBuilds);
}
}
}

Expand Down

0 comments on commit 220b99c

Please sign in to comment.