mac
Miepee 3 years ago
parent abce96ffca
commit b4b15bd46d

@ -16,6 +16,7 @@ internal static class Program
private static int Main(string[] args)
{
//LauncherMods.PortLauncherMod("/home/narr/Downloads/UnofficialMultitroidAPKTest1_6b.zip", Core.ModOS.Linux, true, "./foo.zip");
//TODO: add options to icon file paths
var interactiveOption = new Option<bool>(new[] { "-i", "--interactive" }, "Use an interactive mode. This will ignore all other options.");
var fileOption = new Option<FileInfo>(new[] { "-f", "--file" }, "The file path to the raw mod that should be ported. *REQUIRED IN NON-INTERACTIVE*");
@ -64,16 +65,16 @@ internal static class Program
if (linuxPath is not null)
{
RawModsBase.PortToLinux(inputModPath.FullName, linuxPath.FullName, beVerbose ? OutputHandlerDelegate : null);
RawMods.PortToLinux(inputModPath.FullName, linuxPath.FullName, beVerbose ? OutputHandlerDelegate : null);
}
if (androidPath is not null)
{
RawModsBase.PortToAndroid(inputModPath.FullName, androidPath.FullName,
RawMods.PortToAndroid(inputModPath.FullName, androidPath.FullName,
useCustomSave, usesInternet, beVerbose ? OutputHandlerDelegate : null);
}
if (macPath is not null)
{
RawModsBase.PortToMac(inputModPath.FullName, macPath.FullName, beVerbose ? OutputHandlerDelegate : null);
RawMods.PortToMac(inputModPath.FullName, macPath.FullName, beVerbose ? OutputHandlerDelegate : null);
}
if (beVerbose)
Console.WriteLine("Done.");
@ -142,7 +143,7 @@ internal static class Program
if (File.Exists(linuxPath))
File.Delete(linuxPath);
RawModsBase.PortToLinux(modZipPath, linuxPath, OutputHandlerDelegate);
RawMods.PortToLinux(modZipPath, linuxPath, OutputHandlerDelegate);
}
if (androidSelected)
@ -181,14 +182,14 @@ internal static class Program
}
while (customSaveSelected == null);
RawModsBase.PortToAndroid(modZipPath, androidPath, customSaveSelected.Value, customSaveSelected.Value, OutputHandlerDelegate);
RawMods.PortToAndroid(modZipPath, androidPath, customSaveSelected.Value, customSaveSelected.Value, OutputHandlerDelegate);
}
if (macSelected)
{
if (File.Exists(macPath))
File.Delete(macPath);
RawModsBase.PortToMac(modZipPath, macPath, OutputHandlerDelegate);
RawMods.PortToMac(modZipPath, macPath, OutputHandlerDelegate);
}
Console.WriteLine("Successfully finished!");

@ -11,6 +11,7 @@ namespace AM2RPortHelperGUI;
public partial class MainForm : Form
{
// TODO: present icons so user can edit them
public MainForm()
{
Title = $"AM2RPortHelper - v{Core.Version}";
@ -101,7 +102,7 @@ public partial class MainForm : Form
if (File.Exists(linuxPath))
File.Delete(linuxPath);
await Task.Run(() => RawModsBase.PortToLinux(modZipPath, linuxPath, OutputHandlerDelegate));
await Task.Run(() => RawMods.PortToLinux(modZipPath, linuxPath, OutputHandlerDelegate));
}
if (checkboxAndroid.Checked.Value)
{
@ -110,7 +111,7 @@ public partial class MainForm : Form
bool useCustomSave = checkboxUseCustomSave.Checked.Value;
bool useInternet = checkboxAndroidRequiresInternet.Checked.Value;
await Task.Run(() => RawModsBase.PortToAndroid(modZipPath, androidPath, useCustomSave, useInternet, OutputHandlerDelegate));
await Task.Run(() => RawMods.PortToAndroid(modZipPath, androidPath, useCustomSave, useInternet, OutputHandlerDelegate));
}
if (checkboxMac.Checked.Value)
{
@ -118,7 +119,7 @@ public partial class MainForm : Form
File.Delete(macPath);
string modName = checkboxUseCustomSave.Text;
await Task.Run(() => RawModsBase.PortToMac(modZipPath, macPath, OutputHandlerDelegate));
await Task.Run(() => RawMods.PortToMac(modZipPath, macPath, OutputHandlerDelegate));
}
labelProgress.Text = "Done!";

@ -9,11 +9,13 @@ using static AM2RPortHelperLib.Core;
namespace AM2RPortHelperLib;
public abstract class RawModsBase : ModsBase
public abstract class RawMods : ModsBase
{
// For completionist sake, it should be possible to also port raw APKs to win/lin/mac
// But until some person actually shows up that needs this feature, I'm too lazy to implement it
// TODO: These methods should accept paths for icons/splashes
/// <summary>
/// Determines for which OS a raw mod zip was made for.
/// </summary>
Loading…
Cancel
Save