mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-08 22:59:29 -04:00
Now default to CLI mode when not running on windows, avoids the unintuitive method of the user having to know to change 'cli=true' in viewmode.cfg.
This commit is contained in:
parent
568c855ca1
commit
2f29aeaccd
@ -1,19 +1,19 @@
|
||||
/*
|
||||
Copyright 2010 MCSharp team (Modified for use with MCZall/MCLawl/MCGalaxy)
|
||||
|
||||
Dual-licensed under the Educational Community License, Version 2.0 and
|
||||
the GNU General Public License, Version 3 (the "Licenses"); you may
|
||||
not use this file except in compliance with the Licenses. You may
|
||||
obtain a copy of the Licenses at
|
||||
|
||||
http://www.opensource.org/licenses/ecl2.php
|
||||
http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the Licenses are distributed on an "AS IS"
|
||||
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
or implied. See the Licenses for the specific language governing
|
||||
permissions and limitations under the Licenses.
|
||||
Copyright 2010 MCSharp team (Modified for use with MCZall/MCLawl/MCGalaxy)
|
||||
|
||||
Dual-licensed under the Educational Community License, Version 2.0 and
|
||||
the GNU General Public License, Version 3 (the "Licenses"); you may
|
||||
not use this file except in compliance with the Licenses. You may
|
||||
obtain a copy of the Licenses at
|
||||
|
||||
http://www.opensource.org/licenses/ecl2.php
|
||||
http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the Licenses are distributed on an "AS IS"
|
||||
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
or implied. See the Licenses for the specific language governing
|
||||
permissions and limitations under the Licenses.
|
||||
*/
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
@ -68,7 +68,7 @@ namespace MCGalaxy.Gui {
|
||||
useConsole = false; useHighQualityGui = false;
|
||||
|
||||
try {
|
||||
ReadViewmode();
|
||||
ReadViewmode();
|
||||
if (useConsole) {
|
||||
Server s = new Server();
|
||||
s.OnLog += WriteToConsole;
|
||||
@ -100,13 +100,16 @@ namespace MCGalaxy.Gui {
|
||||
}
|
||||
|
||||
static void ReadViewmode() {
|
||||
PlatformID platform = Environment.OSVersion.Platform;
|
||||
useConsole = !(platform == PlatformID.Win32NT || platform == PlatformID.Win32Windows);
|
||||
|
||||
if (!File.Exists("Viewmode.cfg")) {
|
||||
using (StreamWriter w = new StreamWriter("Viewmode.cfg")) {
|
||||
w.WriteLine("#This file controls how the console window is shown to the server host");
|
||||
w.WriteLine("#cli: True or False (Determines whether a CLI interface is used) (Set True if on Mono)");
|
||||
w.WriteLine("#high-quality: True or false (Determines whether the GUI interface uses higher quality objects)");
|
||||
w.WriteLine();
|
||||
w.WriteLine("cli = false");
|
||||
w.WriteLine("cli = " + useConsole);
|
||||
w.WriteLine("high-quality = true");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user