//TODO: If icon paths are not set, these are currently not taken from the config dir!
varinteractiveOption=newOption<bool>(new[]{"-i","--interactive"},"Use an interactive mode. This will ignore all other options.");
varfileOption=newOption<FileInfo>(new[]{"-f","--file"},"The file path to the raw mod that should be ported. *REQUIRED IN NON-INTERACTIVE*");
varlinuxOption=newOption<FileInfo>(new[]{"-l","--linux"},"The output file path for the Linux mod. None given equals to no Linux port.");
varandroidOption=newOption<FileInfo>(new[]{"-a","--android"},"The output file path for the Android mod. None given equals to no Android port.");
varmacOption=newOption<FileInfo>(new[]{"-m","--mac"},"The output file path for the Mac mod. None given equals to no Mac port.");
varnameOption=newOption<bool>(new[]{"-s","--customsave"},"Whether the Android Port should use a custom save location. Has no effect on anything else.");
varinternetOption=newOption<bool>(new[]{"-w","--internet"},"Add internet usage permissions to the Android mod. Has no effect to other OS.");
variconOption=newOption<FileInfo>(new[]{"-c","--icon "},"The file path to an icon PNG that should be used for the taskbar/dock/home screen. "+
"If this is not set, it will read \"icon.png\" from the config folder. If that file does not exist, a stock icon will be used.");
varsplashOption=newOption<FileInfo>(new[]{"-p","--splash "},"The file path to a splash PNG that should be used when booting the game. "+
"If this is not set, it will read \"splash.png\" (or \"splashAndroid.png\" for Android) from the config folder. "+
"If that file does not exist, a stock splash will be used.");
// TODO: double check whether its not possible to have the same splash screen for both desktop and mobile
varcustomSaveOption=newOption<bool>(new[]{"-s","--customsave"},"Whether the Android Port should use a custom save location. Has no effect on other OS.");
varinternetOption=newOption<bool>(new[]{"-w","--internet"},"Add internet usage permissions to the Android mod. Has no effect on other OS.");
varverboseOption=newOption<bool>(new[]{"-v","--verbose"},"Whether to show verbose output.");
RootCommandrootCommand=newRootCommand("A utility to port Windows AM2R Mods to other operating systems.")
//recursively lowercase everything in the assets folder
HelperMethods.LowercaseFolder(assetsDir);
@ -148,7 +151,7 @@ public abstract class RawMods : ModsBase
// Clean up
Directory.Delete(TempDir,true);
}
/// <summary>
/// Ports a raw AM2R mod zip for Android.
/// </summary>
@ -156,10 +159,15 @@ public abstract class RawMods : ModsBase
/// <param name="outputRawApkPath">The path where the ported Android mod apk should be saved to.</param>
/// <param name="useCustomSaveDirectory">Whether the mod should use a custom save location on Android.</param>
/// <param name="usesInternet">Whether the mod needs an Internet connection.</param>
/// <param name="pathToIcon">The path to an icon PNG image that should be used on Android for i.e. the home screen.
/// If this is <see langword="null"/>, a default stock icon is used.</param>
/// <param name="pathToSplashScreen">The path to an splash PNG image that should be used on Android when starting the game.
/// If this is <see langword="null"/>, a default stock splash screen is used.</param>
/// <param name="outputDelegate">A delegate to post output info to.</param>
/// <exception cref="NotSupportedException">The raw mod zip was made for an OS that can't be determined.</exception>
/// <exception cref="InvalidDataException"><paramref name="useCustomSaveDirectory"/> was given, but the display name of the mod is unsuitable as a name for the directory.</exception>