Browse Source

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

tags/v1.5.0
NorbiPeti 3 years ago
parent
commit
199e77c68f
7 changed files with 28 additions and 28 deletions
  1. +3
    -1
      GCMM/GCMM.csproj
  2. +1
    -1
      GCMM/MainForm.Designer.cs
  3. +9
    -9
      GCMM/MainForm.cs
  4. +5
    -5
      GCMM/MainModInstaller.cs
  5. +1
    -1
      GCMM/MainPatcher.cs
  6. +8
    -10
      GCMM/MainUtils.cs
  7. +1
    -1
      GCMM/Properties/launchSettings.json

+ 3
- 1
GCMM/GCMM.csproj View File

@@ -9,7 +9,8 @@
<Version>1.4.0</Version>
<Authors>NorbiPeti</Authors>
<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 Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -24,6 +25,7 @@
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<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" />
</ItemGroup>



+ 1
- 1
GCMM/MainForm.Designer.cs View File

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


+ 9
- 9
GCMM/MainForm.cs View File

@@ -28,21 +28,21 @@ namespace GCMM
private DateTime lastGameUpdateTime;
private string steamPath;
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.
To get started, click on a mod and select Install mod. Most mods need GamecraftModdingAPI 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.
This will first download and run the patcher (GCIPA) if needed. If all goes well, after some time a modded Gamecraft should launch.
To get started, click on a mod and select Install mod. Most mods need TechbloxModdingAPI as well so it'll be installed.
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 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.
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:
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.
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 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" +
"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.",
"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 Techblox until you change the launch options in Steam.",
"GCMM auto-patching", MessageBoxButtons.YesNo) == DialogResult.Yes)
DetectConfigLocationAndAutoStart(steamPath, ref user);
else


+ 5
- 5
GCMM/MainModInstaller.cs View File

@@ -18,7 +18,7 @@ namespace GCMM
if (mod.DownloadURL == null) return;
if (CheckNoExe())
return;
if (mod.Name != "GamecraftModdingAPI")
if (mod.Name != "TechbloxModdingAPI")
await UpdateAPI();
var tmp = Directory.CreateDirectory("temp");
var plugins = Directory.CreateDirectory(GamePath(@"\Plugins"));
@@ -166,14 +166,14 @@ namespace GCMM

public async Task UpdateAPI()
{
if (!mods.ContainsKey("GamecraftModdingAPI"))
if (!mods.ContainsKey("TechbloxModdingAPI"))
return;
var gcmapi = mods["GamecraftModdingAPI"];
var gcmapi = mods["TechbloxModdingAPI"];
if (!gcmapi.Installed || gcmapi.Updatable)
{
if (MessageBox.Show(gcmapi.Installed ?
"GamecraftModdingAPI 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 updated as there's a new version available. It's needed for most mods to function."
: "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)
await InstallMod(gcmapi);
}


+ 1
- 1
GCMM/MainPatcher.cs View File

@@ -86,7 +86,7 @@ namespace GCMM
switch (status)
{
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);
return retOpenedWindowShouldStay;
case GameState.NoPatcher:


+ 8
- 10
GCMM/MainUtils.cs View File

@@ -47,10 +47,8 @@ namespace GCMM
continue;
string library = match.Groups[1].Value.Replace("\\\\", "\\");
library += @"\steamapps\common\";
if (GetExe(library + "Gamecraft") != null)
return library + "Gamecraft";
if (GetExe(library + "RobocraftX") != null)
return library + "RobocraftX";
if (GetExe(library + "Techblox") != null)
return library + "Techblox";
}
return null;
}
@@ -58,7 +56,7 @@ namespace GCMM
public string SelectGameFolder()
{
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.InitialDirectory = steamPath + @"\steamapps\common\";
ofd.CheckFileExists = true;
@@ -290,10 +288,10 @@ namespace GCMM

public string GetExe(string path = null)
{
if (File.Exists(GamePath("\\Gamecraft.exe", path)))
return "Gamecraft.exe";
if (File.Exists(GamePath("\\GamecraftPreview.exe", path)))
return "GamecraftPreview.exe";
if (File.Exists(GamePath("\\Techblox.exe", path)))
return "Techblox.exe";
if (File.Exists(GamePath("\\TechbloxPreview.exe", path)))
return "TechbloxPreview.exe";
return null;
}

@@ -307,7 +305,7 @@ namespace GCMM
path = GetExe();
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 false;


+ 1
- 1
GCMM/Properties/launchSettings.json View File

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

Loading…
Cancel
Save