|
|
@@ -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; |
|
|
|