|
|
|
@ -61,17 +61,17 @@ public static class Core
|
|
|
|
string newMD5 = CalculateMD5(tempOriginalPath + "/data.win");
|
|
|
|
string newMD5 = CalculateMD5(tempOriginalPath + "/data.win");
|
|
|
|
|
|
|
|
|
|
|
|
if (newMD5 != originalMD5)
|
|
|
|
if (newMD5 != originalMD5)
|
|
|
|
{
|
|
|
|
|
|
|
|
return (false, "1.1 data.win does not meet MD5 checksum! Mod packaging aborted.\n1.1 MD5: " + originalMD5 + "\nYour MD5: " + newMD5);
|
|
|
|
return (false, "1.1 data.win does not meet MD5 checksum! Mod packaging aborted.\n1.1 MD5: " + originalMD5 + "\nYour MD5: " + newMD5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (FileNotFoundException)
|
|
|
|
catch (FileNotFoundException)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return (false, "data.win not found! Are you sure you selected AM2R 1.1? Mod packaging aborted.");
|
|
|
|
return (false, "data.win not found! Are you sure you selected AM2R 1.1? Mod packaging aborted.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (profile.OperatingSystem)
|
|
|
|
|
|
|
|
{
|
|
|
|
// Create AM2R.exe and data.win patches
|
|
|
|
// Create AM2R.exe and data.win patches
|
|
|
|
if (profile.OperatingSystem == "Windows")
|
|
|
|
case "Windows":
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!File.Exists(tempModPath + "/AM2R.exe"))
|
|
|
|
if (!File.Exists(tempModPath + "/AM2R.exe"))
|
|
|
|
{ //TODO: put this onto the outer method
|
|
|
|
{ //TODO: put this onto the outer method
|
|
|
|
@ -104,8 +104,9 @@ public static class Core
|
|
|
|
CreatePatch(tempOriginalPath + "/data.win", tempModPath + "/data.win", tempProfilePath + "/data.xdelta");
|
|
|
|
CreatePatch(tempOriginalPath + "/data.win", tempModPath + "/data.win", tempProfilePath + "/data.xdelta");
|
|
|
|
CreatePatch(tempOriginalPath + "/AM2R.exe", tempModPath + "/AM2R.exe", tempProfilePath + "/AM2R.xdelta");
|
|
|
|
CreatePatch(tempOriginalPath + "/AM2R.exe", tempModPath + "/AM2R.exe", tempProfilePath + "/AM2R.xdelta");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (profile.OperatingSystem == "Linux")
|
|
|
|
case "Linux":
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string runnerName = File.Exists(tempModPath + "/" + "AM2R") ? "AM2R" : "runner";
|
|
|
|
string runnerName = File.Exists(tempModPath + "/" + "AM2R") ? "AM2R" : "runner";
|
|
|
|
|
|
|
|
|
|
|
|
@ -133,8 +134,9 @@ public static class Core
|
|
|
|
|
|
|
|
|
|
|
|
CreatePatch(tempOriginalPath + "/data.win", tempModPath + "/assets/game.unx", tempProfilePath + "/game.xdelta");
|
|
|
|
CreatePatch(tempOriginalPath + "/data.win", tempModPath + "/assets/game.unx", tempProfilePath + "/game.xdelta");
|
|
|
|
CreatePatch(tempOriginalPath + "/AM2R.exe", tempModPath + "/" + runnerName, tempProfilePath + "/AM2R.xdelta");
|
|
|
|
CreatePatch(tempOriginalPath + "/AM2R.exe", tempModPath + "/" + runnerName, tempProfilePath + "/AM2R.xdelta");
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (profile.OperatingSystem == "Mac")
|
|
|
|
case "Mac":
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!File.Exists(tempModPath + "/AM2R.app/Contents/MacOS/Mac_Runner"))
|
|
|
|
if (!File.Exists(tempModPath + "/AM2R.app/Contents/MacOS/Mac_Runner"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -155,6 +157,8 @@ public static class Core
|
|
|
|
|
|
|
|
|
|
|
|
// Copy plist over for custom title name
|
|
|
|
// Copy plist over for custom title name
|
|
|
|
File.Copy(tempModPath + "/AM2R.app/Contents/Info.plist", tempProfilePath + "/Info.plist");
|
|
|
|
File.Copy(tempModPath + "/AM2R.app/Contents/Info.plist", tempProfilePath + "/Info.plist");
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Create game.droid patch and wrapper if Android is supported
|
|
|
|
// Create game.droid patch and wrapper if Android is supported
|
|
|
|
|