28#include <boost/version.hpp>
42#include <Standard_Version.hxx>
44#if defined( KICAD_SPICE )
45#include <ngspice/sharedspice.h>
51#define INCLUDE_KICAD_VERSION
52#include <kicad_build_version.h>
53#undef INCLUDE_KICAD_VERSION
57 wxPlatformInfo platform;
61#if defined( __WINDOWS__ ) && wxCHECK_VERSION( 3, 1, 5 )
62 return platform.GetBitnessName();
63#elif wxCHECK_VERSION( 3, 1, 6 )
64 return platform.GetBitnessName();
66 return platform.GetArchName();
73 return !!KICAD_IS_NIGHTLY;
86 wxString msg =
wxString::Format( wxT(
"%s %s" ), wxT( __DATE__ ), wxT( __TIME__ ) );
93 wxString msg =
wxString::Format( wxT(
"%s" ), wxT( KICAD_SEMANTIC_VERSION ) );
100 wxString msg =
wxString::Format( wxT(
"%s" ), wxT( KICAD_MAJOR_MINOR_VERSION ) );
114 wxString msg =
wxString::Format( wxT(
"%s" ), wxT( KICAD_MAJOR_MINOR_PATCH_VERSION ) );
120 static std::tuple<int, int, int> retval = KICAD_MAJOR_MINOR_PATCH_TUPLE;
131 wxString eol = aHtml ?
"<br>" :
"\n";
134 wxString indent4 = aHtml ?
" " :
"\t";
136#define ON "ON" << eol
137#define OFF "OFF" << eol
149 wxPlatformInfo platform;
150 aMsg <<
"Application: " << aTitle;
151 #if wxCHECK_VERSION( 3, 1, 6 )
152 aMsg <<
" " << wxGetCpuArchitectureName() <<
" on " << wxGetNativeCpuArchitectureName();
153 #elif defined( KICAD_BUILD_ARCH_X64 )
155 #elif defined( KICAD_BUILD_ARCH_X86 )
157 #elif defined( KICAD_BUILD_ARCH_ARM )
158 aMsg <<
" (ARM 32-bit)";
159 #elif defined( KICAD_BUILD_ARCH_ARM64 )
160 aMsg <<
" (ARM 64-bit)";
166 aMsg <<
"Version: " << version << eol << eol;
167 aMsg <<
"Libraries:" << eol;
169 aMsg << indent4 << wxGetLibraryVersionInfo().GetVersionString() << eol;
182 << wxGetLinuxDistributionInfo().Description <<
", "
184 << wxGetOsDescription() <<
", "
187 << platform.GetEndiannessName() <<
", "
188 << platform.GetPortIdName();
191 aMsg <<
", " << wxGetenv(
"XDG_SESSION_DESKTOP" )
192 <<
", " << wxGetenv(
"XDG_SESSION_TYPE" );
199 aMsg <<
"Build Info:" << eol;
203 aMsg << indent4 <<
"wxWidgets: " << wxVERSION_NUM_DOT_STRING <<
" (";
204 aMsg << __WX_BO_UNICODE __WX_BO_STL __WX_BO_WXWIN_COMPAT_2_8
")";
210 major = wxPlatformInfo().Get().GetToolkitMajorVersion();
211 minor = wxPlatformInfo().Get().GetToolkitMinorVersion();
212 aMsg <<
" GTK+ " << major <<
"." << minor;
217 aMsg << indent4 <<
"Boost: " << ( BOOST_VERSION / 100000 ) << wxT(
"." )
218 << ( BOOST_VERSION / 100 % 1000 ) << wxT(
"." )
219 << ( BOOST_VERSION % 100 ) << eol;
221 aMsg << indent4 <<
"OCC: " << OCC_VERSION_COMPLETE << eol;
224#if defined( KICAD_SPICE )
225#if defined( NGSPICE_BUILD_VERSION )
226 aMsg << indent4 <<
"ngspice: " << NGSPICE_BUILD_VERSION << eol;
227#elif defined( NGSPICE_HAVE_CONFIG_H )
228 #undef HAVE_STRNCASECMP
229 #include <ngspice/config.h>
231#elif defined( NGSPICE_PACKAGE_VERSION )
232 aMsg << indent4 <<
"ngspice: " << NGSPICE_PACKAGE_VERSION << eol;
234 aMsg << indent4 <<
"ngspice: " <<
"unknown" << eol;
238 aMsg << indent4 <<
"Compiler: ";
239#if defined(__clang__)
240 aMsg <<
"Clang " << __clang_major__ <<
"." << __clang_minor__ <<
"." << __clang_patchlevel__;
241#elif defined(__GNUG__)
242 aMsg <<
"GCC " << __GNUC__ <<
"." << __GNUC_MINOR__ <<
"." << __GNUC_PATCHLEVEL__;
243#elif defined(_MSC_VER)
244 aMsg <<
"Visual C++ " << _MSC_VER;
245#elif defined(__INTEL_COMPILER)
246 aMsg <<
"Intel C++ " << __INTEL_COMPILER;
248 aMsg <<
"Other Compiler ";
251#if defined(__GXX_ABI_VERSION)
252 aMsg <<
" with C++ ABI " << __GXX_ABI_VERSION << eol;
254 aMsg <<
" without C++ ABI" << eol;
260 aMsg <<
"Build settings:" << eol;
263 aMsg << indent4 <<
"KICAD_USE_EGL=" <<
ON;
266 aMsg << indent4 <<
"KICAD_SPICE=";
274 aMsg << indent4 <<
"KICAD_STDLIB_DEBUG=";
275#ifdef KICAD_STDLIB_DEBUG
279 aMsg << indent4 <<
"KICAD_STDLIB_LIGHT_DEBUG=";
280#ifdef KICAD_STDLIB_LIGHT_DEBUG
287 aMsg << indent4 <<
"KICAD_SANITIZE_ADDRESS=";
288#ifdef KICAD_SANITIZE_ADDRESS
294 aMsg << indent4 <<
"KICAD_SANITIZE_THREADS=";
295#ifdef KICAD_SANITIZE_THREADS
wxString GetMajorMinorVersion()
Get only the major and minor version in a string major.minor.
wxString GetVersionInfoData(const wxString &aTitle, bool aHtml, bool aBrief)
Create a version info string for bug reports and the about dialog.
wxString GetCommitHash()
Get the commit hash as a string.
std::string GetCurlLibVersion()
std::string GetKicadCurlVersion()
wxString GetMajorMinorPatchVersion()
Get the major, minor and patch version in a string major.minor.patch This is extracted by CMake from ...
const std::tuple< int, int, int > & GetMajorMinorPatchTuple()
Get the build version numbers as a tuple.
wxString GetBuildVersion()
Get the full KiCad version string.
wxString GetSemanticVersion()
Get the semantic version string for KiCad defined inside the KiCadVersion.cmake file in the variable ...
wxString GetPlatformGetBitnessName()
bool IsNightlyVersion()
Check if the build is meant to be nightly.
wxString GetBuildDate()
Get the build date as a string.
static wxString FreeTypeVersion()
static wxString FontConfigVersion()
static wxString HarfBuzzVersion()
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
< Package version metadata Package metadata