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() << eol;
193 wxString osDescription;
196 osDescription = wxGetLinuxDistributionInfo().Description;
202 if( osDescription.empty() )
203 osDescription = wxGetOsDescription();
210 << osDescription <<
", "
212 << wxPlatformInfo().GetEndiannessName() <<
", "
213 << wxPlatformInfo().GetPortIdName();
217 if( wxTheApp && wxTheApp->IsGUI() )
221 switch( wxGetDisplayInfo().type )
223 case wxDisplayX11: aMsg <<
"X11";
break;
224 case wxDisplayWayland: aMsg <<
"Wayland";
break;
225 case wxDisplayNone: aMsg <<
"None";
break;
226 default: aMsg <<
"Unknown";
230 aMsg <<
", " << wxGetenv(
"XDG_SESSION_DESKTOP" )
231 <<
", " << wxGetenv(
"XDG_SESSION_TYPE" );
248 aMsg << eol <<
"OpenGL: " << glMsg;
254 aMsg <<
"Build Info:" << eol;
258 aMsg << indent4 <<
"wxWidgets: " << wxVERSION_NUM_DOT_STRING <<
" (";
259 aMsg << __WX_BO_UNICODE __WX_BO_STL;
262#if wxCHECK_VERSION( 3, 3, 0 )
263 aMsg << __WX_BO_WXWIN_COMPAT_3_0
")";
265 aMsg << __WX_BO_WXWIN_COMPAT_2_8
")";
275 major = wxPlatformInfo().GetToolkitMajorVersion();
276 minor = wxPlatformInfo().GetToolkitMinorVersion();
277 aMsg <<
" GTK+ " << major <<
"." << minor;
283 aMsg << indent4 <<
"Boost: " << ( BOOST_VERSION / 100000 ) << wxT(
"." )
284 << ( BOOST_VERSION / 100 % 1000 ) << wxT(
"." )
285 << ( BOOST_VERSION % 100 ) << eol;
287 aMsg << indent4 <<
"OCC: " << OCC_VERSION_COMPLETE << eol;
290#if defined( NGSPICE_BUILD_VERSION )
291 aMsg << indent4 <<
"ngspice: " << NGSPICE_BUILD_VERSION << eol;
292#elif defined( NGSPICE_HAVE_CONFIG_H )
293 #undef HAVE_STRNCASECMP
294 #include <ngspice/config.h>
296#elif defined( NGSPICE_PACKAGE_VERSION )
297 aMsg << indent4 <<
"ngspice: " << NGSPICE_PACKAGE_VERSION << eol;
299 aMsg << indent4 <<
"ngspice: " <<
"unknown" << eol;
302 aMsg << indent4 <<
"Compiler: ";
303#if defined(__clang__)
304 aMsg <<
"Clang " << __clang_major__ <<
"." << __clang_minor__ <<
"." << __clang_patchlevel__;
305#elif defined(__GNUG__)
306 aMsg <<
"GCC " << __GNUC__ <<
"." << __GNUC_MINOR__ <<
"." << __GNUC_PATCHLEVEL__;
307#elif defined(_MSC_VER)
308 aMsg <<
"Visual C++ " << _MSC_VER;
309#elif defined(__INTEL_COMPILER)
310 aMsg <<
"Intel C++ " << __INTEL_COMPILER;
312 aMsg <<
"Other Compiler ";
315#if defined(__GXX_ABI_VERSION)
316 aMsg <<
" with C++ ABI " << __GXX_ABI_VERSION << eol;
318 aMsg <<
" without C++ ABI" << eol;
322#if defined( KICAD_USE_EGL ) || ! defined( NDEBUG )
324 aMsg <<
"Build settings:" << eol;
328 aMsg << indent4 <<
"KICAD_USE_EGL=" <<
ON;
332 aMsg << indent4 <<
"KICAD_IPC_API=" <<
ON;
334 aMsg << indent4 <<
"KICAD_IPC_API=" <<
OFF;
337 aMsg << indent4 <<
"KICAD_USE_PCH=";
345 aMsg << indent4 <<
"KICAD_STDLIB_DEBUG=";
346#ifdef KICAD_STDLIB_DEBUG
350 aMsg << indent4 <<
"KICAD_STDLIB_LIGHT_DEBUG=";
351#ifdef KICAD_STDLIB_LIGHT_DEBUG
358 aMsg << indent4 <<
"KICAD_SANITIZE_ADDRESS=";
359#ifdef KICAD_SANITIZE_ADDRESS
365 aMsg << indent4 <<
"KICAD_SANITIZE_THREADS=";
366#ifdef KICAD_SANITIZE_THREADS
373 wxLocale* locale = wxGetLocale();
378 aMsg <<
"Locale: " << eol;
379 aMsg << indent4 <<
"Lang: " << locale->GetCanonicalName() << eol;
380 aMsg << indent4 <<
"Enc: " << locale->GetSystemEncodingName() << eol;
381 aMsg << indent4 <<
"Num: "
382 << wxString::Format(
"%d%s%.1f", 1,
383 locale->GetInfo( wxLocaleInfo::wxLOCALE_THOUSANDS_SEP ), 234.5 )
386 wxString testStr( wxS(
"кΩ丈" ) );
387 wxString expectedUtf8Hex( wxS(
"D0BACEA9E4B888" ) );
388 wxString sysHex, utf8Hex;
390 const char* asChar = testStr.c_str().AsChar();
391 size_t length = strlen( asChar );
393 for(
size_t i = 0; i < length; i++ )
394 sysHex << wxString::Format(
"%02X", (
unsigned int) (uint8_t) asChar[i] );
397 const char* asChar = testStr.utf8_str().data();
398 size_t length = strlen( asChar );
400 for(
size_t i = 0; i < length; i++ )
401 utf8Hex << wxString::Format(
"%02X", (
unsigned int) (uint8_t) asChar[i] );
404 aMsg << indent4 <<
"Encoded " << testStr <<
": " << sysHex <<
" (sys), " << utf8Hex
407 wxASSERT_MSG( utf8Hex == expectedUtf8Hex,
408 wxString::Format(
"utf8_str string %s encoding bad result: %s, expected "
409 "%s, system enc %s, lang %s",
410 testStr, utf8Hex, expectedUtf8Hex,
411 locale->GetSystemEncodingName(),
412 locale->GetCanonicalName() ) );