Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "swig"]
path = swig-of
url = https://github.com/chaosct/swig-openframeworks.git
url=https://github.com/danomatika/swig-openframeworks.git
Empty file modified README.md
100644 → 100755
Empty file.
38 changes: 38 additions & 0 deletions README_SWIG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
ofxPython
=========

It took me a bit to work out how to make this addon work with newer OF versions.

OSX
---
1. install homebrew
Go here [http://brew.sh](http://brew.sh) and copy the script which looks like this:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Past the script in to Terminal.app.
Hit enter.

2. install SWIG
Paste brew install swig in to Terminal.app and hit enter.

3. get newest swig-of
go to https://github.com/danomatika/swig-openframeworks and download the zip
place the content of the swig-of-master folder inside the already exisiting swig-of folder.

4. navigate the terminal to the addon folder
cd /Applications/of_v0.9.8_osx_release/addons/ofxPython
then run the script provided with the addon ./generatebindings.sh

It looks like generatebindings.sh also makes changes in each of the example folders.
I had to change ofCircle to ofDrawCircle in bin/data/myTest.sh.
I have tested this on OF v0.9.8 on OSX 10.11.6

I also was able to take this version of addon for 0.9.8 and just drop it in to 0.9.3. Works.


LINUX - Raspberry PI 3 armv6
----------------------------

1. install swig
sudo apt-get install swig

But the examples do not yet compile.
40 changes: 30 additions & 10 deletions addon_config.mk
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,39 @@ common:
# ADDON_LIBS_EXCLUDE =

linux64:
ADDON_SOURCES += src/ofxPython.cpp src/ofxPythonCallBack.cpp
ADDON_SOURCES += src/bindings/desktop/openFrameworks_wrap.cpp
ADDON_SOURCES += src/bindings/openFrameworks_extra_wrap.cpp
ADDON_DATA = lib/openframeworks.py
ADDON_DATA += lib/openframeworks_extra.py

ADDON_CFLAGS += -I/usr/include/python2.7
ADDON_LDFLAGS += -lpython2.7
ADDON_SOURCES_EXCLUDE += src/bindings/linuxarm/%
ADDON_INCLUDES_EXCLUDE += src/bindings/linuxarm/%

linux:
ADDON_SOURCES += src/ofxPython.cpp src/ofxPythonCallBack.cpp
ADDON_SOURCES += src/bindings/desktop/openFrameworks_wrap.cpp
ADDON_SOURCES += src/bindings/openFrameworks_extra_wrap.cpp
ADDON_DATA = lib/openframeworks.py
ADDON_DATA += lib/openframeworks_extra.py
ADDON_CFLAGS += -I/usr/include/python2.7
ADDON_LDFLAGS += -lpython2.7
ADDON_SOURCES_EXCLUDE += src/bindings/linuxarm/%
ADDON_INCLUDES_EXCLUDE += src/bindings/linuxarm/%

linuxarmv6l:

ADDON_DATA = lib/openframeworks.py
ADDON_DATA += lib/openframeworks_extra.py
ADDON_CFLAGS += -I/usr/include/python2.7
ADDON_LDFLAGS += -lpython2.7
ADDON_SOURCES_EXCLUDE += src/bindings/desktop/%
ADDON_INCLUDES_EXCLUDE += src/bindings/desktop/%
ADDON_LIBS_EXCLUDE += libs

linuxarmv7l:

ADDON_DATA = lib/openframeworks.py
ADDON_DATA += lib/openframeworks_extra.py
ADDON_CFLAGS += -I/usr/include/python2.7
ADDON_LDFLAGS += -lpython2.7
ADDON_SOURCES_EXCLUDE += src/bindings/desktop/%
ADDON_INCLUDES_EXCLUDE += src/bindings/desktop/%
ADDON_LIBS_EXCLUDE += libs

win_cb:
ADDON_SOURCES += src/ofxPython.cpp src/ofxPythonCallBack.cpp
ADDON_SOURCES += src/bindings/desktop/openFrameworks_wrap.cpp
Expand All @@ -87,11 +103,15 @@ win_cb:
ADDON_DATA += lib/openframeworks_extra.py
ADDON_CFLAGS += -IC:/Python27/include
ADDON_LDFLAGS += -LC:/Python27/libs -lpython
ADDON_SOURCES_EXCLUDE += src/bindings/linuxarm/%
ADDON_INCLUDES_EXCLUDE += src/bindings/linuxarm/%

android/armeabi:
android/armeabi:

android/armeabi-v7a:

osx:
ADDON_CFLAGS += -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
ADDON_LDFLAGS += -lpython2.7 -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config
ADDON_SOURCES_EXCLUDE += src/bindings/linuxarm/%
ADDON_INCLUDES_EXCLUDE += src/bindings/linuxarm/%
Empty file modified example_Callbacks/Makefile
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion example_Callbacks/Project.xcconfig
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
//IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
//ICON_FILE_PATH = bin/data/

OTHER_LDFLAGS = $(OF_CORE_LIBS)
OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS)
HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
Empty file modified example_Callbacks/addons.make
100644 → 100755
Empty file.
Empty file modified example_Callbacks/bin/data/.gitkeep
100644 → 100755
Empty file.
Loading