Skip to content

Commit

Permalink
v0.11.8.3 Release, gog support for 1.4.2.1 hotfix. Backup vanilla exe.
Browse files Browse the repository at this point in the history
  • Loading branch information
JavidPack committed Mar 31, 2021
1 parent 5202d64 commit dfe30aa
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ExampleMod/build.txt
@@ -1,5 +1,5 @@
author = TML Team
version = 0.11.8.2
version = 0.11.8.3
displayName = Example Mod
homepage = https://tmodloader.net/
hideCode = false
Expand Down
24 changes: 15 additions & 9 deletions patches/tModLoader/Terraria.ModLoader.Engine/InstallVerifier.cs
Expand Up @@ -30,20 +30,20 @@ static InstallVerifier()
if (Platform.IsWindows) {
steamAPIPath = "steam_api.dll";
steamAPIHash = ToByteArray("7B857C897BC69313E4936DC3DCCE5193");
gogHash = ToByteArray("bd38e2c11df154bcecee8ab3191927ab");
steamHash = ToByteArray("6ebb2e222126aaae302d34a3a2c82cb9");
gogHash = ToByteArray("ff61b96a07894a9e65f880fb9608fb37"); // Don't forget to update CheckExe in CheckGoG
steamHash = ToByteArray("4fd8072ca82ded3d9da1be577a478788");
}
else if (Platform.IsOSX) {
steamAPIPath = "osx/libsteam_api.dylib";
steamAPIHash = ToByteArray("4EECD26A0CDF89F90D4FF26ECAD37BE0");
gogHash = ToByteArray("35aaadbe74ea4568bcc656e47d195224");
steamHash = ToByteArray("dc252bb25a6109687f15c3d3b1ae5542");
gogHash = ToByteArray("181c586d0fe64156adb0ecd4b9fabf9d");
steamHash = ToByteArray("12c8d2ac5af6c8505bd1a9339dc75231");
}
else if (Platform.IsLinux) {
steamAPIPath = "lib/libsteam_api.so";
steamAPIHash = ToByteArray("7B74FD4C207D22DB91B4B649A44467F6");
gogHash = ToByteArray("2a46360324905fbd26bbc9ae9f68d25d");
steamHash = ToByteArray("89a6dc94a2e14f5dcd92f7f54476c062");
gogHash = ToByteArray("4a051352dd6ecc323c5a0a15e5b598fb");
steamHash = ToByteArray("debcc318ca4e14295e3ac22e380e289b");
}
else {
string message = Language.GetTextValue("tModLoader.UnknownVerificationOS");
Expand Down Expand Up @@ -122,7 +122,7 @@ private static bool CheckGoG()
IsGoG = true;

const string DefaultExe = "Terraria.exe";
string CheckExe = $"Terraria_1.4.1.2.exe"; // {Main.versionNumber}
string CheckExe = $"Terraria_1.4.2.1.exe"; // This should match the hashes. {Main.versionNumber}
string vanillaPath = File.Exists(CheckExe) ? CheckExe : DefaultExe;

// If .exe not present, check Terraria directory (Side-by-Side Manual Install)
Expand All @@ -147,13 +147,13 @@ private static bool CheckGoG()
#endif
string defaultExe = Path.Combine(vanillaPath, DefaultExe);
string checkExe = Path.Combine(vanillaPath, CheckExe);
vanillaPath = File.Exists(defaultExe) ? defaultExe : checkExe;
vanillaPath = File.Exists(checkExe) ? checkExe : defaultExe;
}
// If .exe not present check parent directory (Nested Manual Install)
if (!File.Exists(vanillaPath)) {
string defaultExe = Path.Combine("..", DefaultExe);
string checkExe = Path.Combine("..", CheckExe);
vanillaPath = File.Exists(defaultExe) ? defaultExe : checkExe;
vanillaPath = File.Exists(checkExe) ? checkExe : defaultExe;
}

if (!File.Exists(vanillaPath)) {
Expand All @@ -170,6 +170,12 @@ private static bool CheckGoG()
return false;
}

if (Path.GetFileName(vanillaPath) != CheckExe) {
string pathToCheckExe = Path.Combine(Path.GetDirectoryName(vanillaPath), CheckExe);
Logging.tML.Info($"Backing up {Path.GetFileName(vanillaPath)} to {CheckExe}");
File.Copy(vanillaPath, pathToCheckExe);
}

Logging.tML.Info("GOG or manual installation OK.");
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion patches/tModLoader/Terraria.ModLoader/ModLoader.cs
Expand Up @@ -27,7 +27,7 @@ namespace Terraria.ModLoader
/// </summary>
public static class ModLoader
{
public static readonly Version version = new Version(0, 11, 8, 2);
public static readonly Version version = new Version(0, 11, 8, 3);
// Stores the most recent version of tModLoader launched. Can be used for migration.
public static Version LastLaunchedTModLoaderVersion;
// public static bool ShowWhatsNew;
Expand Down
2 changes: 1 addition & 1 deletion solutions/CompleteRelease.bat
Expand Up @@ -4,7 +4,7 @@
@ECHO off
:: Compile/Build exe
echo "Building Release"
set tModLoaderVersion=v0.11.8.2
set tModLoaderVersion=v0.11.8.3
call buildRelease.bat

set destinationFolder=.\tModLoader %tModLoaderVersion% Release
Expand Down
2 changes: 1 addition & 1 deletion solutions/ReleaseExtras/version
@@ -1 +1 @@
v0.11.8.2
v0.11.8.3
2 changes: 1 addition & 1 deletion solutions/documentation/Doxyfile
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Terraria ModLoader"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.11.8.2
PROJECT_NUMBER = 0.11.8.3

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down

0 comments on commit dfe30aa

Please sign in to comment.