Use a version string without the extra packaging info in drawing sheets.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17176


(cherry picked from commit c59fac4089)
This commit is contained in:
Alex Shvartzkop 2024-02-29 04:24:12 +03:00 committed by dsa-t
parent 39a0a81832
commit e71cbea7f8
4 changed files with 21 additions and 5 deletions

View File

@ -2,7 +2,7 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2015 Wayne Stambaugh <stambaughw@gmail.com>
# Copyright (C) 2015-2020 KiCad Developers, see AUTHORS.txt for contributors.
# Copyright (C) 2015-2024 KiCad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -72,6 +72,7 @@ set( _wvh_new_version_text
#endif
#define KICAD_COMMIT_HASH \"${KICAD_COMMIT_HASH}\"
#define KICAD_VERSION \"${KICAD_VERSION}\"
#define KICAD_VERSION_FULL \"${KICAD_VERSION_FULL}\"
#define KICAD_SEMANTIC_VERSION \"${KICAD_SEMANTIC_VERSION}\"
#define KICAD_MAJOR_VERSION \"${KICAD_MAJOR_VERSION}\"

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2015-2020 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2015-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -71,6 +71,13 @@ wxString GetBuildVersion()
}
wxString GetBaseVersion()
{
wxString msg = wxString::Format( wxT( "%s" ), wxT( KICAD_VERSION ) );
return msg;
}
wxString GetBuildDate()
{
wxString msg = wxString::Format( wxT( "%s %s" ), wxT( __DATE__ ), wxT( __TIME__ ) );

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
*
* This program is free software; you can redistribute it and/or
@ -121,7 +121,7 @@ wxString DS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
if( token->IsSameAs( wxT( "KICAD_VERSION" ) ) && PgmOrNull() )
{
*token = wxString::Format( wxT( "%s %s" ), productName, GetSemanticVersion() );
*token = wxString::Format( wxT( "%s %s" ), productName, GetBaseVersion() );
tokenUpdated = true;
}
else if( token->IsSameAs( wxT( "#" ) ) )

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.TXT for contributors.
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -40,6 +40,14 @@ class wxString;
*/
KICOMMON_API wxString GetBuildVersion();
/**
* Get the KiCad version string without the information added by the packagers.
* It is created by CMake in the KICAD_VERSION variable.
*
* @return the base version string
*/
KICOMMON_API wxString GetBaseVersion();
/**
* @return the bitness name string (like "Little endian")
*/