mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-09-20 04:47:54 +03:00
System property cleanup
This commit is contained in:
parent
eb31483a15
commit
1c2b1fb757
@ -55,7 +55,7 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
|
|||||||
Log.info("[GL] Max texture size: @", maxTextureSize);
|
Log.info("[GL] Max texture size: @", maxTextureSize);
|
||||||
Log.info("[GL] Using @ context.", gl30 != null ? "OpenGL 3" : "OpenGL 2");
|
Log.info("[GL] Using @ context.", gl30 != null ? "OpenGL 3" : "OpenGL 2");
|
||||||
if(maxTextureSize < 4096) Log.warn("[GL] Your maximum texture size is below the recommended minimum of 4096. This will cause severe performance issues.");
|
if(maxTextureSize < 4096) Log.warn("[GL] Your maximum texture size is below the recommended minimum of 4096. This will cause severe performance issues.");
|
||||||
Log.info("[JAVA] Version: @", System.getProperty("java.version"));
|
Log.info("[JAVA] Version: @", OS.javaVersion);
|
||||||
|
|
||||||
Time.setDeltaProvider(() -> {
|
Time.setDeltaProvider(() -> {
|
||||||
float result = Core.graphics.getDeltaTime() * 60f;
|
float result = Core.graphics.getDeltaTime() * 60f;
|
||||||
|
@ -29,18 +29,17 @@ public class CrashSender{
|
|||||||
report += "Report this at " + Vars.reportIssueURL + "\n\n";
|
report += "Report this at " + Vars.reportIssueURL + "\n\n";
|
||||||
}
|
}
|
||||||
return report
|
return report
|
||||||
+ "Version: " + Version.combined() + (Vars.headless ? " (Server)" : "") + "\n"
|
+ "Version: " + Version.combined() + (Vars.headless ? " (Server)" : "") + "\n"
|
||||||
+ "OS: " + System.getProperty("os.name") + " x" + (OS.is64Bit ? "64" : "32") + "\n"
|
+ "OS: " + OS.osName + " x" + (OS.osArchBits) + " (" + OS.osArch + ")\n"
|
||||||
+ "Java Version: " + System.getProperty("java.version") + "\n"
|
+ "Java Version: " + OS.javaVersion + "\n"
|
||||||
+ "Java Architecture: " + System.getProperty("sun.arch.data.model") + "\n"
|
+ (mods == null ? "<no mod init>" : mods.list().size + " Mods" + (mods.list().isEmpty() ? "" : ": " + mods.list().toString(", ", mod -> mod.name + ":" + mod.meta.version)))
|
||||||
+ (mods == null ? "<no mod init>" : mods.list().size + " Mods" + (mods.list().isEmpty() ? "" : ": " + mods.list().toString(", ", mod -> mod.name + ":" + mod.meta.version)))
|
+ "\n\n" + error;
|
||||||
+ "\n\n" + error;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void log(Throwable exception){
|
public static void log(Throwable exception){
|
||||||
try{
|
try{
|
||||||
Core.settings.getDataDirectory().child("crashes").child("crash_" + System.currentTimeMillis() + ".txt")
|
Core.settings.getDataDirectory().child("crashes").child("crash_" + System.currentTimeMillis() + ".txt")
|
||||||
.writeString(createReport(Strings.neatError(exception)));
|
.writeString(createReport(Strings.neatError(exception)));
|
||||||
}catch(Throwable ignored){
|
}catch(Throwable ignored){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -60,7 +59,7 @@ public class CrashSender{
|
|||||||
}catch(Throwable ignored){}
|
}catch(Throwable ignored){}
|
||||||
|
|
||||||
//don't create crash logs for custom builds, as it's expected
|
//don't create crash logs for custom builds, as it's expected
|
||||||
if(Version.build == -1 || (System.getProperty("user.name").equals("anuke") && "release".equals(Version.modifier))){
|
if(Version.build == -1 || (OS.username.equals("anuke") && !"steam".equals(Version.modifier))){
|
||||||
ret();
|
ret();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,10 +140,10 @@ public class CrashSender{
|
|||||||
ex(() -> value.addChild("server", new JsonValue(fs)));
|
ex(() -> value.addChild("server", new JsonValue(fs)));
|
||||||
ex(() -> value.addChild("players", new JsonValue(Groups.player.size())));
|
ex(() -> value.addChild("players", new JsonValue(Groups.player.size())));
|
||||||
ex(() -> value.addChild("state", new JsonValue(Vars.state.getState().name())));
|
ex(() -> value.addChild("state", new JsonValue(Vars.state.getState().name())));
|
||||||
ex(() -> value.addChild("os", new JsonValue(System.getProperty("os.name") + "x" + (OS.is64Bit ? "64" : "32"))));
|
ex(() -> value.addChild("os", new JsonValue(OS.osName + " x" + OS.osArchBits + " " + OS.osVersion)));
|
||||||
ex(() -> value.addChild("trace", new JsonValue(parseException(exception))));
|
ex(() -> value.addChild("trace", new JsonValue(parseException(exception))));
|
||||||
ex(() -> value.addChild("javaVersion", new JsonValue(System.getProperty("java.version"))));
|
ex(() -> value.addChild("javaVersion", new JsonValue(OS.javaVersion)));
|
||||||
ex(() -> value.addChild("javaArch", new JsonValue(System.getProperty("sun.arch.data.model"))));
|
ex(() -> value.addChild("javaArch", new JsonValue(OS.osArchBits)));
|
||||||
|
|
||||||
Log.info("Sending crash report.");
|
Log.info("Sending crash report.");
|
||||||
|
|
||||||
|
@ -55,20 +55,30 @@ public class Links{
|
|||||||
|
|
||||||
private static String report(){
|
private static String report(){
|
||||||
return "https://github.com/Anuken/Mindustry/issues/new?assignees=&labels=bug&body=" +
|
return "https://github.com/Anuken/Mindustry/issues/new?assignees=&labels=bug&body=" +
|
||||||
Strings.encode(Strings.format(
|
Strings.encode(Strings.format(
|
||||||
"**Platform**: `@`\n" +
|
"""
|
||||||
"\n**Build**: `@`\n" +
|
**Platform**: `@`
|
||||||
"\n**Issue**: *Explain your issue in detail.*\n" +
|
|
||||||
"\n**Steps to reproduce**: *How you happened across the issue, and what exactly you did to make the bug happen.*\n" +
|
**Build**: `@`
|
||||||
"\n**Link(s) to mod(s) used**: `@`\n" +
|
|
||||||
"\n**Save file**: *The (zipped) save file you were playing on when the bug happened. THIS IS REQUIRED FOR ANY ISSUE HAPPENING IN-GAME, REGARDLESS OF WHETHER YOU THINK IT HAPPENS EVERYWHERE. DO NOT DELETE OR OMIT THIS LINE UNLESS YOU ARE SURE THAT THE ISSUE DOES NOT HAPPEN IN-GAME.*\n" +
|
**Issue**: *Explain your issue in detail.*
|
||||||
"\n**Crash report**: *The contents of relevant crash report files. REQUIRED if you are reporting a crash.*\n" +
|
|
||||||
"\n---\n" +
|
**Steps to reproduce**: *How you happened across the issue, and what exactly you did to make the bug happen.*
|
||||||
"\n*Place an X (no spaces) between the brackets to confirm that you have read the line below.*" +
|
|
||||||
"\n- [ ] **I have updated to the latest release (https://github.com/Anuken/Mindustry/releases) to make sure my issue has not been fixed.**" +
|
**Link(s) to mod(s) used**: `@`
|
||||||
"\n- [ ] **I have searched the closed and open issues to make sure that this problem has not already been reported.**",
|
|
||||||
OS.isAndroid ? "Android " + Core.app.getVersion() : (System.getProperty("os.name") + (OS.is64Bit ? " x64" : " x32")),
|
**Save file**: *The (zipped) save file you were playing on when the bug happened. THIS IS REQUIRED FOR ANY ISSUE HAPPENING IN-GAME, REGARDLESS OF WHETHER YOU THINK IT HAPPENS EVERYWHERE. DO NOT DELETE OR OMIT THIS LINE UNLESS YOU ARE SURE THAT THE ISSUE DOES NOT HAPPEN IN-GAME.*
|
||||||
Version.combined(),
|
|
||||||
Vars.mods.list().any() ? Vars.mods.list().select(LoadedMod::enabled).map(l -> l.meta.author + "/" + l.name + ":" + l.meta.version) : "none"));
|
**Crash report**: *The contents of relevant crash report files. REQUIRED if you are reporting a crash.*
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*Place an X (no spaces) between the brackets to confirm that you have read the line below.*
|
||||||
|
- [ ] **I have updated to the latest release (https://github.com/Anuken/Mindustry/releases) to make sure my issue has not been fixed.**
|
||||||
|
- [ ] **I have searched the closed and open issues to make sure that this problem has not already been reported.**
|
||||||
|
""",
|
||||||
|
OS.isAndroid ? "Android " + Core.app.getVersion() : (OS.osName + " x" + OS.osArchBits),
|
||||||
|
Version.combined(),
|
||||||
|
Vars.mods.list().any() ? Vars.mods.list().select(LoadedMod::enabled).map(l -> l.meta.author + "/" + l.name + ":" + l.meta.version) : "none"));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,4 +10,4 @@ kapt.include.compile.classpath=false
|
|||||||
kotlin.stdlib.default.dependency=false
|
kotlin.stdlib.default.dependency=false
|
||||||
#needed for android compilation
|
#needed for android compilation
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
archash=fbdfa0307101b881e208f53666c1f4b7ebf0fe90
|
archash=f223b2a9d421d751209efedc615352257fb3773b
|
||||||
|
@ -278,7 +278,7 @@ public class ServerControl implements ApplicationListener{
|
|||||||
|
|
||||||
handler.register("version", "Displays server version info.", arg -> {
|
handler.register("version", "Displays server version info.", arg -> {
|
||||||
info("Version: Mindustry @-@ @ / build @", Version.number, Version.modifier, Version.type, Version.build + (Version.revision == 0 ? "" : "." + Version.revision));
|
info("Version: Mindustry @-@ @ / build @", Version.number, Version.modifier, Version.type, Version.build + (Version.revision == 0 ? "" : "." + Version.revision));
|
||||||
info("Java Version: @", System.getProperty("java.version"));
|
info("Java Version: @", OS.javaVersion);
|
||||||
});
|
});
|
||||||
|
|
||||||
handler.register("exit", "Exit the server application.", arg -> {
|
handler.register("exit", "Exit the server application.", arg -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user