Update to work with .NET 5 tools, GC->TB

This commit is contained in:
Norbi Peti 2021-05-15 02:21:05 +02:00
parent 3cf307a3b8
commit 199e77c68f
7 changed files with 28 additions and 28 deletions

View file

@ -9,7 +9,8 @@
<Version>1.4.0</Version> <Version>1.4.0</Version>
<Authors>NorbiPeti</Authors> <Authors>NorbiPeti</Authors>
<Company>ExMods</Company> <Company>ExMods</Company>
<Description>A mod manager for Gamecraft. It automatically downloads and runs GCIPA and allows the user to install mods.</Description> <Description>A mod manager for Techblox. It automatically downloads and runs GCIPA and allows the user to install mods.</Description>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@ -24,6 +25,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="System.IO.Compression" Version="4.3.0" /> <PackageReference Include="System.IO.Compression" Version="4.3.0" />
<PackageReference Include="System.Resources.Extensions" Version="5.0.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" /> <PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup> </ItemGroup>

View file

@ -271,7 +271,7 @@
this.ForeColor = System.Drawing.Color.Lime; this.ForeColor = System.Drawing.Color.Lime;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "MainForm"; this.Name = "MainForm";
this.Text = "Gamecraft Mod Manager"; this.Text = "Techblox Mod Manager";
this.Load += new System.EventHandler(this.Form1_Load); this.Load += new System.EventHandler(this.Form1_Load);
this.Shown += new System.EventHandler(this.MainForm_Shown); this.Shown += new System.EventHandler(this.MainForm_Shown);
this.ResumeLayout(false); this.ResumeLayout(false);

View file

@ -28,21 +28,21 @@ namespace GCMM
private DateTime lastGameUpdateTime; private DateTime lastGameUpdateTime;
private string steamPath; private string steamPath;
private const string defaultInfo = @" private const string defaultInfo = @"
Gamecraft Mod Manager Techblox Mod Manager
If you click on a mod it will show some info about it. The install instructions there are usually for manual installs. If you click on a mod it will show some info about it. The install instructions there are usually for manual installs.
To get started, click on a mod and select Install mod. Most mods need GamecraftModdingAPI as well so it'll be installed. To get started, click on a mod and select Install mod. Most mods need TechbloxModdingAPI as well so it'll be installed.
Then launch Gamecraft: if you enabled auto-patching then you can use Steam but if you didn't then you must use the Play button. Then launch Techblox: if you enabled auto-patching then you can use Steam but if you didn't then you must use the Play button.
This will first download and run the patcher (GCIPA) if needed. If all goes well, after some time a modded Gamecraft should launch. This will first download and run the patcher (GCIPA) if needed. If all goes well, after some time a modded Techblox should launch.
After a Gamecraft update there's a good chance that mods will break. If this happens you may get errors when trying to start Gamecraft. After a Techblox update there's a good chance that mods will break. If this happens you may get errors when trying to start Techblox.
Until updated versions are released, use the ""Disable mods"" checkbox at the bottom to launch the game without mods. Until updated versions are released, use the ""Disable mods"" checkbox at the bottom to launch the game without mods.
If you enabled auto-patching you will get a warning about this. If you enabled auto-patching you will get a warning about this.
If you don't have auto-patching enabled then you will need to run the mod manager each time Gamecraft updates and click ""Patch & Play"". If you don't have auto-patching enabled then you will need to run the mod manager each time Techblox updates and click ""Patch & Play"".
Disclaimer: Disclaimer:
This mod manager and the mods in the list are made by the ExMods developers. We are not associated with Freejam or Gamecraft. Modify Gamecraft at your own risk. This mod manager and the mods in the list are made by the ExMods developers. We are not associated with Freejam or Techblox. Modify Techblox at your own risk.
If you encounter an issue while any mods are installed, report it to us. If you think it's an issue with the game, test again with the ""Disable mods"" option checked before reporting to Freejam. If you encounter an issue while any mods are installed, report it to us. If you think it's an issue with the game, test again with the ""Disable mods"" option checked before reporting to Freejam.
You may also want to verify the game's files by clicking on the Validate game button. You may also want to verify the game's files by clicking on the Validate game button.
@ -79,8 +79,8 @@ You may also want to verify the game's files by clicking on the Validate game bu
{ {
if (MessageBox.Show("Do you want GCMM to change the game's launch settings so it can ensure the game is patched?\n\n" + if (MessageBox.Show("Do you want GCMM to change the game's launch settings so it can ensure the game is patched?\n\n" +
"If you say yes, GCMM will do a quick check before the game is launched and patches if necessary. " + "If you say yes, GCMM will do a quick check before the game is launched and patches if necessary. " +
"This way you (hopefully) won't see crashes after a Gamecraft update.\n\n" + "This way you (hopefully) won't see crashes after a Techblox update.\n\n" +
"Note that this also means that if you (re)move GCMM without disabling this in the settings then you won't be able to launch Gamecraft until you change the launch options in Steam.", "Note that this also means that if you (re)move GCMM without disabling this in the settings then you won't be able to launch Techblox until you change the launch options in Steam.",
"GCMM auto-patching", MessageBoxButtons.YesNo) == DialogResult.Yes) "GCMM auto-patching", MessageBoxButtons.YesNo) == DialogResult.Yes)
DetectConfigLocationAndAutoStart(steamPath, ref user); DetectConfigLocationAndAutoStart(steamPath, ref user);
else else

View file

@ -18,7 +18,7 @@ namespace GCMM
if (mod.DownloadURL == null) return; if (mod.DownloadURL == null) return;
if (CheckNoExe()) if (CheckNoExe())
return; return;
if (mod.Name != "GamecraftModdingAPI") if (mod.Name != "TechbloxModdingAPI")
await UpdateAPI(); await UpdateAPI();
var tmp = Directory.CreateDirectory("temp"); var tmp = Directory.CreateDirectory("temp");
var plugins = Directory.CreateDirectory(GamePath(@"\Plugins")); var plugins = Directory.CreateDirectory(GamePath(@"\Plugins"));
@ -166,14 +166,14 @@ namespace GCMM
public async Task UpdateAPI() public async Task UpdateAPI()
{ {
if (!mods.ContainsKey("GamecraftModdingAPI")) if (!mods.ContainsKey("TechbloxModdingAPI"))
return; return;
var gcmapi = mods["GamecraftModdingAPI"]; var gcmapi = mods["TechbloxModdingAPI"];
if (!gcmapi.Installed || gcmapi.Updatable) if (!gcmapi.Installed || gcmapi.Updatable)
{ {
if (MessageBox.Show(gcmapi.Installed ? if (MessageBox.Show(gcmapi.Installed ?
"GamecraftModdingAPI will be updated as there's a new version available. It's needed for most mods to function." "TechbloxModdingAPI will be updated as there's a new version available. It's needed for most mods to function."
: "GamecraftModdingAPI will be installed as most mods need it to work. You can uninstall it if you're sure you don't need it.", "API needed", : "TechbloxModdingAPI will be installed as most mods need it to work. You can uninstall it if you're sure you don't need it.", "API needed",
MessageBoxButtons.OKCancel) == DialogResult.OK) MessageBoxButtons.OKCancel) == DialogResult.OK)
await InstallMod(gcmapi); await InstallMod(gcmapi);
} }

View file

@ -86,7 +86,7 @@ namespace GCMM
switch (status) switch (status)
{ {
case GameState.NotFound: case GameState.NotFound:
MessageBox.Show("Gamecraft not found! Set the correct path in Settings."); MessageBox.Show("Techblox not found! Set the correct path in Settings.");
EndWork(false); EndWork(false);
return retOpenedWindowShouldStay; return retOpenedWindowShouldStay;
case GameState.NoPatcher: case GameState.NoPatcher:

View file

@ -47,10 +47,8 @@ namespace GCMM
continue; continue;
string library = match.Groups[1].Value.Replace("\\\\", "\\"); string library = match.Groups[1].Value.Replace("\\\\", "\\");
library += @"\steamapps\common\"; library += @"\steamapps\common\";
if (GetExe(library + "Gamecraft") != null) if (GetExe(library + "Techblox") != null)
return library + "Gamecraft"; return library + "Techblox";
if (GetExe(library + "RobocraftX") != null)
return library + "RobocraftX";
} }
return null; return null;
} }
@ -58,7 +56,7 @@ namespace GCMM
public string SelectGameFolder() public string SelectGameFolder()
{ {
var ofd = new OpenFileDialog(); var ofd = new OpenFileDialog();
ofd.Filter = "Gamecraft executable|Gamecraft.exe|Gamecraft Preview executable|GamecraftPreview.exe"; ofd.Filter = "Techblox executable|Techblox.exe|Techblox Preview executable|TechbloxPreview.exe";
ofd.Title = "Game location"; ofd.Title = "Game location";
ofd.InitialDirectory = steamPath + @"\steamapps\common\"; ofd.InitialDirectory = steamPath + @"\steamapps\common\";
ofd.CheckFileExists = true; ofd.CheckFileExists = true;
@ -290,10 +288,10 @@ namespace GCMM
public string GetExe(string path = null) public string GetExe(string path = null)
{ {
if (File.Exists(GamePath("\\Gamecraft.exe", path))) if (File.Exists(GamePath("\\Techblox.exe", path)))
return "Gamecraft.exe"; return "Techblox.exe";
if (File.Exists(GamePath("\\GamecraftPreview.exe", path))) if (File.Exists(GamePath("\\TechbloxPreview.exe", path)))
return "GamecraftPreview.exe"; return "TechbloxPreview.exe";
return null; return null;
} }
@ -307,7 +305,7 @@ namespace GCMM
path = GetExe(); path = GetExe();
if (path == null) if (path == null)
{ {
MessageBox.Show("Gamecraft not found! Set the correct path in Settings."); MessageBox.Show("Techblox not found! Set the correct path in Settings.");
return true; return true;
} }
return false; return false;

View file

@ -2,7 +2,7 @@
"profiles": { "profiles": {
"GCMM": { "GCMM": {
"commandName": "Project", "commandName": "Project",
"commandLineArgs": "-start steam:\"\"" "commandLineArgs": ""
} }
} }
} }