Just one more fix and dialog (no patcher, command line)
This commit is contained in:
parent
0a36e1a0c6
commit
3cf307a3b8
3 changed files with 13 additions and 4 deletions
|
@ -6,7 +6,7 @@
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<SignAssembly>false</SignAssembly>
|
<SignAssembly>false</SignAssembly>
|
||||||
<ApplicationIcon>favicon.ico</ApplicationIcon>
|
<ApplicationIcon>favicon.ico</ApplicationIcon>
|
||||||
<Version>1.3.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 Gamecraft. It automatically downloads and runs GCIPA and allows the user to install mods.</Description>
|
||||||
|
|
|
@ -82,6 +82,7 @@ namespace GCMM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var status = CheckIfPatched();
|
var status = CheckIfPatched();
|
||||||
|
//bool justDownloadedPatcherSoDontWarnAboutIncompatibility = false;
|
||||||
switch (status)
|
switch (status)
|
||||||
{
|
{
|
||||||
case GameState.NotFound:
|
case GameState.NotFound:
|
||||||
|
@ -91,6 +92,7 @@ namespace GCMM
|
||||||
case GameState.NoPatcher:
|
case GameState.NoPatcher:
|
||||||
case GameState.OldPatcher:
|
case GameState.OldPatcher:
|
||||||
{
|
{
|
||||||
|
EnsureShown(false);
|
||||||
if (MessageBox.Show((status == GameState.NoPatcher
|
if (MessageBox.Show((status == GameState.NoPatcher
|
||||||
? "The patcher (GCIPA) is not found. It's necessary to load the mods."
|
? "The patcher (GCIPA) is not found. It's necessary to load the mods."
|
||||||
: "There is a patcher update available!"
|
: "There is a patcher update available!"
|
||||||
|
@ -101,7 +103,14 @@ namespace GCMM
|
||||||
return retOpenedWindowShouldStay;
|
return retOpenedWindowShouldStay;
|
||||||
}
|
}
|
||||||
this.status.Text = "Status: Patching...";
|
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())
|
using (WebClient client = GetClient())
|
||||||
{
|
{
|
||||||
string url = gcipa.DownloadURL;
|
string url = gcipa.DownloadURL;
|
||||||
|
|
|
@ -203,13 +203,13 @@ namespace GCMM
|
||||||
Process.Start("steam://run/1078000/");
|
Process.Start("steam://run/1078000/");
|
||||||
else
|
else
|
||||||
Process.Start("xdg-open", "steam://run/1078000/");
|
Process.Start("xdg-open", "steam://run/1078000/");
|
||||||
|
EndWork(false);
|
||||||
|
tcs.SetResult(null);
|
||||||
};
|
};
|
||||||
if (InvokeRequired)
|
if (InvokeRequired)
|
||||||
Invoke(act);
|
Invoke(act);
|
||||||
else
|
else
|
||||||
act();
|
act();
|
||||||
EndWork(false);
|
|
||||||
tcs.SetResult(null);
|
|
||||||
}, tcs.Task);
|
}, tcs.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue