~cern-kicad/kicad/kicad-pns-tom

« back to all changes in this revision

Viewing changes to pcbnew/pcbnew.cpp

  • Committer: Maciej Suminski
  • Date: 2013-08-02 13:57:24 UTC
  • mfrom: (4024.1.238 kicad)
  • mto: This revision was merged to the branch mainline in revision 4221.
  • Revision ID: maciej.suminski@cern.ch-20130802135724-gix6orezshkukodv
Upstream merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
    PCB_EDIT_FRAME* frame = NULL;
110
110
    wxString        msg;
111
111
 
 
112
    InitEDA_Appl( wxT( "Pcbnew" ), APP_PCBNEW_T );
 
113
 
112
114
#ifdef KICAD_SCRIPTING
113
 
    if ( !pcbnewInitPythonScripting() )
 
115
    msg.Empty();
 
116
#ifdef __WINDOWS__
 
117
    // TODO: make this path definable by the user, and set more than one path
 
118
    // (and remove the fixed paths from <src>/scripting/kicadplugins.i)
 
119
 
 
120
    // wizard plugins are stored in kicad/bin/plugins.
 
121
    // so add this path to python scripting defualt search paths
 
122
    // which are ( [KICAD_PATH] is an environment variable to define)
 
123
    // [KICAD_PATH]/scripting/plugins
 
124
    // Add this default search path:
 
125
    msg = wxGetApp().GetExecutablePath() + wxT("scripting/plugins");
 
126
#else
 
127
    // Add this default search path:
 
128
    msg = wxT("/usr/local/kicad/bin/scripting/plugins");
 
129
#endif
 
130
    // On linux and osx, 2 others paths are
 
131
    // [HOME]/.kicad_plugins/
 
132
    // [HOME]/.kicad/scripting/plugins/
 
133
    if ( !pcbnewInitPythonScripting( TO_UTF8(msg) ) )
114
134
    {
115
135
        wxMessageBox( wxT( "pcbnewInitPythonScripting() fails" ) );
116
136
        return false;
117
137
    }
118
138
#endif
119
139
 
120
 
    InitEDA_Appl( wxT( "Pcbnew" ), APP_PCBNEW_T );
121
 
 
122
140
    if( argc > 1 )
123
141
    {
124
142
        fn = argv[1];