Browse Source

Just one more fix and dialog (no patcher, command line)

tags/v1.4.0
NorbiPeti 3 years ago
parent
commit
3cf307a3b8
3 changed files with 13 additions and 4 deletions
  1. +1
    -1
      GCMM/GCMM.csproj
  2. +10
    -1
      GCMM/MainPatcher.cs
  3. +2
    -2
      GCMM/MainUtils.cs

+ 1
- 1
GCMM/GCMM.csproj View File

@@ -6,7 +6,7 @@
<UseWindowsForms>true</UseWindowsForms>
<SignAssembly>false</SignAssembly>
<ApplicationIcon>favicon.ico</ApplicationIcon>
<Version>1.3.0</Version>
<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>


+ 10
- 1
GCMM/MainPatcher.cs View File

@@ -82,6 +82,7 @@ namespace GCMM
}
}
var status = CheckIfPatched();
//bool justDownloadedPatcherSoDontWarnAboutIncompatibility = false;
switch (status)
{
case GameState.NotFound:
@@ -91,6 +92,7 @@ namespace GCMM
case GameState.NoPatcher:
case GameState.OldPatcher:
{
EnsureShown(false);
if (MessageBox.Show((status == GameState.NoPatcher
? "The patcher (GCIPA) is not found. It's necessary to load the mods."
: "There is a patcher update available!"
@@ -101,7 +103,14 @@ namespace GCMM
return retOpenedWindowShouldStay;
}
this.status.Text = "Status: Patching...";
EnsureShown(false);
int C = 0;
while (gcipa.DownloadURL == null && C < 20)
await Task.Delay(500); //The EnsureShown() call should download info about GCIPA
if (gcipa.DownloadURL == null)
{
MessageBox.Show("Could not get information about GCIPA in time. Please run GCMM manually.");
return retOpenedWindowShouldStay;
}
using (WebClient client = GetClient())
{
string url = gcipa.DownloadURL;


+ 2
- 2
GCMM/MainUtils.cs View File

@@ -203,13 +203,13 @@ namespace GCMM
Process.Start("steam://run/1078000/");
else
Process.Start("xdg-open", "steam://run/1078000/");
EndWork(false);
tcs.SetResult(null);
};
if (InvokeRequired)
Invoke(act);
else
act();
EndWork(false);
tcs.SetResult(null);
}, tcs.Task);
}



Loading…
Cancel
Save