reimplement linux+mac warnings

pull/9/head
Miepee 4 years ago
parent 3e8e91352d
commit 3cc9e9b02e

@ -250,28 +250,25 @@ public partial class ModPacker : Form
if (linuxCheckBox.Checked.Value)
{
/*
if (!File.Exists(tempModPath + "/" + runnerName))
{ //TODO: put this onto the outer method
var result = MessageBox.Show("Modded Linux game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxType.Warning);
if (result != DialogResult.Yes)
{
AbortPatch();
return (false, "");
}
var linuxZip = ZipFile.Open(linuxPath, ZipArchiveMode.Read);
if (linuxZip.Entries.Any(f => f.FullName != "AM2R") && linuxZip.Entries.Any(f => f.FullName != "runner"))
{
var result = MessageBox.Show("Modded Linux game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxType.Warning);
if (result != DialogResult.Yes)
{
AbortPatch();
return;
}
}
if (File.Exists(tempModPath + "profile.xml"))
{
//TODO: put this onto the outer method
/* var result = MessageBox.Show("profile.xml found. This file is used by the AM2RLauncher to determine profile stats and its inclusion may make the profile uninstallable. Are you sure you want to continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxType.Warning);
if (result != DialogResult.Yes)
if (linuxZip.Entries.Any(f => f.Name == "profile.xml"))
{
AbortPatch();
return (false, "");
var result = MessageBox.Show("profile.xml found. This file is used by the AM2RLauncher to determine profile stats and its inclusion may make the profile uninstallable. Are you sure you want to continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxType.Warning); if (result != DialogResult.Yes)
{
AbortPatch();
return;
}
}
}*/
using (var saveFile = new SaveFileDialog { Title = "Save Linux mod profile", Filters = { zipFileFilter } })
{
@ -293,19 +290,20 @@ public partial class ModPacker : Form
}
if (macCheckBox.Checked.Value)
{
/*if (!File.Exists(tempModPath + "/AM2R.app/Contents/MacOS/Mac_Runner"))
var macZip = ZipFile.Open(macPath, ZipArchiveMode.Read);
if (macZip.Entries.All(f => f.Name != "AM2R.app/Contents/MacOS/Mac_Runner"))
{
var result = MessageBox.Show("Modded Mac game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
var result = MessageBox.Show("Modded Mac game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxType.Warning);
if (result != DialogResult.Yes)
AbortPatch();
}
if (File.Exists(tempModPath + "profile.xml"))
if (macZip.Entries.Any(f => f.Name == "profile.xml"))
{
/*var result = MessageBox.Show("profile.xml found. This file is used by the AM2RLauncher to determine profile stats and its inclusion may make the profile uninstallable. Are you sure you want to continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (result != DialogResult.Yes)
AbortPatch();
}*/
var result = MessageBox.Show("profile.xml found. This file is used by the AM2RLauncher to determine profile stats and its inclusion may make the profile uninstallable. Are you sure you want to continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxType.Warning);
if (result != DialogResult.Yes)
AbortPatch();
}
using (SaveFileDialog saveFile = new SaveFileDialog { Title = "Save Mac mod profile", Filters = { zipFileFilter } })
{

Loading…
Cancel
Save