diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index a5942f0f5d..de080fbf89 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -73,6 +73,7 @@ if( USE_KIWAY_DLLS ) add_executable( cvpcb WIN32 MACOSX_BUNDLE ../common/single_top.cpp ../common/pgm_base.cpp + ${CVPCB_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES COMPILE_DEFINITIONS "TOP_FRAME=CVPCB_FRAME_TYPE;PGM_DATA_FILE_EXT=\"net\";BUILD_KIWAY_DLL" @@ -94,7 +95,7 @@ if( USE_KIWAY_DLLS ) cvpcb.cpp ${CVPCB_SRCS} ${CVPCB_DIALOGS} - ${CVPCB_RESOURCES} +# ${CVPCB_RESOURCES} ) set_target_properties( cvpcb_kiface PROPERTIES OUTPUT_NAME cvpcb diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index ecbddd5014..9ae138f429 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -242,6 +242,7 @@ if( USE_KIWAY_DLLS ) add_executable( eeschema WIN32 MACOSX_BUNDLE ../common/single_top.cpp ../common/pgm_base.cpp + ${EESCHEMA_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES COMPILE_DEFINITIONS "TOP_FRAME=SCHEMATIC_FRAME_TYPE;PGM_DATA_FILE_EXT=\"sch\";BUILD_KIWAY_DLL" @@ -258,7 +259,7 @@ if( USE_KIWAY_DLLS ) add_library( eeschema_kiface MODULE ${EESCHEMA_SRCS} ${EESCHEMA_COMMON_SRCS} - ${EESCHEMA_RESOURCES} +# ${EESCHEMA_RESOURCES} ) target_link_libraries( eeschema_kiface common diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index 124a8d0c56..82e27ca1aa 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -91,6 +91,7 @@ if( USE_KIWAY_DLLS ) add_executable( gerbview WIN32 MACOSX_BUNDLE ../common/single_top.cpp ../common/pgm_base.cpp + ${GERBVIEW_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES COMPILE_DEFINITIONS "TOP_FRAME=GERBER_FRAME_TYPE;BUILD_KIWAY_DLL" @@ -113,7 +114,7 @@ if( USE_KIWAY_DLLS ) ${GERBVIEW_SRCS} ${DIALOGS_SRCS} ${GERBVIEW_EXTRA_SRCS} - ${GERBVIEW_RESOURCES} +# ${GERBVIEW_RESOURCES} ) set_target_properties( gerbview_kiface PROPERTIES OUTPUT_NAME gerbview diff --git a/pagelayout_editor/CMakeLists.txt b/pagelayout_editor/CMakeLists.txt index 3d25ce7ac3..e59bde050e 100644 --- a/pagelayout_editor/CMakeLists.txt +++ b/pagelayout_editor/CMakeLists.txt @@ -49,10 +49,11 @@ endif() 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 ../common/single_top.cpp ../common/pgm_base.cpp + ${PL_EDITOR_RESOURCES} ) 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" @@ -69,13 +70,13 @@ if( USE_KIWAY_DLLS ) LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pl_editor.map" ) endif() - # the main pcbnew program, in DSO form. + # the main pl_editor program, in DSO form. add_library( pl_editor_kiface MODULE pl_editor.cpp ${PL_EDITOR_SRCS} ${DIALOGS_SRCS} ${PL_EDITOR_EXTRA_SRCS} - ${PL_EDITOR_RESOURCES} +# ${PL_EDITOR_RESOURCES} ) target_link_libraries( pl_editor_kiface common @@ -99,7 +100,7 @@ if( USE_KIWAY_DLLS ) LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pl_editor.kiface.map" ) 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 ) # these 2 binaries are a matched set, keep them together: diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt index 74be8fe1d7..51f1e21c66 100644 --- a/pcb_calculator/CMakeLists.txt +++ b/pcb_calculator/CMakeLists.txt @@ -72,6 +72,7 @@ if( USE_KIWAY_DLLS ) add_executable( pcb_calculator WIN32 MACOSX_BUNDLE ../common/single_top.cpp ../common/pgm_base.cpp + ${PCB_CALCULATOR_RESOURCES} ) set_source_files_properties( ../common/single_top.cpp PROPERTIES COMPILE_DEFINITIONS "TOP_FRAME=0;BUILD_KIWAY_DLL" @@ -92,7 +93,7 @@ if( USE_KIWAY_DLLS ) add_library( pcb_calculator_kiface MODULE pcb_calculator.cpp ${PCB_CALCULATOR_SRCS} - ${PCB_CALCULATOR_RESOURCES} +# ${PCB_CALCULATOR_RESOURCES} ) set_target_properties( pcb_calculator_kiface PROPERTIES OUTPUT_NAME pcb_calculator diff --git a/pcb_calculator/pcb_calculator.h b/pcb_calculator/pcb_calculator.h index 808b5da208..0c3633a5ca 100644 --- a/pcb_calculator/pcb_calculator.h +++ b/pcb_calculator/pcb_calculator.h @@ -29,7 +29,7 @@ private: wxSize m_FrameSize; wxPoint m_FramePos; wxConfig * m_Config; - enum transline_type_id m_currTransLineType; + enum TRANSLINE_TYPE_ID m_currTransLineType; TRANSLINE * m_currTransLine; // a pointer to the active transline // List of translines: ordered like in dialog menu list std::vector m_transline_list; @@ -153,9 +153,9 @@ private: * Update all values, labels and tool tips of parameters needed * by the new transline * 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 diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp index 9482a6ee83..7981201e25 100644 --- a/pcb_calculator/pcb_calculator_frame.cpp +++ b/pcb_calculator/pcb_calculator_frame.cpp @@ -58,17 +58,17 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : SetKiway( this, aKiway ); m_currTransLine = NULL; - m_currTransLineType = default_type; + m_currTransLineType = DEFAULT_TYPE; m_currAttenuator = NULL; m_RegulatorListChanged = false; m_Config = new wxConfig(); // 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, - rectwaveguide_type, coax_type, c_microstrip_type, - stripline_type, twistedpair_type + MICROSTRIP_TYPE, CPW_TYPE, GROUNDED_CPW_TYPE, + RECTWAVEGUIDE_TYPE, COAX_TYPE, C_MICROSTRIP_TYPE, + STRIPLINE_TYPE, TWISTEDPAIR_TYPE }; for( int ii = 0; ii < 8; ii++ ) @@ -177,8 +177,8 @@ void PCB_CALCULATOR_FRAME::ReadConfig() 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_SIZEY, &m_FrameSize.y, -1 ); - m_Config->Read( KEYWORD_TRANSLINE_SELECTION, <mp, (long) default_type ); - m_currTransLineType = (enum transline_type_id) ltmp; + m_Config->Read( KEYWORD_TRANSLINE_SELECTION, <mp, (long) DEFAULT_TYPE ); + m_currTransLineType = (enum TRANSLINE_TYPE_ID) ltmp; m_Config->Read( KEYWORD_PAGE_SELECTION, <mp, 0 ); m_Notebook->ChangeSelection( ltmp ); m_Config->Read( KEYWORD_COLORCODE_SELECTION, <mp, 1 ); diff --git a/pcb_calculator/transline_dlg_funct.cpp b/pcb_calculator/transline_dlg_funct.cpp index 50ee7ea4fa..f6ca6a4208 100644 --- a/pcb_calculator/transline_dlg_funct.cpp +++ b/pcb_calculator/transline_dlg_funct.cpp @@ -33,9 +33,7 @@ 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 // format is @@ -143,16 +141,16 @@ struct DLG_PRM_DATA * Irrelevant parameters texts are blanked. * @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; #define DOUBLE_TO_CTLR( dlg_item, value ) { msg.Printf( wxT( "%g" ), value );\ dlg_item->SetValue( msg ); } m_currTransLineType = aType; - if( (m_currTransLineType < start_of_list_type ) - || ( m_currTransLineType >= end_of_list_type ) ) - m_currTransLineType = default_type; + if( (m_currTransLineType < START_OF_LIST_TYPE ) + || ( m_currTransLineType >= END_OF_LIST_TYPE ) ) + m_currTransLineType = DEFAULT_TYPE; TRANSLINE_IDENT* tr_ident = m_transline_list[m_currTransLineType]; m_currTransLine = tr_ident->m_TLine; @@ -348,8 +346,8 @@ void PCB_CALCULATOR_FRAME::TranslineTypeSelection( enum transline_type_id aType /** * Function TransfDlgDataToTranslineParams - * Read values entered in dialog frame, and transfert these - * values in current transline parameters, converted in normalized units + * Read values entered in dialog frame, and copy these values + * in current transline parameters, converted in normalized units */ void PCB_CALCULATOR_FRAME::TransfDlgDataToTranslineParams() { @@ -378,7 +376,7 @@ void PCB_CALCULATOR_FRAME::TransfDlgDataToTranslineParams() */ 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 ); diff --git a/pcb_calculator/transline_ident.cpp b/pcb_calculator/transline_ident.cpp index 48369d0c03..fc74e0d27b 100644 --- a/pcb_calculator/transline_ident.cpp +++ b/pcb_calculator/transline_ident.cpp @@ -100,7 +100,7 @@ double TRANSLINE_PRM::FromUserUnit() * 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_Icon = NULL; // An xpm icon to display in dialogs @@ -129,7 +129,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) switch( m_Type ) { - case microstrip_type: // microstrip + case MICROSTRIP_TYPE: // microstrip m_TLine = new MICROSTRIP(); m_Icon = new wxBitmap( microstrip_xpm ); @@ -165,7 +165,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); break; - case cpw_type: // coplanar waveguide + case CPW_TYPE: // coplanar waveguide m_TLine = new COPLANAR(); m_Icon = new wxBitmap( cpw_xpm ); m_HasPrmSelection = true; @@ -197,7 +197,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); break; - case grounded_cpw_type: // grounded coplanar waveguide + case GROUNDED_CPW_TYPE: // grounded coplanar waveguide m_TLine = new GROUNDEDCOPLANAR(); m_Icon = new wxBitmap( cpw_back_xpm ); m_HasPrmSelection = true; @@ -230,7 +230,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) break; - case rectwaveguide_type: // rectangular waveguide + case RECTWAVEGUIDE_TYPE: // rectangular waveguide m_TLine = new RECTWAVEGUIDE(); m_Icon = new wxBitmap( rectwaveguide_xpm ); m_HasPrmSelection = true; @@ -264,7 +264,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) _( "Ang_l" ), _( "Electrical Length" ), 0, true ) ); break; - case coax_type: // coaxial cable + case COAX_TYPE: // coaxial cable m_TLine = new COAX(); m_Icon = new wxBitmap( coax_xpm ); m_HasPrmSelection = true; @@ -295,7 +295,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); break; - case c_microstrip_type: // coupled microstrip + case C_MICROSTRIP_TYPE: // coupled microstrip m_TLine = new C_MICROSTRIP(); m_Icon = new wxBitmap( c_microstrip_xpm ); m_HasPrmSelection = true; @@ -328,14 +328,14 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) _( "L" ), _( "Line Length" ), 50.0, true ) ); 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, - _( "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, - _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); + _( "Ang_l" ), _( "Electrical length" ), 0.0, true ) ); break; - case stripline_type: // stripline + case STRIPLINE_TYPE: // stripline m_TLine = new STRIPLINE(); m_Icon = new wxBitmap( stripline_xpm ); @@ -367,7 +367,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) _( "Ang_l" ), _( "Electrical Length" ), 0, true ) ); break; - case twistedpair_type: // twisted pair + case TWISTEDPAIR_TYPE: // twisted pair m_TLine = new TWISTEDPAIR(); m_Icon = new wxBitmap( twistedpair_xpm ); m_HasPrmSelection = true; @@ -399,7 +399,7 @@ TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType ) _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) ); break; - case end_of_list_type: // Not really used + case END_OF_LIST_TYPE: // Not really used break; } } diff --git a/pcb_calculator/transline_ident.h b/pcb_calculator/transline_ident.h index 45854a7877..d0805b04c7 100644 --- a/pcb_calculator/transline_ident.h +++ b/pcb_calculator/transline_ident.h @@ -12,18 +12,18 @@ #include // An enum to handle muwave shapes: -enum transline_type_id { - start_of_list_type = 0, - default_type = start_of_list_type, - microstrip_type = default_type, - cpw_type, - grounded_cpw_type, - rectwaveguide_type, - coax_type, - c_microstrip_type, - stripline_type, - twistedpair_type, - end_of_list_type +enum TRANSLINE_TYPE_ID { + START_OF_LIST_TYPE = 0, + DEFAULT_TYPE = START_OF_LIST_TYPE, + MICROSTRIP_TYPE = DEFAULT_TYPE, + CPW_TYPE, + GROUNDED_CPW_TYPE, + RECTWAVEGUIDE_TYPE, + COAX_TYPE, + C_MICROSTRIP_TYPE, + STRIPLINE_TYPE, + TWISTEDPAIR_TYPE, + END_OF_LIST_TYPE }; // A Class to handle parameters @@ -66,7 +66,7 @@ public: TRANSLINE_PRM( PRM_TYPE aType, PRMS_ID aId, class TRANSLINE_IDENT { 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 TRANSLINE* m_TLine; // The TRANSLINE itself wxArrayString m_Messages; // messages for results @@ -75,7 +75,7 @@ public: private: std::vector m_prms_List; -public: TRANSLINE_IDENT( enum transline_type_id aType ); +public: TRANSLINE_IDENT( enum TRANSLINE_TYPE_ID aType ); ~TRANSLINE_IDENT(); // Add a new param in list diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 768f76b161..d4fe33441d 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -505,6 +505,7 @@ if( USE_KIWAY_DLLS ) add_executable( pcbnew WIN32 MACOSX_BUNDLE ../common/single_top.cpp ../common/pgm_base.cpp + ${PCBNEW_RESOURCES} ) 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" @@ -527,7 +528,7 @@ if( USE_KIWAY_DLLS ) ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS} ${PCBNEW_SCRIPTING_SRCS} - ${PCBNEW_RESOURCES} +# ${PCBNEW_RESOURCES} ) set_target_properties( pcbnew_kiface PROPERTIES # Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 25ae74fa72..32b1569589 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -325,7 +326,11 @@ static bool scriptingSetup() const wxString python_us( "python27_us" ); // 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( wxDirExists( kipython ) )