mac
Miepee 3 years ago
parent abce96ffca
commit b4b15bd46d

@ -16,6 +16,7 @@ internal static class Program
private static int Main(string[] args) private static int Main(string[] args)
{ {
//LauncherMods.PortLauncherMod("/home/narr/Downloads/UnofficialMultitroidAPKTest1_6b.zip", Core.ModOS.Linux, true, "./foo.zip"); //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 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*"); 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) 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) if (androidPath is not null)
{ {
RawModsBase.PortToAndroid(inputModPath.FullName, androidPath.FullName, RawMods.PortToAndroid(inputModPath.FullName, androidPath.FullName,
useCustomSave, usesInternet, beVerbose ? OutputHandlerDelegate : null); useCustomSave, usesInternet, beVerbose ? OutputHandlerDelegate : null);
} }
if (macPath is not 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) if (beVerbose)
Console.WriteLine("Done."); Console.WriteLine("Done.");
@ -142,7 +143,7 @@ internal static class Program
if (File.Exists(linuxPath)) if (File.Exists(linuxPath))
File.Delete(linuxPath); File.Delete(linuxPath);
RawModsBase.PortToLinux(modZipPath, linuxPath, OutputHandlerDelegate); RawMods.PortToLinux(modZipPath, linuxPath, OutputHandlerDelegate);
} }
if (androidSelected) if (androidSelected)
@ -181,14 +182,14 @@ internal static class Program
} }
while (customSaveSelected == null); while (customSaveSelected == null);
RawModsBase.PortToAndroid(modZipPath, androidPath, customSaveSelected.Value, customSaveSelected.Value, OutputHandlerDelegate); RawMods.PortToAndroid(modZipPath, androidPath, customSaveSelected.Value, customSaveSelected.Value, OutputHandlerDelegate);
} }
if (macSelected) if (macSelected)
{ {
if (File.Exists(macPath)) if (File.Exists(macPath))
File.Delete(macPath); File.Delete(macPath);
RawModsBase.PortToMac(modZipPath, macPath, OutputHandlerDelegate); RawMods.PortToMac(modZipPath, macPath, OutputHandlerDelegate);
} }
Console.WriteLine("Successfully finished!"); Console.WriteLine("Successfully finished!");

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

@ -9,11 +9,13 @@ using static AM2RPortHelperLib.Core;
namespace AM2RPortHelperLib; 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 // 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 // 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> /// <summary>
/// Determines for which OS a raw mod zip was made for. /// Determines for which OS a raw mod zip was made for.
/// </summary> /// </summary>
Loading…
Cancel
Save