Revert "add windows support (untested)"

This reverts commit 6e5c9e842e.
This commit is contained in:
Sen 2025-05-12 18:46:07 +02:00
parent ad828ec6b4
commit 2158a700f4
28 changed files with 351 additions and 379 deletions

View file

@ -44,7 +44,6 @@ public enum Log {
private static final List<LogMessage> LOG = Lists.newArrayList();
private static LogLevel level = LogLevel.INFO;
private static boolean colors = true;
private static IThreadListener sync = new IThreadListener() {
public ListenableFuture<Object> schedule(Runnable run) {
return null;
@ -72,16 +71,14 @@ public enum Log {
if(pos - last != 0)
System.err.print(str.substring(last, pos));
color = TextColor.getColor(c); // (c >= CHR_COLORS2) && (c <= CHR_COLORE2) ? aux_colors[c - CHR_COLORS2] : text_colors[c - CHR_COLORS1];
if(colors)
System.err.printf("\u001b[38;2;%d;%d;%dm", (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
System.err.printf("\u001b[38;2;%d;%d;%dm", (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
last = ++pos;
continue;
}
else if(c == CHR_CRESET) {
if(pos - last != 0)
System.err.print(str.substring(last, pos));
if(colors)
System.err.print("\u001b[0m");
System.err.print("\u001b[0m");
last = ++pos;
continue;
}
@ -102,7 +99,7 @@ public enum Log {
if(pos >= str.length() && pos - last != 0)
System.err.print(str.substring(last, pos));
}
System.err.print(colors ? "\u001b[0m\n" : "\n");
System.err.print("\u001b[0m\n");
}
public static String str_time(long time) {
@ -115,7 +112,6 @@ public enum Log {
public static void init(IThreadListener sync) {
Log.sync = sync;
Log.colors = System.getProperty("log.nocolor") == null && !Util.WINDOWS;
}
public static void flushLog() {

View file

@ -12,8 +12,7 @@ import common.collect.Maps;
import common.log.Log;
public abstract class Util {
public static final boolean WINDOWS = System.getProperty("os.name").startsWith("Windows");
private static final long START = getTime();
private static long start = getTime();
public static String strip(String str, int offset, int len, char newl, char tab, char unk) {
StringBuilder sb = new StringBuilder();
@ -304,10 +303,10 @@ int utf_len(const char *str) {
}
public static void checkOs() {
if(System.getProperty("os.name").startsWith("Mac")) {
if(System.getProperty("os.name").startsWith("Windows") || System.getProperty("os.name").startsWith("Mac")) {
String info = "Inkompatibles Betriebssystem";
String msg = "Linux, *BSD oder Windows ist erforderlich, um dieses Programm\n" +
"auszuführen. Alle Versionen von Mac OS (X) sind nicht kompatibel.";
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);
@ -383,7 +382,7 @@ int utf_len(const char *str) {
}
public static long rtime() {
return Util.getTime() - START;
return Util.getTime() - start;
}
public static double ftime() {