File tree 3 files changed +9
-16
lines changed
HMCL/src/main/java/org/jackhuang/hmcl
HMCLCore/src/main/java/org/jackhuang/hmcl/util/platform
3 files changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -225,8 +225,11 @@ public static void main(String[] args) {
225
225
LOG .info ("Operating System: " + (OperatingSystem .OS_RELEASE_PRETTY_NAME == null
226
226
? OperatingSystem .SYSTEM_NAME + ' ' + OperatingSystem .SYSTEM_VERSION
227
227
: OperatingSystem .OS_RELEASE_PRETTY_NAME + " (" + OperatingSystem .SYSTEM_NAME + ' ' + OperatingSystem .SYSTEM_VERSION + ')' ));
228
- LOG .info ("System Architecture: " + Architecture .SYSTEM_ARCH_NAME );
229
- LOG .info ("Java Architecture: " + Architecture .CURRENT_ARCH_NAME );
228
+ if (OperatingSystem .CURRENT_OS == OperatingSystem .WINDOWS ) {
229
+ LOG .info ("Processor Identifier: " + System .getenv ("PROCESSOR_IDENTIFIER" ));
230
+ }
231
+ LOG .info ("System Architecture: " + Architecture .SYSTEM_ARCH .getDisplayName ());
232
+ LOG .info ("Java Architecture: " + Architecture .CURRENT_ARCH .getDisplayName ());
230
233
LOG .info ("Java Version: " + System .getProperty ("java.version" ) + ", " + System .getProperty ("java.vendor" ));
231
234
LOG .info ("Java VM Version: " + System .getProperty ("java.vm.name" ) + " (" + System .getProperty ("java.vm.info" ) + "), " + System .getProperty ("java.vm.vendor" ));
232
235
LOG .info ("Java Home: " + System .getProperty ("java.home" ));
@@ -245,7 +248,6 @@ public static void main(String[] args) {
245
248
LOG .info ("XDG Session Type: " + System .getenv ("XDG_SESSION_TYPE" ));
246
249
LOG .info ("XDG Current Desktop: " + System .getenv ("XDG_CURRENT_DESKTOP" ));
247
250
}
248
-
249
251
launch (Launcher .class , args );
250
252
} catch (Throwable e ) { // Fucking JavaFX will suppress the exception and will break our crash reporter.
251
253
CRASH_REPORTER .uncaughtException (Thread .currentThread (), e );
Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ public String getDisplayText() {
43
43
stackTrace + "\n \n " +
44
44
"-- System Details --\n " +
45
45
" Operating System: " + OperatingSystem .SYSTEM_NAME + ' ' + OperatingSystem .SYSTEM_VERSION + "\n " +
46
- " System Architecture: " + Architecture .SYSTEM_ARCH_NAME + "\n " +
47
- " Java Architecture: " + Architecture .CURRENT_ARCH_NAME + "\n " +
46
+ " System Architecture: " + Architecture .SYSTEM_ARCH . getDisplayName () + "\n " +
47
+ " Java Architecture: " + Architecture .CURRENT_ARCH . getDisplayName () + "\n " +
48
48
" Java Version: " + System .getProperty ("java.version" ) + ", " + System .getProperty ("java.vendor" ) + "\n " +
49
49
" Java VM Version: " + System .getProperty ("java.vm.name" ) + " (" + System .getProperty ("java.vm.info" ) + "), " + System .getProperty ("java.vm.vendor" ) + "\n " +
50
50
" JVM Max Memory: " + Runtime .getRuntime ().maxMemory () + "\n " +
Original file line number Diff line number Diff line change @@ -85,8 +85,6 @@ public boolean isX86() {
85
85
return this == X86 || this == X86_64 ;
86
86
}
87
87
88
- public static final String CURRENT_ARCH_NAME ;
89
- public static final String SYSTEM_ARCH_NAME ;
90
88
public static final Architecture CURRENT_ARCH ;
91
89
public static final Architecture SYSTEM_ARCH ;
92
90
@@ -192,8 +190,7 @@ public static Architecture parseArchName(String value) {
192
190
}
193
191
194
192
static {
195
- CURRENT_ARCH_NAME = System .getProperty ("os.arch" );
196
- CURRENT_ARCH = parseArchName (CURRENT_ARCH_NAME );
193
+ CURRENT_ARCH = parseArchName (System .getProperty ("os.arch" ));
197
194
198
195
String sysArchName = null ;
199
196
if (OperatingSystem .CURRENT_OS == OperatingSystem .WINDOWS ) {
@@ -219,12 +216,6 @@ public static Architecture parseArchName(String value) {
219
216
}
220
217
221
218
Architecture sysArch = parseArchName (sysArchName );
222
- if (sysArch == UNKNOWN ) {
223
- SYSTEM_ARCH_NAME = CURRENT_ARCH_NAME ;
224
- SYSTEM_ARCH = CURRENT_ARCH ;
225
- } else {
226
- SYSTEM_ARCH_NAME = sysArchName ;
227
- SYSTEM_ARCH = sysArch ;
228
- }
219
+ SYSTEM_ARCH = sysArch == UNKNOWN ? CURRENT_ARCH : sysArch ;
229
220
}
230
221
}
You can’t perform that action at this time.
0 commit comments