Special workaround v1

This commit is contained in:
Dagg 2023-03-10 10:41:43 -08:00
parent 480abb2b58
commit b4f6c21c88
No known key found for this signature in database
GPG key ID: 35F1082DE618E967

View file

@ -30,9 +30,12 @@ public class ModeSelectionForm : Form {
private void openRemotePatcher(object sender, EventArgs e) private void openRemotePatcher(object sender, EventArgs e)
{ {
OSPlatform platform = OSUtil.GetPlatform(); OSPlatform platform = OSUtil.GetPlatform();
if (platform == OSPlatform.OSX || platform == OSPlatform.Windows) if (!Directory.Exists("scetool"))
{ {
Gui.CreateOkDialog("Workaround", "UnionPatcher RemotePatcher requires a staging folder on macOS, please set this to the directory of the UnionPatcher app!"); // This will always occur on macOS, so don't show this message for macOS users.
if (platform != OSPlatform.OSX) Gui.CreateOkDialog("Workaround Triggered", ".NET could not locate the required files, triggering workaround.");
Gui.CreateOkDialog("Workaround", "UnionPatcher RemotePatcher requires a staging folder on macOS or in special circumstances on Windows, please set this to the directory of the UnionPatcher app or executable!");
SelectFolderDialog dialog = new SelectFolderDialog(); SelectFolderDialog dialog = new SelectFolderDialog();
if (dialog.ShowDialog(this) != DialogResult.Ok) if (dialog.ShowDialog(this) != DialogResult.Ok)
{ {
@ -42,7 +45,7 @@ public class ModeSelectionForm : Form {
Directory.SetCurrentDirectory(dialog.Directory); Directory.SetCurrentDirectory(dialog.Directory);
if (!Directory.Exists("scetool")) if (!Directory.Exists("scetool"))
{ {
Gui.CreateOkDialog("Workaround", "Invalid folder, remember to set the folder to the directory of the UnionPatcher app!"); Gui.CreateOkDialog("Workaround", "Invalid folder, remember to set the folder to the directory of the UnionPatcher app or executable!");
return; return;
} }
} }