From 7b88e278432671a3e08ea42709bb7d3e1f3e64c3 Mon Sep 17 00:00:00 2001 From: Dagg Date: Sat, 18 Mar 2023 21:38:21 -0700 Subject: [PATCH] Require staging directory as fallback (#34) * Test requiring staging directory on Windows * Special workaround v1 * Remove variable since its only used once --- UnionPatcher.Gui/Forms/ModeSelectionForm.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/UnionPatcher.Gui/Forms/ModeSelectionForm.cs b/UnionPatcher.Gui/Forms/ModeSelectionForm.cs index d23fdbd..ce45984 100644 --- a/UnionPatcher.Gui/Forms/ModeSelectionForm.cs +++ b/UnionPatcher.Gui/Forms/ModeSelectionForm.cs @@ -29,9 +29,12 @@ public ModeSelectionForm() { private void openRemotePatcher(object sender, EventArgs e) { - if (OSUtil.GetPlatform() == OSPlatform.OSX) + 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 (OSUtil.GetPlatform() != 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(); if (dialog.ShowDialog(this) != DialogResult.Ok) { @@ -41,7 +44,7 @@ private void openRemotePatcher(object sender, EventArgs e) Directory.SetCurrentDirectory(dialog.Directory); 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; } }