mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-19 04:26:52 -04:00
Get the client to run on wine properly.
This commit is contained in:
parent
5b35cb4507
commit
29e797fa9c
@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using ClassicalSharp;
|
||||
using OpenTK;
|
||||
|
||||
namespace Launcher2 {
|
||||
|
||||
@ -32,8 +34,19 @@ namespace Launcher2 {
|
||||
return false;
|
||||
|
||||
CheckSettings( data, classicubeSkins, out shouldExit );
|
||||
if( Type.GetType( "Mono.Runtime" ) != null ) {
|
||||
process = Process.Start( "mono", "\"" + path + "\" " + args );
|
||||
if( Configuration.RunningOnMono ) {
|
||||
// We also need to handle the case of running Mono through wine
|
||||
if( Configuration.RunningOnWindows ) {
|
||||
try {
|
||||
process = Process.Start( "mono", "\"" + path + "\" " + args );
|
||||
} catch( Win32Exception ex ) {
|
||||
if( !((uint)ex.ErrorCode == 0x80070002 || (uint)ex.ErrorCode == 0x80004005) )
|
||||
throw; // File not found HRESULT, HRESULT thrown when running on wine
|
||||
process = Process.Start( path, args );
|
||||
}
|
||||
} else {
|
||||
process = Process.Start( "mono", "\"" + path + "\" " + args );
|
||||
}
|
||||
} else {
|
||||
process = Process.Start( path, args );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user