362 int buildNumber = 0; 363 364 if (sprops.line_separator) { 365 return &sprops; 366 } 367 368 /* AWT properties */ 369 sprops.awt_toolkit = "sun.awt.windows.WToolkit"; 370 371 /* tmp dir */ 372 { 373 WCHAR tmpdir[MAX_PATH + 1]; 374 /* we might want to check that this succeed */ 375 GetTempPathW(MAX_PATH + 1, tmpdir); 376 sprops.tmp_dir = _wcsdup(tmpdir); 377 } 378 379 /* Java2D properties */ 380 sprops.graphics_env = "sun.awt.Win32GraphicsEnvironment"; 381 382 { /* This is used only for debugging of font problems. */ 383 WCHAR *path = _wgetenv(L"JAVA2D_FONTPATH"); 384 sprops.font_dir = (path != NULL) ? _wcsdup(path) : NULL; 385 } 386 387 /* OS properties */ 388 { 389 char buf[100]; 390 boolean is_workstation; 391 boolean is_64bit; 392 DWORD platformId; 393 { 394 OSVERSIONINFOEX ver; 395 ver.dwOSVersionInfoSize = sizeof(ver); 396 GetVersionEx((OSVERSIONINFO *) &ver); 397 majorVersion = ver.dwMajorVersion; 398 minorVersion = ver.dwMinorVersion; 399 /* distinguish Windows Server 2016 and 2019 by build number */ 400 buildNumber = ver.dwBuildNumber; 401 is_workstation = (ver.wProductType == VER_NT_WORKSTATION); 402 platformId = ver.dwPlatformId; 403 sprops.patch_level = _strdup(ver.szCSDVersion); 404 } 405 406 { | 362 int buildNumber = 0; 363 364 if (sprops.line_separator) { 365 return &sprops; 366 } 367 368 /* AWT properties */ 369 sprops.awt_toolkit = "sun.awt.windows.WToolkit"; 370 371 /* tmp dir */ 372 { 373 WCHAR tmpdir[MAX_PATH + 1]; 374 /* we might want to check that this succeed */ 375 GetTempPathW(MAX_PATH + 1, tmpdir); 376 sprops.tmp_dir = _wcsdup(tmpdir); 377 } 378 379 /* Java2D properties */ 380 sprops.graphics_env = "sun.awt.Win32GraphicsEnvironment"; 381 382 /* OS properties */ 383 { 384 char buf[100]; 385 boolean is_workstation; 386 boolean is_64bit; 387 DWORD platformId; 388 { 389 OSVERSIONINFOEX ver; 390 ver.dwOSVersionInfoSize = sizeof(ver); 391 GetVersionEx((OSVERSIONINFO *) &ver); 392 majorVersion = ver.dwMajorVersion; 393 minorVersion = ver.dwMinorVersion; 394 /* distinguish Windows Server 2016 and 2019 by build number */ 395 buildNumber = ver.dwBuildNumber; 396 is_workstation = (ver.wProductType == VER_NT_WORKSTATION); 397 platformId = ver.dwPlatformId; 398 sprops.patch_level = _strdup(ver.szCSDVersion); 399 } 400 401 { |