mirror of
https://github.com/LBPUnion/UnionPatcher.git
synced 2025-07-31 05:08:41 +00:00
macOS Hotfix: Require staging directory (#31)
* macOS: Require staging directory * Grammar
This commit is contained in:
parent
58d9dd3a67
commit
47af7d6929
1 changed files with 22 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using Eto.Drawing;
|
using Eto.Drawing;
|
||||||
using Eto.Forms;
|
using Eto.Forms;
|
||||||
|
|
||||||
|
@ -26,7 +27,24 @@ public class ModeSelectionForm : Form {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openRemotePatcher(object sender, EventArgs e) {
|
private void openRemotePatcher(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (OSUtil.GetPlatform() == OSPlatform.OSX)
|
||||||
|
{
|
||||||
|
Gui.CreateOkDialog("Workaround", "UnionPatcher RemotePatcher requires a staging folder on macOS, please set this to the directory of the UnionPatcher app!");
|
||||||
|
SelectFolderDialog dialog = new SelectFolderDialog();
|
||||||
|
if (dialog.ShowDialog(this) != DialogResult.Ok)
|
||||||
|
{
|
||||||
|
Gui.CreateOkDialog("Workaround", "User did not specify a staging folder, aborting!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
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!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
RemotePatchForm rpForm = new RemotePatchForm();
|
RemotePatchForm rpForm = new RemotePatchForm();
|
||||||
rpForm.Show();
|
rpForm.Show();
|
||||||
rpForm.Closed += OnSubFormClose;
|
rpForm.Closed += OnSubFormClose;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue