Commit 262ec892 authored by jean-pierre charras's avatar jean-pierre charras

Minor fixes for Windows: move resources from dso to .exe, to have the...

Minor fixes for Windows: move resources from dso to .exe, to have the application icon in executable, and therefore shown in shortcuts.
pcb_calculator: minor coding style fix.
parent 4a39fcdd
...@@ -73,6 +73,7 @@ if( USE_KIWAY_DLLS ) ...@@ -73,6 +73,7 @@ if( USE_KIWAY_DLLS )
add_executable( cvpcb WIN32 MACOSX_BUNDLE add_executable( cvpcb WIN32 MACOSX_BUNDLE
../common/single_top.cpp ../common/single_top.cpp
../common/pgm_base.cpp ../common/pgm_base.cpp
${CVPCB_RESOURCES}
) )
set_source_files_properties( ../common/single_top.cpp PROPERTIES set_source_files_properties( ../common/single_top.cpp PROPERTIES
COMPILE_DEFINITIONS "TOP_FRAME=CVPCB_FRAME_TYPE;PGM_DATA_FILE_EXT=\"net\";BUILD_KIWAY_DLL" COMPILE_DEFINITIONS "TOP_FRAME=CVPCB_FRAME_TYPE;PGM_DATA_FILE_EXT=\"net\";BUILD_KIWAY_DLL"
...@@ -94,7 +95,7 @@ if( USE_KIWAY_DLLS ) ...@@ -94,7 +95,7 @@ if( USE_KIWAY_DLLS )
cvpcb.cpp cvpcb.cpp
${CVPCB_SRCS} ${CVPCB_SRCS}
${CVPCB_DIALOGS} ${CVPCB_DIALOGS}
${CVPCB_RESOURCES} # ${CVPCB_RESOURCES}
) )
set_target_properties( cvpcb_kiface PROPERTIES set_target_properties( cvpcb_kiface PROPERTIES
OUTPUT_NAME cvpcb OUTPUT_NAME cvpcb
......
...@@ -242,6 +242,7 @@ if( USE_KIWAY_DLLS ) ...@@ -242,6 +242,7 @@ if( USE_KIWAY_DLLS )
add_executable( eeschema WIN32 MACOSX_BUNDLE add_executable( eeschema WIN32 MACOSX_BUNDLE
../common/single_top.cpp ../common/single_top.cpp
../common/pgm_base.cpp ../common/pgm_base.cpp
${EESCHEMA_RESOURCES}
) )
set_source_files_properties( ../common/single_top.cpp PROPERTIES set_source_files_properties( ../common/single_top.cpp PROPERTIES
COMPILE_DEFINITIONS "TOP_FRAME=SCHEMATIC_FRAME_TYPE;PGM_DATA_FILE_EXT=\"sch\";BUILD_KIWAY_DLL" COMPILE_DEFINITIONS "TOP_FRAME=SCHEMATIC_FRAME_TYPE;PGM_DATA_FILE_EXT=\"sch\";BUILD_KIWAY_DLL"
...@@ -258,7 +259,7 @@ if( USE_KIWAY_DLLS ) ...@@ -258,7 +259,7 @@ if( USE_KIWAY_DLLS )
add_library( eeschema_kiface MODULE add_library( eeschema_kiface MODULE
${EESCHEMA_SRCS} ${EESCHEMA_SRCS}
${EESCHEMA_COMMON_SRCS} ${EESCHEMA_COMMON_SRCS}
${EESCHEMA_RESOURCES} # ${EESCHEMA_RESOURCES}
) )
target_link_libraries( eeschema_kiface target_link_libraries( eeschema_kiface
common common
......
...@@ -91,6 +91,7 @@ if( USE_KIWAY_DLLS ) ...@@ -91,6 +91,7 @@ if( USE_KIWAY_DLLS )
add_executable( gerbview WIN32 MACOSX_BUNDLE add_executable( gerbview WIN32 MACOSX_BUNDLE
../common/single_top.cpp ../common/single_top.cpp
../common/pgm_base.cpp ../common/pgm_base.cpp
${GERBVIEW_RESOURCES}
) )
set_source_files_properties( ../common/single_top.cpp PROPERTIES set_source_files_properties( ../common/single_top.cpp PROPERTIES
COMPILE_DEFINITIONS "TOP_FRAME=GERBER_FRAME_TYPE;BUILD_KIWAY_DLL" COMPILE_DEFINITIONS "TOP_FRAME=GERBER_FRAME_TYPE;BUILD_KIWAY_DLL"
...@@ -113,7 +114,7 @@ if( USE_KIWAY_DLLS ) ...@@ -113,7 +114,7 @@ if( USE_KIWAY_DLLS )
${GERBVIEW_SRCS} ${GERBVIEW_SRCS}
${DIALOGS_SRCS} ${DIALOGS_SRCS}
${GERBVIEW_EXTRA_SRCS} ${GERBVIEW_EXTRA_SRCS}
${GERBVIEW_RESOURCES} # ${GERBVIEW_RESOURCES}
) )
set_target_properties( gerbview_kiface PROPERTIES set_target_properties( gerbview_kiface PROPERTIES
OUTPUT_NAME gerbview OUTPUT_NAME gerbview
......
...@@ -49,10 +49,11 @@ endif() ...@@ -49,10 +49,11 @@ endif()
if( USE_KIWAY_DLLS ) if( USE_KIWAY_DLLS )
# a very small program launcher for pcbnew_kiface # a very small program launcher for pl_editor_kiface
add_executable( pl_editor WIN32 MACOSX_BUNDLE add_executable( pl_editor WIN32 MACOSX_BUNDLE
../common/single_top.cpp ../common/single_top.cpp
../common/pgm_base.cpp ../common/pgm_base.cpp
${PL_EDITOR_RESOURCES}
) )
set_source_files_properties( ../common/single_top.cpp PROPERTIES set_source_files_properties( ../common/single_top.cpp PROPERTIES
COMPILE_DEFINITIONS "TOP_FRAME=PL_EDITOR_FRAME_TYPE;PGM_DATA_FILE_EXT=\"kicad_wks\";BUILD_KIWAY_DLL" COMPILE_DEFINITIONS "TOP_FRAME=PL_EDITOR_FRAME_TYPE;PGM_DATA_FILE_EXT=\"kicad_wks\";BUILD_KIWAY_DLL"
...@@ -69,13 +70,13 @@ if( USE_KIWAY_DLLS ) ...@@ -69,13 +70,13 @@ if( USE_KIWAY_DLLS )
LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pl_editor.map" ) LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pl_editor.map" )
endif() endif()
# the main pcbnew program, in DSO form. # the main pl_editor program, in DSO form.
add_library( pl_editor_kiface MODULE add_library( pl_editor_kiface MODULE
pl_editor.cpp pl_editor.cpp
${PL_EDITOR_SRCS} ${PL_EDITOR_SRCS}
${DIALOGS_SRCS} ${DIALOGS_SRCS}
${PL_EDITOR_EXTRA_SRCS} ${PL_EDITOR_EXTRA_SRCS}
${PL_EDITOR_RESOURCES} # ${PL_EDITOR_RESOURCES}
) )
target_link_libraries( pl_editor_kiface target_link_libraries( pl_editor_kiface
common common
...@@ -99,7 +100,7 @@ if( USE_KIWAY_DLLS ) ...@@ -99,7 +100,7 @@ if( USE_KIWAY_DLLS )
LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pl_editor.kiface.map" ) LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pl_editor.kiface.map" )
endif() endif()
# if building pcbnew, then also build pcbnew_kiface if out of date. # if building pl_editor, then also build pl_editor_kiface if out of date.
add_dependencies( pl_editor pl_editor_kiface ) add_dependencies( pl_editor pl_editor_kiface )
# these 2 binaries are a matched set, keep them together: # these 2 binaries are a matched set, keep them together:
......
...@@ -72,6 +72,7 @@ if( USE_KIWAY_DLLS ) ...@@ -72,6 +72,7 @@ if( USE_KIWAY_DLLS )
add_executable( pcb_calculator WIN32 MACOSX_BUNDLE add_executable( pcb_calculator WIN32 MACOSX_BUNDLE
../common/single_top.cpp ../common/single_top.cpp
../common/pgm_base.cpp ../common/pgm_base.cpp
${PCB_CALCULATOR_RESOURCES}
) )
set_source_files_properties( ../common/single_top.cpp PROPERTIES set_source_files_properties( ../common/single_top.cpp PROPERTIES
COMPILE_DEFINITIONS "TOP_FRAME=0;BUILD_KIWAY_DLL" COMPILE_DEFINITIONS "TOP_FRAME=0;BUILD_KIWAY_DLL"
...@@ -92,7 +93,7 @@ if( USE_KIWAY_DLLS ) ...@@ -92,7 +93,7 @@ if( USE_KIWAY_DLLS )
add_library( pcb_calculator_kiface MODULE add_library( pcb_calculator_kiface MODULE
pcb_calculator.cpp pcb_calculator.cpp
${PCB_CALCULATOR_SRCS} ${PCB_CALCULATOR_SRCS}
${PCB_CALCULATOR_RESOURCES} # ${PCB_CALCULATOR_RESOURCES}
) )
set_target_properties( pcb_calculator_kiface PROPERTIES set_target_properties( pcb_calculator_kiface PROPERTIES
OUTPUT_NAME pcb_calculator OUTPUT_NAME pcb_calculator
......
...@@ -29,7 +29,7 @@ private: ...@@ -29,7 +29,7 @@ private:
wxSize m_FrameSize; wxSize m_FrameSize;
wxPoint m_FramePos; wxPoint m_FramePos;
wxConfig * m_Config; wxConfig * m_Config;
enum transline_type_id m_currTransLineType; enum TRANSLINE_TYPE_ID m_currTransLineType;
TRANSLINE * m_currTransLine; // a pointer to the active transline TRANSLINE * m_currTransLine; // a pointer to the active transline
// List of translines: ordered like in dialog menu list // List of translines: ordered like in dialog menu list
std::vector <TRANSLINE_IDENT *> m_transline_list; std::vector <TRANSLINE_IDENT *> m_transline_list;
...@@ -153,9 +153,9 @@ private: ...@@ -153,9 +153,9 @@ private:
* Update all values, labels and tool tips of parameters needed * Update all values, labels and tool tips of parameters needed
* by the new transline * by the new transline
* Irrelevant parameters texts are blanked. * Irrelevant parameters texts are blanked.
* @param aType = the transline_type_id of the new selected transline * @param aType = the TRANSLINE_TYPE_ID of the new selected transline
*/ */
void TranslineTypeSelection( enum transline_type_id aType ); void TranslineTypeSelection( enum TRANSLINE_TYPE_ID aType );
/** /**
* Function TransfDlgDataToTranslineParams * Function TransfDlgDataToTranslineParams
......
...@@ -58,17 +58,17 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : ...@@ -58,17 +58,17 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
SetKiway( this, aKiway ); SetKiway( this, aKiway );
m_currTransLine = NULL; m_currTransLine = NULL;
m_currTransLineType = default_type; m_currTransLineType = DEFAULT_TYPE;
m_currAttenuator = NULL; m_currAttenuator = NULL;
m_RegulatorListChanged = false; m_RegulatorListChanged = false;
m_Config = new wxConfig(); m_Config = new wxConfig();
// Populate transline list ordered like in dialog menu list // Populate transline list ordered like in dialog menu list
const static transline_type_id tltype_list[8] = const static TRANSLINE_TYPE_ID tltype_list[8] =
{ {
microstrip_type, cpw_type, grounded_cpw_type, MICROSTRIP_TYPE, CPW_TYPE, GROUNDED_CPW_TYPE,
rectwaveguide_type, coax_type, c_microstrip_type, RECTWAVEGUIDE_TYPE, COAX_TYPE, C_MICROSTRIP_TYPE,
stripline_type, twistedpair_type STRIPLINE_TYPE, TWISTEDPAIR_TYPE
}; };
for( int ii = 0; ii < 8; ii++ ) for( int ii = 0; ii < 8; ii++ )
...@@ -177,8 +177,8 @@ void PCB_CALCULATOR_FRAME::ReadConfig() ...@@ -177,8 +177,8 @@ void PCB_CALCULATOR_FRAME::ReadConfig()
m_Config->Read( KEYWORD_FRAME_POSY, &m_FramePos.y, -1 ); m_Config->Read( KEYWORD_FRAME_POSY, &m_FramePos.y, -1 );
m_Config->Read( KEYWORD_FRAME_SIZEX, &m_FrameSize.x, -1 ); m_Config->Read( KEYWORD_FRAME_SIZEX, &m_FrameSize.x, -1 );
m_Config->Read( KEYWORD_FRAME_SIZEY, &m_FrameSize.y, -1 ); m_Config->Read( KEYWORD_FRAME_SIZEY, &m_FrameSize.y, -1 );
m_Config->Read( KEYWORD_TRANSLINE_SELECTION, &ltmp, (long) default_type ); m_Config->Read( KEYWORD_TRANSLINE_SELECTION, &ltmp, (long) DEFAULT_TYPE );
m_currTransLineType = (enum transline_type_id) ltmp; m_currTransLineType = (enum TRANSLINE_TYPE_ID) ltmp;
m_Config->Read( KEYWORD_PAGE_SELECTION, &ltmp, 0 ); m_Config->Read( KEYWORD_PAGE_SELECTION, &ltmp, 0 );
m_Notebook->ChangeSelection( ltmp ); m_Notebook->ChangeSelection( ltmp );
m_Config->Read( KEYWORD_COLORCODE_SELECTION, &ltmp, 1 ); m_Config->Read( KEYWORD_COLORCODE_SELECTION, &ltmp, 1 );
......
...@@ -33,9 +33,7 @@ ...@@ -33,9 +33,7 @@
extern double DoubleFromString( const wxString& TextValue ); extern double DoubleFromString( const wxString& TextValue );
/* // these values come from QucsStudio ( by Michael Margraf )
* these values come from QucsStudio ( by Michael Margraf )
*/
// Display a selection of usual Er, TanD, Rho values // Display a selection of usual Er, TanD, Rho values
// format is <value><space><comment> // format is <value><space><comment>
...@@ -143,16 +141,16 @@ struct DLG_PRM_DATA ...@@ -143,16 +141,16 @@ struct DLG_PRM_DATA
* Irrelevant parameters texts are blanked. * Irrelevant parameters texts are blanked.
* @param aType = the transline_type_id of the new selected transline * @param aType = the transline_type_id of the new selected transline
*/ */
void PCB_CALCULATOR_FRAME::TranslineTypeSelection( enum transline_type_id aType ) void PCB_CALCULATOR_FRAME::TranslineTypeSelection( enum TRANSLINE_TYPE_ID aType )
{ {
wxString msg; wxString msg;
#define DOUBLE_TO_CTLR( dlg_item, value ) { msg.Printf( wxT( "%g" ), value );\ #define DOUBLE_TO_CTLR( dlg_item, value ) { msg.Printf( wxT( "%g" ), value );\
dlg_item->SetValue( msg ); } dlg_item->SetValue( msg ); }
m_currTransLineType = aType; m_currTransLineType = aType;
if( (m_currTransLineType < start_of_list_type ) if( (m_currTransLineType < START_OF_LIST_TYPE )
|| ( m_currTransLineType >= end_of_list_type ) ) || ( m_currTransLineType >= END_OF_LIST_TYPE ) )
m_currTransLineType = default_type; m_currTransLineType = DEFAULT_TYPE;
TRANSLINE_IDENT* tr_ident = m_transline_list[m_currTransLineType]; TRANSLINE_IDENT* tr_ident = m_transline_list[m_currTransLineType];
m_currTransLine = tr_ident->m_TLine; m_currTransLine = tr_ident->m_TLine;
...@@ -348,8 +346,8 @@ void PCB_CALCULATOR_FRAME::TranslineTypeSelection( enum transline_type_id aType ...@@ -348,8 +346,8 @@ void PCB_CALCULATOR_FRAME::TranslineTypeSelection( enum transline_type_id aType
/** /**
* Function TransfDlgDataToTranslineParams * Function TransfDlgDataToTranslineParams
* Read values entered in dialog frame, and transfert these * Read values entered in dialog frame, and copy these values
* values in current transline parameters, converted in normalized units * in current transline parameters, converted in normalized units
*/ */
void PCB_CALCULATOR_FRAME::TransfDlgDataToTranslineParams() void PCB_CALCULATOR_FRAME::TransfDlgDataToTranslineParams()
{ {
...@@ -378,7 +376,7 @@ void PCB_CALCULATOR_FRAME::TransfDlgDataToTranslineParams() ...@@ -378,7 +376,7 @@ void PCB_CALCULATOR_FRAME::TransfDlgDataToTranslineParams()
*/ */
void PCB_CALCULATOR_FRAME::OnTranslineSelection( wxCommandEvent& event ) void PCB_CALCULATOR_FRAME::OnTranslineSelection( wxCommandEvent& event )
{ {
enum transline_type_id id = (enum transline_type_id) event.GetSelection(); enum TRANSLINE_TYPE_ID id = (enum TRANSLINE_TYPE_ID) event.GetSelection();
TranslineTypeSelection( id ); TranslineTypeSelection( id );
......
...@@ -100,7 +100,7 @@ double TRANSLINE_PRM::FromUserUnit() ...@@ -100,7 +100,7 @@ double TRANSLINE_PRM::FromUserUnit()
* A class to handle a list of parameters of a given transline * A class to handle a list of parameters of a given transline
*/ */
TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) TRANSLINE_IDENT::TRANSLINE_IDENT( enum TRANSLINE_TYPE_ID aType )
{ {
m_Type = aType; // The type of transline handled m_Type = aType; // The type of transline handled
m_Icon = NULL; // An xpm icon to display in dialogs m_Icon = NULL; // An xpm icon to display in dialogs
...@@ -129,7 +129,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) ...@@ -129,7 +129,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType )
switch( m_Type ) switch( m_Type )
{ {
case microstrip_type: // microstrip case MICROSTRIP_TYPE: // microstrip
m_TLine = new MICROSTRIP(); m_TLine = new MICROSTRIP();
m_Icon = new wxBitmap( microstrip_xpm ); m_Icon = new wxBitmap( microstrip_xpm );
...@@ -165,7 +165,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) ...@@ -165,7 +165,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType )
_( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) );
break; break;
case cpw_type: // coplanar waveguide case CPW_TYPE: // coplanar waveguide
m_TLine = new COPLANAR(); m_TLine = new COPLANAR();
m_Icon = new wxBitmap( cpw_xpm ); m_Icon = new wxBitmap( cpw_xpm );
m_HasPrmSelection = true; m_HasPrmSelection = true;
...@@ -197,7 +197,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) ...@@ -197,7 +197,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType )
_( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) );
break; break;
case grounded_cpw_type: // grounded coplanar waveguide case GROUNDED_CPW_TYPE: // grounded coplanar waveguide
m_TLine = new GROUNDEDCOPLANAR(); m_TLine = new GROUNDEDCOPLANAR();
m_Icon = new wxBitmap( cpw_back_xpm ); m_Icon = new wxBitmap( cpw_back_xpm );
m_HasPrmSelection = true; m_HasPrmSelection = true;
...@@ -230,7 +230,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) ...@@ -230,7 +230,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType )
break; break;
case rectwaveguide_type: // rectangular waveguide case RECTWAVEGUIDE_TYPE: // rectangular waveguide
m_TLine = new RECTWAVEGUIDE(); m_TLine = new RECTWAVEGUIDE();
m_Icon = new wxBitmap( rectwaveguide_xpm ); m_Icon = new wxBitmap( rectwaveguide_xpm );
m_HasPrmSelection = true; m_HasPrmSelection = true;
...@@ -264,7 +264,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) ...@@ -264,7 +264,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType )
_( "Ang_l" ), _( "Electrical Length" ), 0, true ) ); _( "Ang_l" ), _( "Electrical Length" ), 0, true ) );
break; break;
case coax_type: // coaxial cable case COAX_TYPE: // coaxial cable
m_TLine = new COAX(); m_TLine = new COAX();
m_Icon = new wxBitmap( coax_xpm ); m_Icon = new wxBitmap( coax_xpm );
m_HasPrmSelection = true; m_HasPrmSelection = true;
...@@ -295,7 +295,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) ...@@ -295,7 +295,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType )
_( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) );
break; break;
case c_microstrip_type: // coupled microstrip case C_MICROSTRIP_TYPE: // coupled microstrip
m_TLine = new C_MICROSTRIP(); m_TLine = new C_MICROSTRIP();
m_Icon = new wxBitmap( c_microstrip_xpm ); m_Icon = new wxBitmap( c_microstrip_xpm );
m_HasPrmSelection = true; m_HasPrmSelection = true;
...@@ -328,14 +328,14 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) ...@@ -328,14 +328,14 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType )
_( "L" ), _( "Line Length" ), 50.0, true ) ); _( "L" ), _( "Line Length" ), 50.0, true ) );
AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_E_PRM, AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_E_PRM,
_( "Z0e" ), _( "Even-Mode Impedance" ), 50.0, true ) ); _( "Z0e (Zdiff)" ), _( "Even-Mode impedance (diff impedance)" ), 50.0, true ) );
AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_O_PRM, AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_O_PRM,
_( "Z0o" ), _( "Odd-Mode Impedance" ), 50.0, true ) ); _( "Z0o (Z0)" ), _( "Odd-Mode impedance" ), 50.0, true ) );
AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, ANG_L_PRM, AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, ANG_L_PRM,
_( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); _( "Ang_l" ), _( "Electrical length" ), 0.0, true ) );
break; break;
case stripline_type: // stripline case STRIPLINE_TYPE: // stripline
m_TLine = new STRIPLINE(); m_TLine = new STRIPLINE();
m_Icon = new wxBitmap( stripline_xpm ); m_Icon = new wxBitmap( stripline_xpm );
...@@ -367,7 +367,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) ...@@ -367,7 +367,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType )
_( "Ang_l" ), _( "Electrical Length" ), 0, true ) ); _( "Ang_l" ), _( "Electrical Length" ), 0, true ) );
break; break;
case twistedpair_type: // twisted pair case TWISTEDPAIR_TYPE: // twisted pair
m_TLine = new TWISTEDPAIR(); m_TLine = new TWISTEDPAIR();
m_Icon = new wxBitmap( twistedpair_xpm ); m_Icon = new wxBitmap( twistedpair_xpm );
m_HasPrmSelection = true; m_HasPrmSelection = true;
...@@ -399,7 +399,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) ...@@ -399,7 +399,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType )
_( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) );
break; break;
case end_of_list_type: // Not really used case END_OF_LIST_TYPE: // Not really used
break; break;
} }
} }
......
...@@ -12,18 +12,18 @@ ...@@ -12,18 +12,18 @@
#include <transline.h> #include <transline.h>
// An enum to handle muwave shapes: // An enum to handle muwave shapes:
enum transline_type_id { enum TRANSLINE_TYPE_ID {
start_of_list_type = 0, START_OF_LIST_TYPE = 0,
default_type = start_of_list_type, DEFAULT_TYPE = START_OF_LIST_TYPE,
microstrip_type = default_type, MICROSTRIP_TYPE = DEFAULT_TYPE,
cpw_type, CPW_TYPE,
grounded_cpw_type, GROUNDED_CPW_TYPE,
rectwaveguide_type, RECTWAVEGUIDE_TYPE,
coax_type, COAX_TYPE,
c_microstrip_type, C_MICROSTRIP_TYPE,
stripline_type, STRIPLINE_TYPE,
twistedpair_type, TWISTEDPAIR_TYPE,
end_of_list_type END_OF_LIST_TYPE
}; };
// A Class to handle parameters // A Class to handle parameters
...@@ -66,7 +66,7 @@ public: TRANSLINE_PRM( PRM_TYPE aType, PRMS_ID aId, ...@@ -66,7 +66,7 @@ public: TRANSLINE_PRM( PRM_TYPE aType, PRMS_ID aId,
class TRANSLINE_IDENT class TRANSLINE_IDENT
{ {
public: public:
enum transline_type_id m_Type; // The type of transline handled enum TRANSLINE_TYPE_ID m_Type; // The type of transline handled
wxBitmap * m_Icon; // An icon to display in dialogs wxBitmap * m_Icon; // An icon to display in dialogs
TRANSLINE* m_TLine; // The TRANSLINE itself TRANSLINE* m_TLine; // The TRANSLINE itself
wxArrayString m_Messages; // messages for results wxArrayString m_Messages; // messages for results
...@@ -75,7 +75,7 @@ public: ...@@ -75,7 +75,7 @@ public:
private: private:
std::vector <TRANSLINE_PRM*> m_prms_List; std::vector <TRANSLINE_PRM*> m_prms_List;
public: TRANSLINE_IDENT( enum transline_type_id aType ); public: TRANSLINE_IDENT( enum TRANSLINE_TYPE_ID aType );
~TRANSLINE_IDENT(); ~TRANSLINE_IDENT();
// Add a new param in list // Add a new param in list
......
...@@ -505,6 +505,7 @@ if( USE_KIWAY_DLLS ) ...@@ -505,6 +505,7 @@ if( USE_KIWAY_DLLS )
add_executable( pcbnew WIN32 MACOSX_BUNDLE add_executable( pcbnew WIN32 MACOSX_BUNDLE
../common/single_top.cpp ../common/single_top.cpp
../common/pgm_base.cpp ../common/pgm_base.cpp
${PCBNEW_RESOURCES}
) )
set_source_files_properties( ../common/single_top.cpp PROPERTIES set_source_files_properties( ../common/single_top.cpp PROPERTIES
COMPILE_DEFINITIONS "TOP_FRAME=PCB_FRAME_TYPE;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL" COMPILE_DEFINITIONS "TOP_FRAME=PCB_FRAME_TYPE;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL"
...@@ -527,7 +528,7 @@ if( USE_KIWAY_DLLS ) ...@@ -527,7 +528,7 @@ if( USE_KIWAY_DLLS )
${PCBNEW_SRCS} ${PCBNEW_SRCS}
${PCBNEW_COMMON_SRCS} ${PCBNEW_COMMON_SRCS}
${PCBNEW_SCRIPTING_SRCS} ${PCBNEW_SCRIPTING_SRCS}
${PCBNEW_RESOURCES} # ${PCBNEW_RESOURCES}
) )
set_target_properties( pcbnew_kiface PROPERTIES set_target_properties( pcbnew_kiface PROPERTIES
# Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like # Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include <wx/file.h> #include <wx/file.h>
#include <wx/snglinst.h> #include <wx/snglinst.h>
#include <wx/dir.h> #include <wx/dir.h>
#include <gestfich.h>
#include <pcbnew.h> #include <pcbnew.h>
#include <protos.h> #include <protos.h>
...@@ -325,7 +326,11 @@ static bool scriptingSetup() ...@@ -325,7 +326,11 @@ static bool scriptingSetup()
const wxString python_us( "python27_us" ); const wxString python_us( "python27_us" );
// Build our python path inside kicad // Build our python path inside kicad
wxString kipython = m_BinDir + python_us; wxString kipython = FindKicadFile( python_us + wxT("/python.exe") );
//we need only the path:
wxFileName fn( kipython );
kipython = fn.GetPath();
// If our python install is existing inside kicad, use it // If our python install is existing inside kicad, use it
if( wxDirExists( kipython ) ) if( wxDirExists( kipython ) )
......
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