From 84a0e3286594560dc7d342aee0c00afac9889569 Mon Sep 17 00:00:00 2001 From: charras Date: Tue, 5 Jan 2010 08:48:49 +0000 Subject: [PATCH] fixed build problem for specctra.cpp stand alone. --- common/CMakeLists.txt | 1 + common/about_kicad.cpp | 22 +--------------------- common/common_plotGERBER_functions.cpp | 2 ++ common/worksheet.cpp | 1 + cvpcb/cvframe.cpp | 1 + cvpcb/cvpcb.cpp | 2 ++ cvpcb/init.cpp | 1 + cvpcb/savecmp.cpp | 2 ++ eeschema/backanno.cpp | 2 ++ eeschema/build_BOM.cpp | 2 ++ eeschema/eeredraw.cpp | 1 + eeschema/netform.cpp | 1 + gerbview/gerbview.cpp | 2 ++ include/build_version.h | 6 +++--- include/common.h | 1 - kicad/kicad.cpp | 2 ++ kicad/prjconfig.cpp | 2 ++ pcbnew/export_gencad.cpp | 2 ++ pcbnew/gen_modules_placefile.cpp | 2 ++ pcbnew/gendrill.cpp | 2 ++ pcbnew/ioascii.cpp | 2 ++ pcbnew/pcbnew.cpp | 8 ++++---- 22 files changed, 38 insertions(+), 29 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 95bfbffb9a..d38ecbdadb 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -12,6 +12,7 @@ set(COMMON_SRCS basicframe.cpp bezier_curves.cpp block_commande.cpp + build_version.cpp class_marker_base.cpp class_plotter.cpp class_undoredo_container.cpp diff --git a/common/about_kicad.cpp b/common/about_kicad.cpp index b14bf0f6d2..4b1e46fca4 100644 --- a/common/about_kicad.cpp +++ b/common/about_kicad.cpp @@ -7,29 +7,9 @@ #include "common.h" #include "appl_wxstruct.h" +#include "build_version.h" -#ifdef HAVE_SVN_VERSION -#include "version.h" // define the KICAD_BUILD_VERSION -#endif - -#ifndef KICAD_BUILD_VERSION -#define KICAD_BUILD_VERSION "(2010-01-04)" -#endif - -#define VERSION_STABILITY "unstable" - -/** Function GetBuildVersion() - * Return the build date and version - */ -wxString GetBuildVersion() -{ - wxString msg; - msg.Printf( wxT("%s-%s"), - wxT( KICAD_BUILD_VERSION ), wxT(VERSION_STABILITY)); - return msg; -} - /**********************************/ wxString SetMsg( const wxString& msg ) /**********************************/ diff --git a/common/common_plotGERBER_functions.cpp b/common/common_plotGERBER_functions.cpp index fa3b7fcb52..9a3094528a 100644 --- a/common/common_plotGERBER_functions.cpp +++ b/common/common_plotGERBER_functions.cpp @@ -12,6 +12,8 @@ #include "macros.h" #include "kicad_string.h" +#include "build_version.h" + /** function set_viewport * Set the plot offset for the current plotting diff --git a/common/worksheet.cpp b/common/worksheet.cpp index c74d3d5438..293ec18b7f 100644 --- a/common/worksheet.cpp +++ b/common/worksheet.cpp @@ -14,6 +14,7 @@ #include "appl_wxstruct.h" #include "worksheet.h" +#include "build_version.h" /* Must be defined in main applications: */ diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index e094773260..0080f0a879 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -16,6 +16,7 @@ #include "cvstruct.h" #include "dialog_cvpcb_config.h" +#include "build_version.h" #define FRAME_MIN_SIZE_X 450 #define FRAME_MIN_SIZE_Y 300 diff --git a/cvpcb/cvpcb.cpp b/cvpcb/cvpcb.cpp index 6840d744b0..01f66b96a0 100644 --- a/cvpcb/cvpcb.cpp +++ b/cvpcb/cvpcb.cpp @@ -15,6 +15,8 @@ #include "protos.h" #include "cvstruct.h" +#include "build_version.h" + #include diff --git a/cvpcb/init.cpp b/cvpcb/init.cpp index dd4158bdec..fdea865e0b 100644 --- a/cvpcb/init.cpp +++ b/cvpcb/init.cpp @@ -13,6 +13,7 @@ #include "protos.h" #include "cvstruct.h" +#include "build_version.h" /* * Set the module to the selected component diff --git a/cvpcb/savecmp.cpp b/cvpcb/savecmp.cpp index d30fd4631d..dfb66513e1 100644 --- a/cvpcb/savecmp.cpp +++ b/cvpcb/savecmp.cpp @@ -15,6 +15,8 @@ #include "protos.h" #include "cvstruct.h" +#include "build_version.h" + /* File header. */ char EnteteCmpMod[] = { "Cmp-Mod V01" }; diff --git a/eeschema/backanno.cpp b/eeschema/backanno.cpp index bc9f6b7551..85adffd464 100644 --- a/eeschema/backanno.cpp +++ b/eeschema/backanno.cpp @@ -13,6 +13,8 @@ #include "general.h" +#include "build_version.h" + /** function FillFootprintFieldForAllInstancesofComponent * Search for component "aReference", and place a Footprint in Footprint field diff --git a/eeschema/build_BOM.cpp b/eeschema/build_BOM.cpp index 3d4ce20172..6aa13e70e4 100644 --- a/eeschema/build_BOM.cpp +++ b/eeschema/build_BOM.cpp @@ -21,6 +21,8 @@ #include "netlist.h" #include "protos.h" +#include "build_version.h" + #include "dialog_build_BOM.h" diff --git a/eeschema/eeredraw.cpp b/eeschema/eeredraw.cpp index 4e9eabf6c0..3ff9e474d3 100644 --- a/eeschema/eeredraw.cpp +++ b/eeschema/eeredraw.cpp @@ -14,6 +14,7 @@ #include "protos.h" #include "class_library.h" +#include "build_version.h" static EDA_BaseStruct* HighLightStruct = NULL; diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index d1a7e93530..1c1e1eb316 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -16,6 +16,7 @@ #include "protos.h" #include "class_library.h" +#include "build_version.h" /** * @bug - Every place in this file where fprintf() is used and the return diff --git a/gerbview/gerbview.cpp b/gerbview/gerbview.cpp index 59c32addca..592349792d 100644 --- a/gerbview/gerbview.cpp +++ b/gerbview/gerbview.cpp @@ -17,6 +17,8 @@ #include "zones.h" #include "class_board_design_settings.h" +#include "build_version.h" + #include #include diff --git a/include/build_version.h b/include/build_version.h index 56473712de..d942d338cb 100644 --- a/include/build_version.h +++ b/include/build_version.h @@ -1,11 +1,11 @@ /* Date for kicad build version */ -#ifndef KICAD_BUILD_VERSION -#define KICAD_BUILD_VERSION +#ifndef KICAD_BUILD_VERSION_H +#define KICAD_BUILD_VERSION_H /** Function GetBuildVersion() * Return the build date and version */ wxString GetBuildVersion(); -#endif // KICAD_BUILD_VERSION +#endif // KICAD_BUILD_VERSION_H diff --git a/include/common.h b/include/common.h index f32bad0782..019d0c93aa 100644 --- a/include/common.h +++ b/include/common.h @@ -266,7 +266,6 @@ void InitKiCadAbout( wxAboutDialogInfo& info ); /**************/ /* common.cpp */ /**************/ -wxString GetBuildVersion(); /* Return the build date */ /** * function Affiche_1_Parametre diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index a9d36bf815..f93b44aca6 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -26,6 +26,8 @@ #include "kicad.h" #include "macros.h" +#include "build_version.h" + #ifdef KICAD_PYTHON #include using namespace boost::python; diff --git a/kicad/prjconfig.cpp b/kicad/prjconfig.cpp index df2d1e09f2..7c74e587e9 100644 --- a/kicad/prjconfig.cpp +++ b/kicad/prjconfig.cpp @@ -15,6 +15,8 @@ #include "prjconfig.h" #include "kicad.h" +#include "build_version.h" + static const wxString GeneralGroupName( wxT( "/general" ) ); /* Kicad project file entry names. */ diff --git a/pcbnew/export_gencad.cpp b/pcbnew/export_gencad.cpp index b8f861caed..eb2acafa13 100644 --- a/pcbnew/export_gencad.cpp +++ b/pcbnew/export_gencad.cpp @@ -13,6 +13,8 @@ #include "wxPcbStruct.h" #include "trigo.h" +#include "build_version.h" + bool CreateHeaderInfoData( FILE* file, WinEDA_PcbFrame* frame ); static void CreateTracksInfoData( FILE* file, BOARD* pcb ); static void CreateBoardSection( FILE* file, BOARD* pcb ); diff --git a/pcbnew/gen_modules_placefile.cpp b/pcbnew/gen_modules_placefile.cpp index 79437e7178..ea88262ea4 100644 --- a/pcbnew/gen_modules_placefile.cpp +++ b/pcbnew/gen_modules_placefile.cpp @@ -16,6 +16,8 @@ #include "trigo.h" #include "appl_wxstruct.h" +#include "build_version.h" + class LIST_MOD /* Can list the elements of useful modules. */ { public: diff --git a/pcbnew/gendrill.cpp b/pcbnew/gendrill.cpp index 9780fa6ba4..8495c9da37 100644 --- a/pcbnew/gendrill.cpp +++ b/pcbnew/gendrill.cpp @@ -22,6 +22,8 @@ #include "gendrill.h" +#include "build_version.h" + const wxString DrillFileExtension( wxT( "drl" ) ); const wxString DrillFileWildcard( _( "Drill files (*.drl)|*.drl" ) ); diff --git a/pcbnew/ioascii.cpp b/pcbnew/ioascii.cpp index 86f03d09c0..f69ee13b4e 100644 --- a/pcbnew/ioascii.cpp +++ b/pcbnew/ioascii.cpp @@ -21,6 +21,8 @@ #include "cvpcb.h" #endif +#include "build_version.h" + #include "pcbnew_id.h" /* ASCII format of structures: diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 36de322200..6a053eb970 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -19,13 +19,13 @@ #include "cell.h" #include "worksheet.h" #include "zones.h" +#include "drag.h" +#include "eda_dde.h" + +#include "build_version.h" #include "protos.h" -#include "drag.h" - -#include "eda_dde.h" - bool Drc_On = true; bool g_AutoDeleteOldTrack = true; bool g_No_Via_Route;