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();
183#if wxUSE_GLCANVAS_EGL
197 wxString osDescription;
200 osDescription = wxGetLinuxDistributionInfo().Description;
206 if( osDescription.empty() )
207 osDescription = wxGetOsDescription();
214 << osDescription <<
", "
216 << wxPlatformInfo().GetEndiannessName() <<
", "
217 << wxPlatformInfo().GetPortIdName();
221 if( wxTheApp && wxTheApp->IsGUI() )
225 switch( wxGetDisplayInfo().type )
227 case wxDisplayX11: aMsg <<
"X11";
break;
228 case wxDisplayWayland: aMsg <<
"Wayland";
break;
229 case wxDisplayNone: aMsg <<
"None";
break;
230 default: aMsg <<
"Unknown";
234 aMsg <<
", " << wxGetenv(
"XDG_SESSION_DESKTOP" )
235 <<
", " << wxGetenv(
"XDG_SESSION_TYPE" );
252 aMsg << eol <<
"OpenGL: " << glMsg;
258 aMsg <<
"Build Info:" << eol;
262 aMsg << indent4 <<
"wxWidgets: " << wxVERSION_NUM_DOT_STRING <<
" (";
263 aMsg << __WX_BO_UNICODE __WX_BO_STL;
266#if wxCHECK_VERSION( 3, 3, 0 )
267 aMsg << __WX_BO_WXWIN_COMPAT_3_0
")";
269 aMsg << __WX_BO_WXWIN_COMPAT_2_8
")";
279 major = wxPlatformInfo().GetToolkitMajorVersion();
280 minor = wxPlatformInfo().GetToolkitMinorVersion();
281 aMsg <<
" GTK+ " << major <<
"." << minor;
287 aMsg << indent4 <<
"Boost: " << ( BOOST_VERSION / 100000 ) << wxT(
"." )
288 << ( BOOST_VERSION / 100 % 1000 ) << wxT(
"." )
289 << ( BOOST_VERSION % 100 ) << eol;
291 aMsg << indent4 <<
"OCC: " << OCC_VERSION_COMPLETE << eol;
294#if defined( NGSPICE_BUILD_VERSION )
295 aMsg << indent4 <<
"ngspice: " << NGSPICE_BUILD_VERSION << eol;
296#elif defined( NGSPICE_HAVE_CONFIG_H )
297 #undef HAVE_STRNCASECMP
298 #include <ngspice/config.h>
300#elif defined( NGSPICE_PACKAGE_VERSION )
301 aMsg << indent4 <<
"ngspice: " << NGSPICE_PACKAGE_VERSION << eol;
303 aMsg << indent4 <<
"ngspice: " <<
"unknown" << eol;
306 aMsg << indent4 <<
"Compiler: ";
307#if defined(__clang__)
308 aMsg <<
"Clang " << __clang_major__ <<
"." << __clang_minor__ <<
"." << __clang_patchlevel__;
309#elif defined(__GNUG__)
310 aMsg <<
"GCC " << __GNUC__ <<
"." << __GNUC_MINOR__ <<
"." << __GNUC_PATCHLEVEL__;
311#elif defined(_MSC_VER)
312 aMsg <<
"Visual C++ " << _MSC_VER;
313#elif defined(__INTEL_COMPILER)
314 aMsg <<
"Intel C++ " << __INTEL_COMPILER;
316 aMsg <<
"Other Compiler ";
319#if defined(__GXX_ABI_VERSION)
320 aMsg <<
" with C++ ABI " << __GXX_ABI_VERSION << eol;
322 aMsg <<
" without C++ ABI" << eol;
326#if defined( KICAD_USE_EGL ) || ! defined( NDEBUG )
328 aMsg <<
"Build settings:" << eol;
332 aMsg << indent4 <<
"KICAD_USE_EGL=" <<
ON;
336 aMsg << indent4 <<
"KICAD_IPC_API=" <<
ON;
338 aMsg << indent4 <<
"KICAD_IPC_API=" <<
OFF;
341 aMsg << indent4 <<
"KICAD_USE_PCH=";
349 aMsg << indent4 <<
"KICAD_STDLIB_DEBUG=";
350#ifdef KICAD_STDLIB_DEBUG
354 aMsg << indent4 <<
"KICAD_STDLIB_LIGHT_DEBUG=";
355#ifdef KICAD_STDLIB_LIGHT_DEBUG
362 aMsg << indent4 <<
"KICAD_SANITIZE_ADDRESS=";
363#ifdef KICAD_SANITIZE_ADDRESS
369 aMsg << indent4 <<
"KICAD_SANITIZE_THREADS=";
370#ifdef KICAD_SANITIZE_THREADS
377 wxLocale* locale = wxGetLocale();
382 aMsg <<
"Locale: " << eol;
383 aMsg << indent4 <<
"Lang: " << locale->GetCanonicalName() << eol;
384 aMsg << indent4 <<
"Enc: " << locale->GetSystemEncodingName() << eol;
385 aMsg << indent4 <<
"Num: "
386 << wxString::Format(
"%d%s%.1f", 1,
387 locale->GetInfo( wxLocaleInfo::wxLOCALE_THOUSANDS_SEP ), 234.5 )
390 wxString testStr( wxS(
"кΩ丈" ) );
391 wxString expectedUtf8Hex( wxS(
"D0BACEA9E4B888" ) );
392 wxString sysHex, utf8Hex;
394 const char* asChar = testStr.c_str().AsChar();
395 size_t length = strlen( asChar );
397 for(
size_t i = 0; i < length; i++ )
398 sysHex << wxString::Format(
"%02X", (
unsigned int) (uint8_t) asChar[i] );
401 const char* asChar = testStr.utf8_str().data();
402 size_t length = strlen( asChar );
404 for(
size_t i = 0; i < length; i++ )
405 utf8Hex << wxString::Format(
"%02X", (
unsigned int) (uint8_t) asChar[i] );
408 aMsg << indent4 <<
"Encoded " << testStr <<
": " << sysHex <<
" (sys), " << utf8Hex
411 wxASSERT_MSG( utf8Hex == expectedUtf8Hex,
412 wxString::Format(
"utf8_str string %s encoding bad result: %s, expected "
413 "%s, system enc %s, lang %s",
414 testStr, utf8Hex, expectedUtf8Hex,
415 locale->GetSystemEncodingName(),
416 locale->GetCanonicalName() ) );