Readme improvements and newline fixes

pull/5/head
Miepee 4 years ago
parent dbd9aeb4c9
commit a9d374b3cd

@ -18,7 +18,6 @@ namespace AM2RPortHelper
private static void Main(string[] args)
{
Console.WriteLine("AM2RPortHelper v" + version);
if (args == null || args.Length == 0)
@ -51,8 +50,8 @@ namespace AM2RPortHelper
default: Console.WriteLine("Unacceptable input. Aborting..."); return;
}
Console.WriteLine("Successfully finished!");
Console.WriteLine("Exiting in 5 seconds...");
Thread.Sleep(5000);
Console.WriteLine("Exiting in 3 seconds...");
Thread.Sleep(3000);
}
private static void PortForLinux(FileInfo modZipPath)
@ -120,7 +119,6 @@ namespace AM2RPortHelper
string finalApkBuild = extractDirectory + "/build-aligned-debugSigned.apk";
string apkModPath = currentDir + "/" + Path.GetFileNameWithoutExtension(modZipPath.FullName) + "_ANDROID.apk";
// Check if temp folder exists, delete if yes, extract zip to there
if (Directory.Exists(extractDirectory))
Directory.Delete(extractDirectory, true);
@ -140,16 +138,13 @@ namespace AM2RPortHelper
p.Start();
p.WaitForExit();
// Move everything into assets folder
Console.WriteLine("Move into assets folder...");
foreach (var file in new DirectoryInfo(unzipDir).GetFiles())
file.MoveTo(apkAssetsDir + "/" + file.Name);
foreach (var dir in new DirectoryInfo(unzipDir).GetDirectories())
{
dir.MoveTo(apkAssetsDir + "/" + dir.Name);
}
// Delete unnecessary files, rename data.win, move in the new runner
Console.WriteLine("Delete unnecessary files and lowercase them...");
@ -346,11 +341,7 @@ namespace AM2RPortHelper
DirectoryInfo dir = new DirectoryInfo(sourceDirName);
if (!dir.Exists)
{
throw new DirectoryNotFoundException(
"Source directory does not exist or could not be found: "
+ sourceDirName);
}
throw new DirectoryNotFoundException($"Source directory does not exist or could not be found: {sourceDirName}");
DirectoryInfo[] dirs = dir.GetDirectories();
@ -365,7 +356,6 @@ namespace AM2RPortHelper
file.CopyTo(tempPath, true);
}
if (!copySubDirs)
return;

@ -1,13 +1,14 @@
# AM2RPortHelper
A simple tool to make porting Windows builds of AM2R-Mods to other platforms easier. This will *only* work with VM-mods of the Community Updates, neither YYC mods nor mods of the original 1.1 will work.
You need to have at least .NET Core 5 installed in order to run this.
A simple tool to make porting Windows builds of self-created AM2R-Mods to other platforms easier. This will *only* work with VM-mods of the Community Updates, neither YYC mods nor mods of the original 1.1 will work.
You need to have at least .NET Core 6 installed in order to run this.
## How do I use this?
Simply compress your mod as a zip, and then drag-n-drop it into this tool. After that, select if you want to have a port made for Linux or Android. A zip/apk that can be used for the [AM2RModPacker](https://github.com/Miepee/AM2RModpacker-Mac) will then be created into the directory next to the program.
First you need a zip of the self-created mod. If you're using GameMaker: Studio, you can just use the zip it created, if you're using UndertaleModTool you need to zip the files first (your files should not be in a subfolder in the zip!). After that, just drag-n-drop it into this tool and, select if you want to have a port made for Linux, Android or Mac.
It will then create a new zip/apk, which can be used for the [AM2RModPacker](https://github.com/AM2R-Community-Developers/AM2RModpacker-Mac), in the directory next to the program. For the Mac build, you need to use my ModPacker-Mac version which can be found [here](https://github.com/AM2R-Community-Developers/AM2RModpacker-Mac).
To create Android builds, you need to have Java installed.
By default, the ports will use stock splash and icon images. Replacing `icon.png`, `splash.png` and `splashAndroid.png` in the utils folder with your own is recommended.
By default, the ports will use stock splash and icon images. *It is recommended to replace `icon.png`, `splash.png` and `splashAndroid.png` in the `utils` folder with your own*.
## Porting notes
- Keep Game Maker: Studio documentation in mind, using any functions that only work on one OS or function differently on different OS could lead to the ports having unexpected behaviour or even crashing.

Loading…
Cancel
Save