Wayne Stambaugh's patch which allows infospgm.cpp to be compiled once rather than for each program
This commit is contained in:
parent
eaa147c110
commit
6ab5ad27f5
|
@ -25,8 +25,12 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)
|
|||
# Path to local CMake modules
|
||||
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
|
||||
|
||||
# Command line option to enable or disable building minizip. Minizip
|
||||
# is building is enabled by defaut. Use -DKICAD_MINZIP=OFF to disable
|
||||
# building minizip.
|
||||
OPTION(KICAD_MINIZIP "enable/disable building minizip (default ON)" ON)
|
||||
# Comment this out if you don't want to build minizip.
|
||||
SET(KICAD_MINIZIP ON CACHE BOOL "Build minizip?")
|
||||
#SET(KICAD_MINIZIP ON CACHE BOOL "Build minizip?")
|
||||
|
||||
# Comment this out if you don't want to build with Python support.
|
||||
# SET(KICAD_PYTHON ON CACHE BOOL "Build with Python support?")
|
||||
|
|
|
@ -31,6 +31,7 @@ SET(COMMON_SRCS
|
|||
toolbars.cpp
|
||||
trigo.cpp
|
||||
worksheet.cpp
|
||||
wxwineda.cpp)
|
||||
wxwineda.cpp
|
||||
../share/infospgm.cpp)
|
||||
|
||||
ADD_LIBRARY(common ${COMMON_SRCS})
|
||||
|
|
|
@ -222,7 +222,7 @@ void WinEDA_BasicFrame::GetKicadHelp(wxCommandEvent& event)
|
|||
void WinEDA_BasicFrame::GetKicadAbout(wxCommandEvent& event)
|
||||
/**********************************************************/
|
||||
{
|
||||
Print_Kicad_Infos(this);
|
||||
Print_Kicad_Infos(this, m_AboutTitle);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
|
|
|
@ -140,7 +140,7 @@ void PyHandler::DoInitModules()
|
|||
|
||||
for ( unsigned int i = 0; i < m_ModuleRegistry.size(); i ++ )
|
||||
{
|
||||
detail::init_module( m_ModuleRegistry[i].name.fn_str(), &InitPyModules );
|
||||
detail::init_module( m_ModuleRegistry[i].name.mb_str(), &InitPyModules );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -244,14 +244,14 @@ bool PyHandler::RunScript( const wxString & name )
|
|||
object ns = module.attr( "__dict__" );
|
||||
bool ret = true;
|
||||
|
||||
FILE * file = fopen( name.fn_str(), "r" );
|
||||
FILE * file = fopen( name.mb_str(), "r" );
|
||||
|
||||
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
||||
|
||||
if ( !file )
|
||||
{
|
||||
// do something
|
||||
std::cout << "Unable to Load " << name.fn_str() << "\n";
|
||||
std::cout << "Unable to Load " << name.mb_str() << "\n";
|
||||
ret = false;
|
||||
}
|
||||
else
|
||||
|
@ -265,7 +265,7 @@ bool PyHandler::RunScript( const wxString & name )
|
|||
try
|
||||
{
|
||||
ns["currentScript"] = Convert( name );
|
||||
handle<> ignored( PyRun_File( file, name.fn_str(), Py_file_input, ns.ptr(), ns.ptr() ) );
|
||||
handle<> ignored( PyRun_File( file, name.mb_str(), Py_file_input, ns.ptr(), ns.ptr() ) );
|
||||
}
|
||||
catch ( error_already_set )
|
||||
{
|
||||
|
@ -286,7 +286,7 @@ bool PyHandler::RunSimpleString( const wxString & code )
|
|||
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
||||
try
|
||||
{
|
||||
PyRun_SimpleString( code.fn_str() );
|
||||
PyRun_SimpleString( code.mb_str() );
|
||||
}
|
||||
catch ( error_already_set )
|
||||
{
|
||||
|
@ -346,7 +346,7 @@ void PyHandler::TriggerEvent( const wxString & key, const object & param )
|
|||
}
|
||||
catch (error_already_set)
|
||||
{
|
||||
std::cout << "Error in event " << key.fn_str() << " callback" << std::endl;
|
||||
std::cout << "Error in event " << key.mb_str() << " callback" << std::endl;
|
||||
PyErr_Print();
|
||||
}
|
||||
}
|
||||
|
@ -378,6 +378,6 @@ void PyHandler::UnRegisterCallback( const wxString & key, const object & callbac
|
|||
|
||||
wxString PyHandler::MakeStr( const object & objStr ) { return wxString( extract<const char *>( objStr ), wxConvLocal ); }
|
||||
|
||||
object PyHandler::Convert( const wxString & wxStr ) { return str( std::string( wxStr.fn_str() ).c_str() ); }
|
||||
object PyHandler::Convert( const wxString & wxStr ) { return str( std::string( wxStr.mb_str() ).c_str() ); }
|
||||
|
||||
// vim: set tabstop=4 :
|
||||
|
|
|
@ -54,7 +54,6 @@ SET(CVPCB_EXTRA_SRCS
|
|||
|
||||
../share/drawframe.cpp
|
||||
../share/drawpanel.cpp
|
||||
../share/infospgm.cpp
|
||||
../share/zoom.cpp)
|
||||
|
||||
IF(WIN32)
|
||||
|
|
|
@ -25,6 +25,7 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( WinEDA_App* parent, const wxString& title,
|
|||
WinEDA_BasicFrame( NULL, CVPCB_FRAME, parent, title, wxDefaultPosition, wxDefaultSize, style )
|
||||
{
|
||||
m_FrameName = wxT( "CvpcbFrame" );
|
||||
m_AboutTitle = g_CvpcbAboutTitle;
|
||||
m_ListCmp = NULL;
|
||||
m_FootprintList = NULL;
|
||||
DrawFrame = NULL;
|
||||
|
|
|
@ -97,7 +97,6 @@ SET(EESCHEMA_SRCS
|
|||
SET(EESCHEMA_EXTRA_SRCS
|
||||
../share/drawframe.cpp
|
||||
../share/drawpanel.cpp
|
||||
../share/infospgm.cpp
|
||||
../share/setpage.cpp
|
||||
../share/svg_print.cpp
|
||||
../share/wxprint.cpp
|
||||
|
|
|
@ -120,6 +120,7 @@ WinEDA_SchematicFrame:: WinEDA_SchematicFrame(wxWindow * father, WinEDA_App *par
|
|||
WinEDA_DrawFrame(father, SCHEMATIC_FRAME, parent, title, pos, size, style)
|
||||
{
|
||||
m_FrameName = wxT("SchematicFrame");
|
||||
m_AboutTitle = g_EeschemaAboutTitle;
|
||||
m_Draw_Axis = FALSE; // TRUE to show axis
|
||||
m_Draw_Grid = g_ShowGrid; // TRUE to show a grid
|
||||
m_Draw_Sheet_Ref = TRUE; // TRUE to show sheet references
|
||||
|
|
|
@ -29,7 +29,7 @@ SET(GERBVIEW_SRCS
|
|||
# pcbtexte.cpp
|
||||
# process_config.cpp
|
||||
readgerb.cpp
|
||||
reglage.cpp
|
||||
reglage.cpp
|
||||
rs274d.cpp
|
||||
rs274x.cpp
|
||||
select_layers_to_pcb.cpp
|
||||
|
@ -54,7 +54,6 @@ SET(GERBVIEW_EXTRA_SRCS
|
|||
|
||||
../share/drawframe.cpp
|
||||
../share/drawpanel.cpp
|
||||
../share/infospgm.cpp
|
||||
../share/setpage.cpp
|
||||
../share/wxprint.cpp
|
||||
../share/zoom.cpp)
|
||||
|
|
|
@ -128,6 +128,7 @@ WinEDA_GerberFrame::WinEDA_GerberFrame(wxWindow * father, WinEDA_App *parent,
|
|||
WinEDA_BasePcbFrame(father, parent, GERBER_FRAME, title, pos, size, style)
|
||||
{
|
||||
m_FrameName = wxT("GerberFrame");
|
||||
m_AboutTitle = g_GerbviewAboutTitle;
|
||||
m_Draw_Axis = TRUE; // TRUE pour avoir les axes dessines
|
||||
m_Draw_Grid = TRUE; // TRUE pour avoir la axes dessinee
|
||||
m_Draw_Sheet_Ref = FALSE; // TRUE pour avoir le cartouche dessiné
|
||||
|
@ -313,4 +314,3 @@ wxSize size;
|
|||
|
||||
return(bestzoom);
|
||||
}
|
||||
|
||||
|
|
|
@ -554,7 +554,13 @@ char* to_point( char* Text );
|
|||
/****************/
|
||||
/* infospgm.cpp */
|
||||
/****************/
|
||||
void Print_Kicad_Infos( wxWindow* frame );
|
||||
extern wxString g_KicadAboutTitle;
|
||||
extern wxString g_CvpcbAboutTitle;
|
||||
extern wxString g_EeschemaAboutTitle;
|
||||
extern wxString g_PcbnewAboutTitle;
|
||||
extern wxString g_GerbviewAboutTitle;
|
||||
|
||||
void Print_Kicad_Infos( wxWindow* frame, const wxString& title );
|
||||
|
||||
/**************/
|
||||
/* common.cpp */
|
||||
|
|
|
@ -146,6 +146,7 @@ public:
|
|||
bool m_FrameIsActive;
|
||||
wxString m_FrameName; // name used for writting and reading setup
|
||||
// It is "SchematicFrame", "PcbFrame" ....
|
||||
wxString m_AboutTitle; // Name of program displayed in About.
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -13,9 +13,6 @@ SET(KICAD_SRCS
|
|||
treeprj_datas.cpp
|
||||
treeprj_frame.cpp)
|
||||
|
||||
SET(KICAD_EXTRA_SRCS
|
||||
../share/infospgm.cpp)
|
||||
|
||||
IF(WIN32)
|
||||
IF(MINGW)
|
||||
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
|
||||
|
|
|
@ -63,8 +63,8 @@ WinEDA_PrjFrame* WinEDA_MainFrame::GetTree() const { return m_LeftWin;
|
|||
|
||||
void WinEDA_MainFrame::AddFastLaunchPy( object & button )
|
||||
{
|
||||
wxButton * btn;
|
||||
bool success = wxPyConvertSwigPtr( button.ptr(), (void**)&btn, _T("wxButton"));
|
||||
wxBitmapButton * btn;
|
||||
bool success = wxPyConvertSwigPtr( button.ptr(), (void**)&btn, _T("wxBitmapButton"));
|
||||
if ( !success ) return;
|
||||
|
||||
Py_INCREF( button.ptr() );
|
||||
|
|
|
@ -34,6 +34,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( WinEDA_App* eda_app,
|
|||
wxSize clientsize;
|
||||
|
||||
m_FrameName = wxT( "KicadFrame" );
|
||||
m_AboutTitle = g_KicadAboutTitle;
|
||||
m_VToolBar = NULL;
|
||||
m_LeftWin = NULL;
|
||||
m_BottomWin = NULL;
|
||||
|
@ -393,7 +394,6 @@ void WinEDA_MainFrame::ClearMsg()
|
|||
m_DialogWin->Clear();
|
||||
}
|
||||
|
||||
|
||||
#ifdef KICAD_PYTHON
|
||||
void WinEDA_MainFrame::OnRefreshPy()
|
||||
{
|
||||
|
|
|
@ -3,7 +3,10 @@ IF(ZLIB_FOUND)
|
|||
MESSAGE(STATUS "Check for installed ZLIB -- found")
|
||||
ELSE(ZLIB_FOUND)
|
||||
MESSAGE(STATUS "Check for installed zlib -- not found")
|
||||
MESSAGE(FATAL_ERROR "zlib was not found - it is required to build KiCad")
|
||||
IF (NOT MINGW)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"zlib was not found - it is required to build KiCad")
|
||||
ENDIF (NOT MINGW)
|
||||
ENDIF(ZLIB_FOUND)
|
||||
|
||||
SET(MINIZIP_SRCS
|
||||
|
|
|
@ -4,7 +4,7 @@ FIND_PACKAGE(Boost)
|
|||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIR}
|
||||
bitmaps
|
||||
../3d-viewer
|
||||
../polygon)
|
||||
|
@ -145,7 +145,6 @@ SET(PCBNEW_SRCS
|
|||
SET(PCBNEW_EXTRA_SRCS
|
||||
../share/drawframe.cpp
|
||||
../share/drawpanel.cpp
|
||||
../share/infospgm.cpp
|
||||
../share/setpage.cpp
|
||||
../share/wxprint.cpp
|
||||
../share/zoom.cpp)
|
||||
|
|
|
@ -183,6 +183,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, WinEDA_App* parent,
|
|||
WinEDA_BasePcbFrame( father, parent, PCB_FRAME, title, pos, size, style )
|
||||
{
|
||||
m_FrameName = wxT( "PcbFrame" );
|
||||
m_AboutTitle = g_PcbnewAboutTitle;
|
||||
m_Draw_Axis = TRUE; // TRUE pour avoir les axes dessines
|
||||
m_Draw_Grid = g_ShowGrid; // TRUE pour avoir la grille dessinee
|
||||
m_Draw_Sheet_Ref = TRUE; // TRUE pour avoir le cartouche dessine
|
||||
|
|
|
@ -2422,6 +2422,9 @@ public:
|
|||
|
||||
class CONNECT : public ELEM
|
||||
{
|
||||
public:
|
||||
CONNECT( ELEM* parent ) :
|
||||
ELEM( T_connect, parent ) {}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -14,36 +14,23 @@
|
|||
// Import:
|
||||
extern wxString g_Main_Title;
|
||||
|
||||
// Local
|
||||
#ifdef GERBVIEW
|
||||
static wxString MsgInfos(wxT("** GERBVIEW (jul 2001 .. 2008) **"));
|
||||
#else
|
||||
#ifdef PCBNEW
|
||||
static wxString MsgInfos(wxT("** PCBNEW (sept 1992 .. 2008) **"));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CVPCB
|
||||
static wxString MsgInfos(wxT("** CVPCB (sept 1992 .. 2008) **"));
|
||||
#endif
|
||||
|
||||
#ifdef KICAD
|
||||
static wxString MsgInfos(wxT("** KICAD (jul 2000 .. 2008) **"));
|
||||
#endif
|
||||
|
||||
#ifdef EESCHEMA
|
||||
static wxString MsgInfos(wxT("** EESCHEMA (sept 1994 .. 2008) **"));
|
||||
#endif
|
||||
/* Program title strings used in about dialog. They are kept hear to make
|
||||
* it easy to update the copyright dates. */
|
||||
wxString g_KicadAboutTitle = wxT("** KICAD (jul 2000 .. 2008) **");
|
||||
wxString g_CvpcbAboutTitle = wxT("** CVPCB (sept 1992 .. 2008) **");
|
||||
wxString g_EeschemaAboutTitle = wxT("** EESCHEMA (sept 1994 .. 2008) **");
|
||||
wxString g_PcbnewAboutTitle = wxT("** PCBNEW (sept 1992 .. 2008) **");
|
||||
wxString g_GerbviewAboutTitle = wxT("** GERBVIEW (jul 2001 .. 2008) **");
|
||||
|
||||
// Routines Locales
|
||||
|
||||
/*******************************************/
|
||||
void Print_Kicad_Infos(wxWindow * frame)
|
||||
void Print_Kicad_Infos(wxWindow * frame, const wxString& title)
|
||||
/*******************************************/
|
||||
{
|
||||
wxString AboutCaption = wxT("About ");
|
||||
wxString AboutCaption = wxT("About ");
|
||||
wxString Msg = title;
|
||||
|
||||
wxString Msg = MsgInfos;
|
||||
Msg << wxT("\n\n") << _("Build Version:") << wxT("\n") ;
|
||||
|
||||
Msg << g_Main_Title << wxT(" ") << GetBuildVersion();
|
||||
|
|
Loading…
Reference in New Issue