Commit b2745c4b authored by Wayne Stambaugh's avatar Wayne Stambaugh

Unify platform information code in about dialog and version information.

parent 4ebe4714
...@@ -551,7 +551,7 @@ static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE() ...@@ -551,7 +551,7 @@ static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE()
" (release," " (release,"
#endif #endif
__WX_BO_UNICODE __ABI_VERSION __BO_COMPILER __WX_BO_STL __WX_BO_UNICODE __ABI_VERSION __BO_COMPILER __WX_BO_STL
__WX_BO_WXWIN_COMPAT_2_4 __WX_BO_WXWIN_COMPAT_2_6 ")" __WX_BO_WXWIN_COMPAT_2_6 __WX_BO_WXWIN_COMPAT_2_8 ")"
; ;
} }
...@@ -572,9 +572,9 @@ void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event ) ...@@ -572,9 +572,9 @@ void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event )
tmp = wxT( "Application: " ) + Pgm().App().GetAppName() + wxT( "\n" ); tmp = wxT( "Application: " ) + Pgm().App().GetAppName() + wxT( "\n" );
tmp << wxT( "Version: " ) << GetBuildVersion() tmp << wxT( "Version: " ) << GetBuildVersion()
#ifdef DEBUG #ifdef DEBUG
<< wxT( " Debug" ) << wxT( " debug" )
#else #else
<< wxT( " Release" ) << wxT( " release" )
#endif #endif
<< wxT( " build\n" ); << wxT( " build\n" );
tmp << wxT( "wxWidgets: Version " ) << FROM_UTF8( wxVERSION_NUM_DOT_STRING ) tmp << wxT( "wxWidgets: Version " ) << FROM_UTF8( wxVERSION_NUM_DOT_STRING )
...@@ -632,7 +632,7 @@ void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event ) ...@@ -632,7 +632,7 @@ void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event )
tmp << wxT( "OFF\n" ); tmp << wxT( "OFF\n" );
#endif #endif
wxMessageBox( tmp, _("Version Information (copied to the clipboard)") ); wxMessageBox( tmp, _( "Version Information (copied to the clipboard)" ) );
wxTheClipboard->SetData( new wxTextDataObject( tmp ) ); wxTheClipboard->SetData( new wxTextDataObject( tmp ) );
wxTheClipboard->Close(); wxTheClipboard->Close();
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <aboutinfo.h> #include <aboutinfo.h>
#include <wx/aboutdlg.h> #include <wx/aboutdlg.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <boost/version.hpp>
/* Used icons: /* Used icons:
...@@ -50,7 +51,7 @@ static wxString HtmlNewline( const unsigned int amount = 1 ); ...@@ -50,7 +51,7 @@ static wxString HtmlNewline( const unsigned int amount = 1 );
/** /**
* Initializes the <code>AboutAppInfo</code> object with applicaion specific information. * Initializes the <code>AboutAppInfo</code> object with application specific information.
* *
* This the object which holds all information about the application * This the object which holds all information about the application
*/ */
...@@ -79,7 +80,14 @@ static void InitKiCadAboutNew( AboutAppInfo& info ) ...@@ -79,7 +80,14 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
/* KiCad build version */ /* KiCad build version */
wxString version; wxString version;
version << wxT( "Build: " ) << GetBuildVersion(); version << wxT( "Version: " ) << GetBuildVersion()
#ifdef DEBUG
<< wxT( ", debug" )
#else
<< wxT( ", release" )
#endif
<< wxT( " build" );
info.SetBuildVersion( version ); info.SetBuildVersion( version );
/* wxWidgets version */ /* wxWidgets version */
...@@ -90,46 +98,25 @@ static void InitKiCadAboutNew( AboutAppInfo& info ) ...@@ -90,46 +98,25 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
<< wxMINOR_VERSION << wxT( "." ) << wxMINOR_VERSION << wxT( "." )
<< wxRELEASE_NUMBER << wxRELEASE_NUMBER
/* Unicode or Ansi version */ /* Unicode or ANSI version */
#if wxUSE_UNICODE #if wxUSE_UNICODE
<< wxT( " Unicode " ); << wxT( " Unicode " );
#else #else
<< wxT( " Ansi " ); << wxT( " ANSI " );
#endif #endif
libVersion << wxT( "and boost C++ libraries" ); // Just in case someone builds KiCad with the platform native of Boost instead of
// the version included with the KiCad source.
libVersion << wxT( "\n" ); libVersion << wxT( "and Boost " ) << ( BOOST_VERSION / 100000 ) << wxT( "." )
<< ( BOOST_VERSION / 100 % 1000 ) << wxT( "." ) << ( BOOST_VERSION % 100 )
/* Operating System Information */ << wxT( "\n" );
#if defined __WIN64__
libVersion << wxT( "on 64 Bits Windows" );
# elif defined __WINDOWS__ // Operating System Information
libVersion << wxT( "on 32 Bits Windows" );
/* Check for wxMAC */ wxPlatformInfo platformInfo;
# elif defined __WXMAC__
libVersion << wxT( "on Macintosh" );
/* Linux 64 bits */ libVersion << wxT( "Platform: " ) << wxGetOsDescription() << wxT( ", " )
# elif defined _LP64 && __LINUX__ << platformInfo.GetArchName();
libVersion << wxT( "on 64 Bits GNU/Linux" );
/* Linux 32 bits */
# elif defined __LINUX__
libVersion << wxT( "on 32 Bits GNU/Linux" );
/* OpenBSD */
# elif defined __OpenBSD__
libVersion << wxT( "on OpenBSD" );
/* FreeBSD */
# elif defined __FreeBSD__
libVersion << wxT( "on FreeBSD" );
#endif
info.SetLibVersion( libVersion ); info.SetLibVersion( libVersion );
...@@ -153,7 +140,7 @@ static void InitKiCadAboutNew( AboutAppInfo& info ) ...@@ -153,7 +140,7 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
description << wxT( "<p>" ); description << wxT( "<p>" );
description << wxT( "<b><u>" ) << _( "KiCad on the web" ) << wxT( "</u></b>" ); // bold & underlined font for caption description << wxT( "<b><u>" ) << _( "KiCad on the web" ) << wxT( "</u></b>" ); // bold & underlined font for caption
// bulletet list with some http links // bullet-ed list with some http links
description << wxT( "<ul>" ); description << wxT( "<ul>" );
description << wxT( "<li>" ) << HtmlHyperlink( wxT( description << wxT( "<li>" ) << HtmlHyperlink( wxT(
"http://iut-tice.ujf-grenoble.fr/kicad" ), "http://iut-tice.ujf-grenoble.fr/kicad" ),
...@@ -175,7 +162,7 @@ static void InitKiCadAboutNew( AboutAppInfo& info ) ...@@ -175,7 +162,7 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
description << wxT( "<p>" ); description << wxT( "<p>" );
description << wxT( "<b><u>" ) << _( "Contribute to KiCad" ) << wxT( "</u></b>" ); // bold & underlined font caption description << wxT( "<b><u>" ) << _( "Contribute to KiCad" ) << wxT( "</u></b>" ); // bold & underlined font caption
// bulletet list with some http links // bullet-ed list with some http links
description << wxT( "<ul>" ); description << wxT( "<ul>" );
description << wxT( "<li>" ) << description << wxT( "<li>" ) <<
HtmlHyperlink( wxT( "https://bugs.launchpad.net/kicad" ), HtmlHyperlink( wxT( "https://bugs.launchpad.net/kicad" ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment