151 wxString eol = aHtml ?
"<br>" :
"\n";
154 wxString indent4 = aHtml ?
" " :
"\t";
156#define ON "ON" << eol
157#define OFF "OFF" << eol
169 aMsg <<
"Application: " << aTitle;
170 aMsg <<
" " << wxGetCpuArchitectureName() <<
" on " << wxGetNativeCpuArchitectureName();
175 aMsg <<
"Version: " << version << eol << eol;
176 aMsg <<
"Libraries:" << eol;
178 aMsg << indent4 << wxGetLibraryVersionInfo().GetVersionString() <<
" ";
181 #if wxCHECK_VERSION( 3, 3, 2 )
182 #if wxHAS_EGL && wxHAS_GLX
190 #if wxUSE_GLCANVAS_EGL
209 wxString osDescription;
212 osDescription = wxGetLinuxDistributionInfo().Description;
218 if( osDescription.empty() )
219 osDescription = wxGetOsDescription();
226 << osDescription <<
", "
228 << wxPlatformInfo().GetEndiannessName() <<
", "
229 << wxPlatformInfo().GetPortIdName();
233 if( wxTheApp && wxTheApp->IsGUI() )
237 switch( wxGetDisplayInfo().type )
239 case wxDisplayX11: aMsg <<
"X11";
break;
240 case wxDisplayWayland: aMsg <<
"Wayland";
break;
241 case wxDisplayNone: aMsg <<
"None";
break;
242 default: aMsg <<
"Unknown";
246 aMsg <<
", " << wxGetenv(
"XDG_SESSION_TYPE" )
247 <<
", " << wxGetenv(
"XDG_CURRENT_DESKTOP" )
248 <<
", " << wxGetenv(
"XDG_SESSION_DESKTOP" );
265 aMsg << eol <<
"OpenGL: " << glMsg;
271 aMsg <<
"Build Info:" << eol;
275 aMsg << indent4 <<
"wxWidgets: " << wxVERSION_NUM_DOT_STRING <<
" (";
276 aMsg << __WX_BO_UNICODE __WX_BO_STL;
279#if wxCHECK_VERSION( 3, 3, 0 )
280 aMsg << __WX_BO_WXWIN_COMPAT_3_0
")";
282 aMsg << __WX_BO_WXWIN_COMPAT_2_8
")";
292 major = wxPlatformInfo().GetToolkitMajorVersion();
293 minor = wxPlatformInfo().GetToolkitMinorVersion();
294 aMsg <<
" GTK+ " << major <<
"." << minor;
300 aMsg << indent4 <<
"Boost: " << ( BOOST_VERSION / 100000 ) << wxT(
"." )
301 << ( BOOST_VERSION / 100 % 1000 ) << wxT(
"." )
302 << ( BOOST_VERSION % 100 ) << eol;
304 aMsg << indent4 <<
"OCC: " << OCC_VERSION_COMPLETE << eol;
307#if defined( NGSPICE_BUILD_VERSION )
308 aMsg << indent4 <<
"ngspice: " << NGSPICE_BUILD_VERSION << eol;
309#elif defined( NGSPICE_HAVE_CONFIG_H )
310 #undef HAVE_STRNCASECMP
311 #include <ngspice/config.h>
313#elif defined( NGSPICE_PACKAGE_VERSION )
314 aMsg << indent4 <<
"ngspice: " << NGSPICE_PACKAGE_VERSION << eol;
316 aMsg << indent4 <<
"ngspice: " <<
"unknown" << eol;
319 aMsg << indent4 <<
"Compiler: ";
320#if defined(__clang__)
321 aMsg <<
"Clang " << __clang_major__ <<
"." << __clang_minor__ <<
"." << __clang_patchlevel__;
322#elif defined(__GNUG__)
323 aMsg <<
"GCC " << __GNUC__ <<
"." << __GNUC_MINOR__ <<
"." << __GNUC_PATCHLEVEL__;
324#elif defined(_MSC_VER)
325 aMsg <<
"Visual C++ " << _MSC_VER;
326#elif defined(__INTEL_COMPILER)
327 aMsg <<
"Intel C++ " << __INTEL_COMPILER;
329 aMsg <<
"Other Compiler ";
332#if defined(__GXX_ABI_VERSION)
333 aMsg <<
" with C++ ABI " << __GXX_ABI_VERSION << eol;
335 aMsg <<
" without C++ ABI" << eol;
339#if !defined( NDEBUG )
341 aMsg <<
"Build settings:" << eol;
344 aMsg << indent4 <<
"KICAD_USE_PCH=";
352 aMsg << indent4 <<
"KICAD_STDLIB_DEBUG=";
353#ifdef KICAD_STDLIB_DEBUG
357 aMsg << indent4 <<
"KICAD_STDLIB_LIGHT_DEBUG=";
358#ifdef KICAD_STDLIB_LIGHT_DEBUG
365 aMsg << indent4 <<
"KICAD_SANITIZE_ADDRESS=";
366#ifdef KICAD_SANITIZE_ADDRESS
372 aMsg << indent4 <<
"KICAD_SANITIZE_THREADS=";
373#ifdef KICAD_SANITIZE_THREADS
380 wxLocale* locale = wxGetLocale();
385 aMsg <<
"Locale: " << eol;
386 aMsg << indent4 <<
"Lang: " << locale->GetCanonicalName() << eol;
387 aMsg << indent4 <<
"Enc: " << locale->GetSystemEncodingName() << eol;
388 aMsg << indent4 <<
"Num: "
389 << wxString::Format(
"%d%s%.1f", 1,
390 locale->GetInfo( wxLocaleInfo::wxLOCALE_THOUSANDS_SEP ), 234.5 )
393 wxString testStr( wxS(
"кΩ丈" ) );
394 wxString expectedUtf8Hex( wxS(
"D0BACEA9E4B888" ) );
395 wxString sysHex, utf8Hex;
397 const char* asChar = testStr.c_str().AsChar();
398 size_t length = strlen( asChar );
400 for(
size_t i = 0; i < length; i++ )
401 sysHex << wxString::Format(
"%02X", (
unsigned int) (uint8_t) asChar[i] );
404 const char* asChar = testStr.utf8_str().data();
405 size_t length = strlen( asChar );
407 for(
size_t i = 0; i < length; i++ )
408 utf8Hex << wxString::Format(
"%02X", (
unsigned int) (uint8_t) asChar[i] );
411 aMsg << indent4 <<
"Encoded " << testStr <<
": " << sysHex <<
" (sys), " << utf8Hex
414 wxASSERT_MSG( utf8Hex == expectedUtf8Hex,
415 wxString::Format(
"utf8_str string %s encoding bad result: %s, expected "
416 "%s, system enc %s, lang %s",
417 testStr, utf8Hex, expectedUtf8Hex,
418 locale->GetSystemEncodingName(),
419 locale->GetCanonicalName() ) );