From b4b15bd46d71b7404164495d432f78ad08efeadc Mon Sep 17 00:00:00 2001 From: Miepee Date: Wed, 18 Jan 2023 15:42:21 +0100 Subject: [PATCH] add todos --- AM2RPortHelperCLI/Program.cs | 13 +++++++------ AM2RPortHelperGUI/AM2RPortHelperGUI/MainForm.cs | 7 ++++--- AM2RPortHelperLib/{RawModsBase.cs => RawMods.cs} | 4 +++- 3 files changed, 14 insertions(+), 10 deletions(-) rename AM2RPortHelperLib/{RawModsBase.cs => RawMods.cs} (99%) diff --git a/AM2RPortHelperCLI/Program.cs b/AM2RPortHelperCLI/Program.cs index 7200187..24bdcae 100644 --- a/AM2RPortHelperCLI/Program.cs +++ b/AM2RPortHelperCLI/Program.cs @@ -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(new[] { "-i", "--interactive" }, "Use an interactive mode. This will ignore all other options."); var fileOption = new Option(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!"); diff --git a/AM2RPortHelperGUI/AM2RPortHelperGUI/MainForm.cs b/AM2RPortHelperGUI/AM2RPortHelperGUI/MainForm.cs index 0c3d766..d76ffb8 100644 --- a/AM2RPortHelperGUI/AM2RPortHelperGUI/MainForm.cs +++ b/AM2RPortHelperGUI/AM2RPortHelperGUI/MainForm.cs @@ -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!"; diff --git a/AM2RPortHelperLib/RawModsBase.cs b/AM2RPortHelperLib/RawMods.cs similarity index 99% rename from AM2RPortHelperLib/RawModsBase.cs rename to AM2RPortHelperLib/RawMods.cs index 91c571d..95f72a5 100644 --- a/AM2RPortHelperLib/RawModsBase.cs +++ b/AM2RPortHelperLib/RawMods.cs @@ -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 + /// /// Determines for which OS a raw mod zip was made for. ///