155 wxString eol = aHtml ?
"<br>" :
"\n";
158 wxString indent4 = aHtml ?
" " :
"\t";
160#define ON "ON" << eol
161#define OFF "OFF" << eol
173 aMsg <<
"Application: " << aTitle;
174 aMsg <<
" " << wxGetCpuArchitectureName() <<
" on " << wxGetNativeCpuArchitectureName();
179 aMsg <<
"Version: " << version << eol << eol;
180 aMsg <<
"Libraries:" << eol;
182 aMsg << indent4 << wxGetLibraryVersionInfo().GetVersionString() <<
" ";
185 #if wxCHECK_VERSION( 3, 3, 2 )
186 #if wxHAS_EGL && wxHAS_GLX
194 #if wxUSE_GLCANVAS_EGL
213 wxString osDescription;
216 osDescription = wxGetLinuxDistributionInfo().Description;
222 if( osDescription.empty() )
223 osDescription = wxGetOsDescription();
230 << osDescription <<
", "
232 << wxPlatformInfo().GetEndiannessName() <<
", "
233 << wxPlatformInfo().GetPortIdName();
237 if( wxTheApp && wxTheApp->IsGUI() )
241 switch( wxGetDisplayInfo().type )
243 case wxDisplayX11: aMsg <<
"X11";
break;
244 case wxDisplayWayland: aMsg <<
"Wayland";
break;
245 case wxDisplayNone: aMsg <<
"None";
break;
246 default: aMsg <<
"Unknown";
250 aMsg <<
", " << wxGetenv(
"XDG_SESSION_TYPE" )
251 <<
", " << wxGetenv(
"XDG_CURRENT_DESKTOP" )
252 <<
", " << wxGetenv(
"XDG_SESSION_DESKTOP" );
269 aMsg << eol <<
"OpenGL: " << glMsg;
275 aMsg <<
"Build Info:" << eol;
279 aMsg << indent4 <<
"wxWidgets: " << wxVERSION_NUM_DOT_STRING <<
" (";
280 aMsg << __WX_BO_UNICODE __WX_BO_STL;
283#if wxCHECK_VERSION( 3, 3, 0 )
284 aMsg << __WX_BO_WXWIN_COMPAT_3_0
")";
286 aMsg << __WX_BO_WXWIN_COMPAT_2_8
")";
296 major = wxPlatformInfo().GetToolkitMajorVersion();
297 minor = wxPlatformInfo().GetToolkitMinorVersion();
298 aMsg <<
" GTK+ " << major <<
"." << minor;
304 aMsg << indent4 <<
"Boost: " << ( BOOST_VERSION / 100000 ) << wxT(
"." )
305 << ( BOOST_VERSION / 100 % 1000 ) << wxT(
"." )
306 << ( BOOST_VERSION % 100 ) << eol;
308 aMsg << indent4 <<
"OCC: " << OCC_VERSION_COMPLETE << eol;
311#if defined( NGSPICE_BUILD_VERSION )
312 aMsg << indent4 <<
"ngspice: " << NGSPICE_BUILD_VERSION << eol;
313#elif defined( NGSPICE_HAVE_CONFIG_H )
314 #undef HAVE_STRNCASECMP
315 #include <ngspice/config.h>
317#elif defined( NGSPICE_PACKAGE_VERSION )
318 aMsg << indent4 <<
"ngspice: " << NGSPICE_PACKAGE_VERSION << eol;
320 aMsg << indent4 <<
"ngspice: " <<
"unknown" << eol;
323 aMsg << indent4 <<
"Compiler: ";
324#if defined(__clang__)
325 aMsg <<
"Clang " << __clang_major__ <<
"." << __clang_minor__ <<
"." << __clang_patchlevel__;
326#elif defined(__GNUG__)
327 aMsg <<
"GCC " << __GNUC__ <<
"." << __GNUC_MINOR__ <<
"." << __GNUC_PATCHLEVEL__;
328#elif defined(_MSC_VER)
329 aMsg <<
"Visual C++ " << _MSC_VER;
330#elif defined(__INTEL_COMPILER)
331 aMsg <<
"Intel C++ " << __INTEL_COMPILER;
333 aMsg <<
"Other Compiler ";
336#if defined(__GXX_ABI_VERSION)
337 aMsg <<
" with C++ ABI " << __GXX_ABI_VERSION << eol;
339 aMsg <<
" without C++ ABI" << eol;
343#if !defined( NDEBUG )
345 aMsg <<
"Build settings:" << eol;
349 aMsg << indent4 <<
"KICAD_IPC_API=" <<
ON;
351 aMsg << indent4 <<
"KICAD_IPC_API=" <<
OFF;
354 aMsg << indent4 <<
"KICAD_USE_PCH=";
362 aMsg << indent4 <<
"KICAD_STDLIB_DEBUG=";
363#ifdef KICAD_STDLIB_DEBUG
367 aMsg << indent4 <<
"KICAD_STDLIB_LIGHT_DEBUG=";
368#ifdef KICAD_STDLIB_LIGHT_DEBUG
375 aMsg << indent4 <<
"KICAD_SANITIZE_ADDRESS=";
376#ifdef KICAD_SANITIZE_ADDRESS
382 aMsg << indent4 <<
"KICAD_SANITIZE_THREADS=";
383#ifdef KICAD_SANITIZE_THREADS
390 wxLocale* locale = wxGetLocale();
395 aMsg <<
"Locale: " << eol;
396 aMsg << indent4 <<
"Lang: " << locale->GetCanonicalName() << eol;
397 aMsg << indent4 <<
"Enc: " << locale->GetSystemEncodingName() << eol;
398 aMsg << indent4 <<
"Num: "
399 << wxString::Format(
"%d%s%.1f", 1,
400 locale->GetInfo( wxLocaleInfo::wxLOCALE_THOUSANDS_SEP ), 234.5 )
403 wxString testStr( wxS(
"кΩ丈" ) );
404 wxString expectedUtf8Hex( wxS(
"D0BACEA9E4B888" ) );
405 wxString sysHex, utf8Hex;
407 const char* asChar = testStr.c_str().AsChar();
408 size_t length = strlen( asChar );
410 for(
size_t i = 0; i < length; i++ )
411 sysHex << wxString::Format(
"%02X", (
unsigned int) (uint8_t) asChar[i] );
414 const char* asChar = testStr.utf8_str().data();
415 size_t length = strlen( asChar );
417 for(
size_t i = 0; i < length; i++ )
418 utf8Hex << wxString::Format(
"%02X", (
unsigned int) (uint8_t) asChar[i] );
421 aMsg << indent4 <<
"Encoded " << testStr <<
": " << sysHex <<
" (sys), " << utf8Hex
424 wxASSERT_MSG( utf8Hex == expectedUtf8Hex,
425 wxString::Format(
"utf8_str string %s encoding bad result: %s, expected "
426 "%s, system enc %s, lang %s",
427 testStr, utf8Hex, expectedUtf8Hex,
428 locale->GetSystemEncodingName(),
429 locale->GetCanonicalName() ) );