KiCad PCB EDA Suite
Loading...
Searching...
No Matches
build_version.h File Reference
#include <kicommon.h>
#include <tuple>

Go to the source code of this file.

Functions

KICOMMON_API wxString GetBuildVersion ()
 Get the full KiCad version string.
 
KICOMMON_API wxString GetBaseVersion ()
 Get the KiCad version string without the information added by the packagers.
 
KICOMMON_API wxString GetPlatformGetBitnessName ()
 
KICOMMON_API wxString GetSemanticVersion ()
 Get the semantic version string for KiCad defined inside the KiCadVersion.cmake file in the variable KICAD_SEMANTIC_VERSION.
 
KICOMMON_API wxString GetMajorMinorVersion ()
 Get only the major and minor version in a string major.minor.
 
KICOMMON_API wxString GetMajorMinorPatchVersion ()
 Get the major, minor and patch version in a string major.minor.patch This is extracted by CMake from the KICAD_SEMANTIC_VERSION variable.
 
KICOMMON_API wxString GetBuildDate ()
 Get the build date as a string.
 
KICOMMON_API wxString GetCommitHash ()
 Get the commit hash as a string.
 
KICOMMON_API const std::tuple< int, int, int > & GetMajorMinorPatchTuple ()
 Get the build version numbers as a tuple.
 
KICOMMON_API bool IsNightlyVersion ()
 Check if the build is meant to be nightly.
 
KICOMMON_API wxString GetVersionInfoData (const wxString &aTitle, bool aHtml=false, bool aBrief=false)
 Create a version info string for bug reports and the about dialog.
 

Function Documentation

◆ GetBaseVersion()

KICOMMON_API wxString GetBaseVersion ( )

Get the KiCad version string without the information added by the packagers.

It is created by CMake in the KICAD_VERSION variable.

Returns
the base version string

Definition at line 74 of file build_version.cpp.

Referenced by DS_DRAW_ITEM_LIST::BuildFullText().

◆ GetBuildDate()

KICOMMON_API wxString GetBuildDate ( )

Get the build date as a string.

Returns
the build date string

Definition at line 81 of file build_version.cpp.

Referenced by buildKicadAboutBanner(), GetVersionInfoData(), and KICAD_CURL_EASY::KICAD_CURL_EASY().

◆ GetBuildVersion()

◆ GetCommitHash()

KICOMMON_API wxString GetCommitHash ( )

Get the commit hash as a string.

Returns
the commit hash string

Definition at line 102 of file build_version.cpp.

Referenced by CLI::VERSION_COMMAND::doPerform().

◆ GetMajorMinorPatchTuple()

KICOMMON_API const std::tuple< int, int, int > & GetMajorMinorPatchTuple ( )

Get the build version numbers as a tuple.

Returns
A tuple with three ints for major/minor/patch revisions

Definition at line 115 of file build_version.cpp.

Referenced by ENV_VAR::GetVersionedEnvVarName(), and API_HANDLER_COMMON::handleGetVersion().

◆ GetMajorMinorPatchVersion()

KICOMMON_API wxString GetMajorMinorPatchVersion ( )

Get the major, minor and patch version in a string major.minor.patch This is extracted by CMake from the KICAD_SEMANTIC_VERSION variable.

Returns
the major.minor.patch version as a string

Definition at line 109 of file build_version.cpp.

Referenced by DIALOG_UPDATE_NOTICE::DIALOG_UPDATE_NOTICE(), CLI::VERSION_COMMAND::doPerform(), PCB_IO_IPC2581::generateHistorySection(), ERC_REPORT::WriteJsonReport(), and DRC_REPORT::WriteJsonReport().

◆ GetMajorMinorVersion()

◆ GetPlatformGetBitnessName()

KICOMMON_API wxString GetPlatformGetBitnessName ( )
Returns
the bitness name string (like "Little endian")

Definition at line 54 of file build_version.cpp.

Referenced by buildKicadAboutBanner(), GetVersionInfoData(), and KICAD_CURL_EASY::KICAD_CURL_EASY().

◆ GetSemanticVersion()

KICOMMON_API wxString GetSemanticVersion ( )

Get the semantic version string for KiCad defined inside the KiCadVersion.cmake file in the variable KICAD_SEMANTIC_VERSION.

Returns
the semantic version string

Definition at line 88 of file build_version.cpp.

Referenced by UPDATE_MANAGER::CheckForUpdate(), and STEP_PCB_MODEL::WriteGLTF().

◆ GetVersionInfoData()

KICOMMON_API wxString GetVersionInfoData ( const wxString &  aTitle,
bool  aHtml = false,
bool  aBrief = false 
)

Create a version info string for bug reports and the about dialog.

Parameters
aTitleis the application title to include at the top of the report
aBrief= true to condense information for the bug report URL
aHtml= true to use a minimal HTML format, false for plan text
Returns
the version info string

Definition at line 123 of file build_version.cpp.

References KIFONT::VERSION_INFO::FontConfig(), KIFONT::VERSION_INFO::FreeType(), GetBuildDate(), GetBuildVersion(), GetCurlLibVersion(), GetKicadCurlVersion(), GetPlatformGetBitnessName(), KIFONT::VERSION_INFO::HarfBuzz(), KIPLATFORM::APP::IsOperatingSystemUnsupported(), OFF, and ON.

Referenced by DIALOG_ABOUT::createNotebooks(), CLI::VERSION_COMMAND::doPerform(), DIALOG_ABOUT::onCopyVersionInfo(), and COMMON_CONTROL::ReportBug().

◆ IsNightlyVersion()

KICOMMON_API bool IsNightlyVersion ( )

Check if the build is meant to be nightly.

Returns
true if running nightly build

Definition at line 61 of file build_version.cpp.

Referenced by DIALOG_ABOUT::DIALOG_ABOUT(), and EVT_MENU_RANGE().