add os unsupported message
This commit is contained in:
parent
a6f20d815e
commit
6c0bd5481f
1 changed files with 14 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
package game;
|
package game;
|
||||||
|
|
||||||
import java.awt.Desktop;
|
import java.awt.Desktop;
|
||||||
|
import java.awt.GraphicsEnvironment;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
|
@ -39,6 +40,7 @@ import java.util.concurrent.FutureTask;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL13;
|
import org.lwjgl.opengl.GL13;
|
||||||
|
@ -2592,6 +2594,18 @@ public class Game implements IThreadListener {
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
if(System.getProperty("os.name").startsWith("Windows") || System.getProperty("os.name").startsWith("Mac")) {
|
||||||
|
String info = "Inkompatibles Betriebssystem";
|
||||||
|
String msg = "Linux oder *BSD ist erforderlich, um dieses Programm auszuführen.\n" +
|
||||||
|
"Alle Versionen von Windows und Mac OS (X) sind nicht kompatibel.";
|
||||||
|
System.err.println("#################################################################");
|
||||||
|
System.err.println("*** " + info + " ***");
|
||||||
|
System.err.println(msg);
|
||||||
|
System.err.println("#################################################################");
|
||||||
|
if(!GraphicsEnvironment.isHeadless())
|
||||||
|
JOptionPane.showMessageDialog(null, msg, info, JOptionPane.ERROR_MESSAGE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
Window.init();
|
Window.init();
|
||||||
Locale.setDefault(Locale.ROOT);
|
Locale.setDefault(Locale.ROOT);
|
||||||
Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
|
Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue