mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-10-03 02:21:53 -04:00
Fix updating not working when running mono through wine (Thanks arydev)
This commit is contained in:
parent
17b5aeb883
commit
675dce9b94
@ -96,10 +96,11 @@ namespace MCGalaxy {
|
|||||||
string path = Path.Combine(Utils.FolderPath, "Updater.exe");
|
string path = Path.Combine(Utils.FolderPath, "Updater.exe");
|
||||||
if (!File.Exists(path)) throw new FileNotFoundException("Unable to find " + path);
|
if (!File.Exists(path)) throw new FileNotFoundException("Unable to find " + path);
|
||||||
|
|
||||||
bool mono = Type.GetType("Mono.Runtime") != null;
|
try {
|
||||||
if (!mono) {
|
|
||||||
Process.Start(path, "securitycheck10934579068013978427893755755270374" + exeName);
|
Process.Start(path, "securitycheck10934579068013978427893755755270374" + exeName);
|
||||||
} else {
|
} catch {
|
||||||
|
if (Type.GetType("Mono.Runtime") == null) throw;
|
||||||
|
// if running on mono, try again with 'mono /usr/bin/MCGalaxyCLI.exe' instead
|
||||||
Process.Start("mono", path + " securitycheck10934579068013978427893755755270374" + exeName);
|
Process.Start("mono", path + " securitycheck10934579068013978427893755755270374" + exeName);
|
||||||
}
|
}
|
||||||
Server.Stop(false, "Updating server.");
|
Server.Stop(false, "Updating server.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user