Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
fb9e5b94
Commit
fb9e5b94
authored
Feb 15, 2014
by
Marco Serantoni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MacOSX] support for plugins in the bundle
parent
d5064b98
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
CMakeLists.txt
pcbnew/CMakeLists.txt
+9
-1
pcbnew.cpp
pcbnew/pcbnew.cpp
+4
-4
kicadplugins.i
scripting/kicadplugins.i
+5
-2
No files found.
pcbnew/CMakeLists.txt
View file @
fb9e5b94
...
...
@@ -607,6 +607,13 @@ if( KICAD_SCRIPTING )
DEPENDS FixSwigImportsScripting _pcbnew_py_copy
COMMENT
"Copying wxPython into pcbnew.app Framework"
)
add_custom_target
(
pcbnew_copy_plugins ALL
COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
PROJECT_SOURCE_DIR
}
/pcbnew/scripting/plugins
${
PROJECT_SOURCE_DIR
}
/pcbnew/pcbnew.app/Contents/PlugIns/scripting/plugins
DEPENDS pcbnew_copy_wxpython_scripting
COMMENT
"Copying plugins into bundle"
)
# fix bundle after copying wxpython, fixing and copying
add_dependencies
(
osx_fix_bundles pcbnew_copy_wxpython_scripting
)
endif
()
...
...
@@ -636,10 +643,11 @@ if( KICAD_SCRIPTING_MODULES )
)
add_custom_target
(
pcbnew_copy_wxpython_module ALL
COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
LIBWXPYTHON_ROOT
}
/wxPython
${
CMAKE
_SOURCE_DIR
}
/pcbnew/pcbnew.app/Contents/Frameworks/wxPython
COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
LIBWXPYTHON_ROOT
}
/wxPython
${
PROJECT
_SOURCE_DIR
}
/pcbnew/pcbnew.app/Contents/Frameworks/wxPython
DEPENDS FixSwigImportsModuleScripting _pcbnew_so_copy
COMMENT
"Copying wxPython into pcbnew.app Frameworks"
)
# Tell that we have to run osx_fix_bundles fix after building _pcbnew and migrating wxPython
add_dependencies
(
osx_fix_bundles pcbnew_copy_wxpython_module
)
add_dependencies
(
osx_fix_bundles _pcbnew
)
...
...
pcbnew/pcbnew.cpp
View file @
fb9e5b94
...
...
@@ -170,11 +170,11 @@ bool EDA_APP::OnInit()
// Prepend in PYTHONPATH the content of the bundle libraries !
wxSetEnv
(
"PYTHONPATH"
,((
wxGetenv
(
"PYTHONPATH"
)
!=
NULL
)
?
(
wxString
(
wxGetenv
(
"PYTHONPATH"
))
+
":"
)
:
wxString
(
""
))
+
"/Library/Application Support/kicad/scripting"
+
":"
+
bundledir
.
GetPath
()
+
"/PlugIns"
+
":"
+
wxString
(
wxGetenv
(
"HOME"
)
)
+
"/Library/Application Support/kicad/scripting"
+
bundledir
.
GetPath
()
+
"/Frameworks/wxPython/lib/python2.6/site-packages/wx-3.0-osx_cocoa"
"/Frameworks/wxPython/lib/python2.6/site-packages/wx-3.0-osx_cocoa"
+
":"
+
"/Library/Application Support/kicad/"
+
":"
+
bundledir
.
GetPath
()
+
"/PlugIns"
+
":"
+
wxString
(
wxGetenv
(
"HOME"
)
)
+
"/Library/Application Support/kicad/"
);
#endif
#endif
...
...
scripting/kicadplugins.i
View file @
fb9e5b94
...
...
@@ -80,11 +80,14 @@ def LoadPlugins( plugpath ):
if kicad_path and os.path.isdir(kicad_path):
plugin_directories.append(os.path.join(kicad_path, 'scripting', 'plugins'))
if sys.platform.startswith('linux')
or sys.platform.startswith('darwin')
:
if sys.platform.startswith('linux'):
plugin_directories.append(os.environ['HOME']+'/.kicad_plugins/')
plugin_directories.append(os.environ['HOME']+'/.kicad/scripting/plugins/')
if sys.platform.startswith('darwin'):
for singlepath in sys.path:
if os.path.isdir( os.path.join( singlepath, 'scripting', 'plugins') ):
plugin_directories.append( os.path.join( singlepath, 'scripting', 'plugins') )
for plugins_dir in plugin_directories:
sys.path.append(plugins_dir)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment