├── exampleApp ├── addons.make ├── src │ ├── Modules │ │ ├── BaseShape.h │ │ ├── RectangleShape.h │ │ └── RectangleShape.cpp │ ├── main.cpp │ ├── ofApp.h │ └── ofApp.cpp ├── exampleApp.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── project.pbxproj ├── icon.rc ├── Makefile ├── Project.xcconfig ├── openFrameworks-Info.plist ├── exampleApp.vcxproj.filters ├── example.sln ├── config.make └── exampleApp.vcxproj ├── examplePlugin ├── addons.make ├── examplePlugin.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── project.pbxproj ├── src │ ├── CircleShape.cpp │ ├── CircleShape.h │ └── plugin.cpp ├── examplePlugin.vcxproj.filters ├── Makefile ├── openFrameworks-Info.plist ├── Project.xcconfig ├── config.make └── examplePlugin.vcxproj ├── src ├── ofxPlugin │ ├── FactoryRegister.cpp │ ├── BaseModule.h │ ├── Factory.h │ ├── Plugin.h │ └── FactoryRegister.h └── ofxPlugin.h ├── .gitignore ├── ofxPluginLib ├── ofxPluginLib.filters ├── ofxPlugin.props ├── ofxPluginLib.vcxproj.filters └── ofxPluginLib.vcxproj └── Readme.md /exampleApp/addons.make: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examplePlugin/addons.make: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/ofxPlugin/FactoryRegister.cpp: -------------------------------------------------------------------------------- 1 | #include "FactoryRegister.h" 2 | 3 | namespace ofxPlugin { 4 | 5 | } -------------------------------------------------------------------------------- /src/ofxPlugin.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofxPlugin/BaseModule.h" 4 | #include "ofxPlugin/Factory.h" 5 | #include "ofxPlugin/FactoryRegister.h" 6 | #include "ofxPlugin/Plugin.h" 7 | -------------------------------------------------------------------------------- /src/ofxPlugin/BaseModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace ofxPlugin { 6 | class BaseModule { 7 | public: 8 | virtual std::string getTypeName() const = 0; 9 | }; 10 | } -------------------------------------------------------------------------------- /exampleApp/src/Modules/BaseShape.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxPlugin.h" 5 | 6 | class BaseShape : public ofxPlugin::BaseModule { 7 | public: 8 | virtual void draw() { }; 9 | 10 | float x; 11 | float y; 12 | }; -------------------------------------------------------------------------------- /exampleApp/src/Modules/RectangleShape.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "BaseShape.h" 4 | 5 | class RectangleShape : public BaseShape { 6 | public: 7 | void draw(); // override the draw function in BaseShape (this app) 8 | string getTypeName() const; // override the function to get the type name in BaseModule (ofxPlugin) 9 | }; -------------------------------------------------------------------------------- /exampleApp/exampleApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examplePlugin/examplePlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examplePlugin/src/CircleShape.cpp: -------------------------------------------------------------------------------- 1 | #include "CircleShape.h" 2 | 3 | //---------- 4 | void CircleShape::draw() { 5 | ofPushStyle(); 6 | 7 | ofSetColor(255, 100, 100); 8 | ofCircle(x, y, 15); 9 | 10 | ofPopStyle(); 11 | } 12 | 13 | //---------- 14 | string CircleShape::getTypeName() const { 15 | return "CircleShape"; 16 | } -------------------------------------------------------------------------------- /examplePlugin/src/CircleShape.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../../exampleApp/src/Modules/BaseShape.h" 4 | 5 | class CircleShape : public BaseShape { 6 | public: 7 | void draw(); // override the draw function in BaseShape (this app) 8 | string getTypeName() const; // override the function to get the type name in BaseModule (ofxPlugin) 9 | }; -------------------------------------------------------------------------------- /exampleApp/icon.rc: -------------------------------------------------------------------------------- 1 | // Icon Resource Definition 2 | #define MAIN_ICON 102 3 | 4 | #if defined(_DEBUG) 5 | MAIN_ICON ICON "..\..\..\libs\openFrameworksCompiled\project\vs\icon_debug.ico" 6 | #else 7 | MAIN_ICON ICON "..\..\..\libs\openFrameworksCompiled\project\vs\icon.ico" 8 | #endif 9 | -------------------------------------------------------------------------------- /exampleApp/src/Modules/RectangleShape.cpp: -------------------------------------------------------------------------------- 1 | #include "RectangleShape.h" 2 | 3 | //---------- 4 | void RectangleShape::draw() { 5 | ofPushStyle(); 6 | 7 | ofSetColor(100, 100, 255); 8 | ofRect(x - 15, y - 15, 30, 30); 9 | 10 | ofPopStyle(); 11 | } 12 | 13 | //---------- 14 | string RectangleShape::getTypeName() const { 15 | return "RectangleShape"; 16 | } -------------------------------------------------------------------------------- /examplePlugin/examplePlugin.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /exampleApp/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | libs/ 2 | docs/ 3 | 4 | *.depend 5 | *.layout 6 | *.mode*v3 7 | *.pbxuser 8 | *.app* 9 | *.DS_* 10 | ._*.* 11 | 12 | .svn/ 13 | obj/ 14 | bin/ 15 | build/ 16 | !data/ 17 | xcuserdata/ 18 | 19 | ipch/ 20 | *.suo 21 | *.opensdf 22 | *.vcxproj.user 23 | 24 | *.obj 25 | *.tlog 26 | *.sdf 27 | *.pdb 28 | *.idb 29 | *.pch 30 | Debug/ 31 | Release/ 32 | 33 | 34 | *~.xml 35 | 36 | Sketch*/ -------------------------------------------------------------------------------- /exampleApp/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /examplePlugin/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /examplePlugin/src/plugin.cpp: -------------------------------------------------------------------------------- 1 | #include "ofxPlugin.h" 2 | 3 | // This file 'plugin.cpp' in your plugin is like the 'main.cpp' of your application. 4 | // One big difference is that YOU DO HAVE TO edit this file! (unlike main.cpp generally) 5 | 6 | // First include the headers for any classes that you want to include 7 | #include "CircleShape.h" 8 | 9 | OFXPLUGIN_PLUGIN_MODULES_BEGIN(BaseShape) 10 | OFXPLUGIN_PLUGIN_REGISTER_MODULE(CircleShape); 11 | OFXPLUGIN_PLUGIN_MODULES_END 12 | 13 | OFXPLUGIN_EXPORT void initPlugin(); -------------------------------------------------------------------------------- /ofxPluginLib/ofxPluginLib.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {c56f51df-af7a-4fa0-9beb-93a8d4777c6d} 6 | 7 | 8 | {1dd95e4e-983b-4142-8244-8e0646951f2c} 9 | 10 | 11 | 12 | 13 | src 14 | 15 | 16 | -------------------------------------------------------------------------------- /exampleApp/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 18 | -------------------------------------------------------------------------------- /ofxPluginLib/ofxPlugin.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | .\src;..\..\..\addons\ofxPlugin\src;%(AdditionalIncludeDirectories) 11 | BUILD_$(AssemblyName);%(PreprocessorDefinitions) 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /exampleApp/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.ofapp 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | 22 | 23 | -------------------------------------------------------------------------------- /examplePlugin/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.ofapp 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | 22 | 23 | -------------------------------------------------------------------------------- /examplePlugin/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 18 | 19 | PLUGIN_INSTALL_PATH = $(SRCROOT)/../exampleApp/bin 20 | -------------------------------------------------------------------------------- /src/ofxPlugin/Factory.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "BaseModule.h" 4 | 5 | #include 6 | 7 | namespace ofxPlugin { 8 | template 9 | class BaseFactory { 10 | public: 11 | virtual std::shared_ptr makeUntyped() = 0; 12 | const std::string & getModuleTypeName() const { 13 | return this->moduleTypeName; 14 | } 15 | protected: 16 | std::string moduleTypeName; 17 | }; 18 | 19 | template 20 | class Factory : public BaseFactory { 21 | public: 22 | Factory() { 23 | //briefly instantiate a test module so that we can take its name 24 | auto testModule = this->make(); 25 | auto testModuleBaseTyped = std::static_pointer_cast(testModule); 26 | this->moduleTypeName = testModuleBaseTyped->getTypeName(); 27 | } 28 | 29 | std::shared_ptr makeUntyped() override { 30 | return std::static_pointer_cast(this->make()); 31 | } 32 | 33 | std::shared_ptr make() { 34 | return std::make_shared(); 35 | } 36 | }; 37 | } -------------------------------------------------------------------------------- /ofxPluginLib/ofxPluginLib.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ofxPlugin 7 | 8 | 9 | ofxPlugin 10 | 11 | 12 | ofxPlugin 13 | 14 | 15 | ofxPlugin 16 | 17 | 18 | 19 | 20 | {63c7c0c7-3d15-444a-9ec5-f16591e5ae20} 21 | 22 | 23 | 24 | 25 | ofxPlugin 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /exampleApp/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxPlugin.h" 5 | 6 | #include "Modules/BaseShape.h" 7 | #include "Modules/RectangleShape.h" 8 | 9 | using namespace ofxPlugin; 10 | 11 | class ofApp : public ofBaseApp{ 12 | 13 | public: 14 | void setup(); 15 | void update(); 16 | void draw(); 17 | 18 | void keyPressed(int key); 19 | void keyReleased(int key); 20 | void mouseMoved(int x, int y ); 21 | void mouseDragged(int x, int y, int button); 22 | void mousePressed(int x, int y, int button); 23 | void mouseReleased(int x, int y, int button); 24 | void windowResized(int w, int h); 25 | void dragEvent(ofDragInfo dragInfo); 26 | void gotMessage(ofMessage msg); 27 | 28 | // This is the list of factories 29 | // (Factories create classes) 30 | // Each FactoryRegister is associated with a base type, 31 | // and all the factories inside it create classes which 32 | // inherit from this base type. 33 | FactoryRegister factoryRegister; 34 | 35 | // This is the currently selected factory 36 | map>>::iterator iterator; 37 | 38 | // These are the classes which we've created 39 | vector> shapes; 40 | }; 41 | -------------------------------------------------------------------------------- /exampleApp/exampleApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | src 6 | 7 | 8 | src 9 | 10 | 11 | src\Modules 12 | 13 | 14 | 15 | 16 | {d8376475-7454-4a24-b08a-aac121d3ad6f} 17 | 18 | 19 | {abf35468-8c4f-4c34-a95a-fbb42f9f8e0b} 20 | 21 | 22 | 23 | 24 | src 25 | 26 | 27 | src\Modules 28 | 29 | 30 | src\Modules 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/ofxPlugin/Plugin.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofAppRunner.h" 4 | #include "ofGLRenderer.h" 5 | #include "FactoryRegister.h" 6 | #include "ofxSingleton.h" 7 | 8 | #include 9 | 10 | //define the export syntax 11 | #ifdef WIN32 12 | #define OFXPLUGIN_EXPORT __declspec(dllexport) 13 | #else 14 | #define OFXPLUGIN_EXPORT 15 | #endif 16 | 17 | 18 | //generally we don't use the declraration 19 | #define OFXPLUGIN_INIT_DECLARATION(ModuleBaseType) \ 20 | extern "C" { \ 21 | OFXPLUGIN_EXPORT void initPlugin(ofxPlugin::FactoryRegister::PluginInitArgs * pluginInitArgs); \ 22 | } 23 | 24 | // Define debug detector 25 | #if defined(NDEBUG) && !defined(_DEBUG) 26 | #define CHECK_DEBUG OFXPLUGIN_EXPORT bool getPluginIsDebug() { return false; } 27 | #else 28 | #define CHECK_DEBUG OFXPLUGIN_EXPORT bool getPluginIsDebug() { return true; } 29 | #endif 30 | 31 | 32 | //use this in the cpp file. If we don't have the declaration, then we need to wrap this in extern "C" 33 | #define OFXPLUGIN_INIT_DEFINITION_BEGIN(ModuleBaseType) \ 34 | CHECK_DEBUG \ 35 | OFXPLUGIN_EXPORT const char * getPluginTypeName() { \ 36 | return typeid(ModuleBaseType).name(); \ 37 | } \ 38 | OFXPLUGIN_EXPORT void initPlugin(ofxPlugin::FactoryRegister::PluginInitArgs * pluginInitArgs) { \ 39 | glewInit(); \ 40 | //ofSetMainLoop(pluginInitArgs->mainLoop); /* set mainloop singleton from app into plugin */ \ 41 | //ofxSingleton::Register::X().setParentRegister(pluginInitArgs->singletonRegister); // set plugin singleton register to have app's singleton register as parent 42 | #define OFXPLUGIN_INIT_DEFINITION_END \ 43 | } 44 | 45 | 46 | //use this once per module that you want to register 47 | #define OFXPLUGIN_PLUGIN_REGISTER_MODULE(Module) \ 48 | pluginInitArgs->factoryRegister->add() 49 | 50 | 51 | //this wraps the declaration in an extern "C" 52 | #define OFXPLUGIN_PLUGIN_MODULES_BEGIN(ModuleBaseType) \ 53 | extern "C" { \ 54 | OFXPLUGIN_INIT_DEFINITION_BEGIN(ModuleBaseType) 55 | 56 | #define OFXPLUGIN_PLUGIN_MODULES_END \ 57 | OFXPLUGIN_INIT_DEFINITION_END \ 58 | } 59 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | Write a plugin in openFrameworks. Write an app which can load those plugins at runtime in openFrameworks. You have: 4 | 5 | * Application has `main.cpp` 6 | * Plugin has `plugin.cpp` 7 | 8 | Example pattern: 9 | * Application contains an abstract class definition `BaseShape` 10 | * Plugin has a class `CircleShape` which inherits `BaseShape` 11 | * Application loads Plugin, and now can create instances of `CircleShape` 12 | 13 | ## Naming conventions: 14 | * `Module` - A (non-abstract) class which the Plugin provides (this is the content of your plugin, your plugin may define 1 or more `Module`s) 15 | * `ModuleBaseType` - A (abstract) class which the Module inherits from 16 | * `Factory` - A class which can instantiate other classes, e.g. a `Factory` can create instances of `MyModule` class 17 | * `FactoryRegister` - A class which contains a list of `Factory`s. All the `Factory`s inside this register will create `Module`s which inherit from `ModuleBaseType`. 18 | 19 | # Requirements / Compatability 20 | 21 | Currently runs on oF 0.9.0 in Windows. Thanks to work by @satoruhiga, ofxPlugin will compile in OSX without issues, but the main plugin loading features are still untested. 22 | 23 | Tested on Visual Studio 2015, but should work on earlier versions too (be aware of changing the `Platform Toolset` option in all the relevant projects). 24 | 25 | ## Addon dependencies 26 | 27 | You must have the following addons available in your `addons` folder: 28 | 29 | * [ofxSingleton](https://github.com/elliotwoods/ofxSingleton) (tested with 3af7ff04ff2fcb71a11c0960e8dfe32f043f4165 on 2015/10/08) 30 | * [ofxAddonLib](https://github.com/elliotwoods/ofxAddonLib) (tested with 6c3b3a6bfcaacf8b6340abb8444030e604b65e89 on 2015/10/08) 31 | 32 | # Notes 33 | 34 | ## Usage pattern 35 | 36 | A `Factory` is something which instantiates classes for you. For each module (i.e. class type), you'll have one `Factory` which can instantiate that class at runtime. 37 | 38 | ofxPlugin provides a `FactoryRegister` where you can store all these factories. When you load a plugin, it adds the factories from that plugin to the `FactoryRegister` 39 | 40 | Your `ModuleBaseType` must be a non abstract class, i.e. it cannot have something like `virtual void draw() = 0;`. This hurts I know, but it's necessary for a factory model to work in many situations. 41 | 42 | Your plugin needs references to openframeworksLib, ofxSingletonLib, and anything else it references. 43 | 44 | # Current limitations / Known issues 45 | 46 | * All plugins in one dll must inherit from the same `ModuleBaseType` 47 | * Plugins are never unloaded until the application terminates (you can still manually remove factories from the `FactoryRegister`). 48 | -------------------------------------------------------------------------------- /exampleApp/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | using namespace ofxPlugin; 4 | 5 | //-------------------------------------------------------------- 6 | void ofApp::setup() { 7 | ofSetBackgroundColor(40); 8 | 9 | // Tell the factory register to make a factory for type RectangleShape, the example module which comes with the app 10 | factoryRegister.add(); 11 | 12 | // (1/2) 13 | // Load our plugin dll (windows) / dylib (osx) 14 | // The path is relative to the data folder, so we use .. 15 | // true = verbose mode 16 | #ifdef _WIN32 17 | factoryRegister.loadPlugin("../examplePlugin.dll", true); 18 | #else 19 | factoryRegister.loadPlugin("../examplePlugin.dylib", true); 20 | #endif 21 | 22 | // Every time the mouse moves, we're going to choose a new shape to make (i.e. step through the list of factories) 23 | auto firstFactory = factoryRegister.begin(); 24 | this->iterator = firstFactory; 25 | } 26 | 27 | //-------------------------------------------------------------- 28 | void ofApp::update(){ 29 | 30 | } 31 | 32 | //-------------------------------------------------------------- 33 | void ofApp::draw(){ 34 | ofPushStyle(); 35 | ofSetLineWidth(2.0f); 36 | ofNoFill(); 37 | 38 | for (auto shape : this->shapes) { 39 | shape->draw(); 40 | } 41 | 42 | ofPopStyle(); 43 | } 44 | 45 | //-------------------------------------------------------------- 46 | void ofApp::keyPressed(int key){ 47 | if (key == ' ') { 48 | this->shapes.clear(); 49 | } 50 | } 51 | 52 | //-------------------------------------------------------------- 53 | void ofApp::keyReleased(int key){ 54 | 55 | } 56 | 57 | //-------------------------------------------------------------- 58 | void ofApp::mouseMoved(int x, int y){ 59 | 60 | // (2/2) 61 | // We call 'makeUntyped' on the factory 62 | // This creates a new class, which is returned in a shared_ptr 63 | // This shared_ptr can be dynamically cast into the specific type (e.g. RectangleShape / CircleShape) if we need 64 | auto shape = iterator->second->makeUntyped(); 65 | 66 | cout << shape->getTypeName() << ", "; 67 | 68 | shape->x = x; 69 | shape->y = y; 70 | this->shapes.push_back(shape); 71 | 72 | //loop through all the factories 73 | iterator++; // step forwards 74 | if (iterator == this->factoryRegister.end()) { // if we've stepped over the end 75 | iterator = this->factoryRegister.begin(); // start again 76 | } 77 | } 78 | 79 | //-------------------------------------------------------------- 80 | void ofApp::mouseDragged(int x, int y, int button){ 81 | 82 | } 83 | 84 | //-------------------------------------------------------------- 85 | void ofApp::mousePressed(int x, int y, int button){ 86 | 87 | } 88 | 89 | //-------------------------------------------------------------- 90 | void ofApp::mouseReleased(int x, int y, int button){ 91 | 92 | } 93 | 94 | //-------------------------------------------------------------- 95 | void ofApp::windowResized(int w, int h){ 96 | 97 | } 98 | 99 | //-------------------------------------------------------------- 100 | void ofApp::gotMessage(ofMessage msg){ 101 | 102 | } 103 | 104 | //-------------------------------------------------------------- 105 | void ofApp::dragEvent(ofDragInfo dragInfo){ 106 | 107 | } 108 | -------------------------------------------------------------------------------- /exampleApp/example.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio 14 3 | VisualStudioVersion = 14.0.23107.0 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openframeworksLib", "..\..\..\libs\openFrameworksCompiled\project\vs\openframeworksLib.vcxproj", "{5837595D-ACA9-485C-8E76-729040CE4B0B}" 6 | EndProject 7 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ofxPluginLib", "..\ofxPluginLib\ofxPluginLib.vcxproj", "{68B9239B-5AE6-45C0-B1CB-6FC6B58BB6EE}" 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exampleApp", "exampleApp.vcxproj", "{7FD42DF7-442E-479A-BA76-D0022F99702A}" 10 | EndProject 11 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examplePlugin", "..\examplePlugin\examplePlugin.vcxproj", "{F8877612-5358-423D-980F-28A6DBDF252E}" 12 | EndProject 13 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ofxSingleton", "..\..\..\addons\ofxSingleton\ofxSingletonLib\ofxSingleton.vcxproj", "{4D3BCFDD-E65D-4247-B303-E0839CAEC6A6}" 14 | EndProject 15 | Global 16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 17 | Debug|Win32 = Debug|Win32 18 | Debug|x64 = Debug|x64 19 | Release|Win32 = Release|Win32 20 | Release|x64 = Release|x64 21 | EndGlobalSection 22 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 23 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Release|x64 24 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Release|x64 25 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.ActiveCfg = Release|x64 26 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.Build.0 = Release|x64 27 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|x64 28 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|x64 29 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.ActiveCfg = Release|x64 30 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.Build.0 = Release|x64 31 | {68B9239B-5AE6-45C0-B1CB-6FC6B58BB6EE}.Debug|Win32.ActiveCfg = Release|x64 32 | {68B9239B-5AE6-45C0-B1CB-6FC6B58BB6EE}.Debug|Win32.Build.0 = Release|x64 33 | {68B9239B-5AE6-45C0-B1CB-6FC6B58BB6EE}.Debug|x64.ActiveCfg = Release|x64 34 | {68B9239B-5AE6-45C0-B1CB-6FC6B58BB6EE}.Debug|x64.Build.0 = Release|x64 35 | {68B9239B-5AE6-45C0-B1CB-6FC6B58BB6EE}.Release|Win32.ActiveCfg = Release|x64 36 | {68B9239B-5AE6-45C0-B1CB-6FC6B58BB6EE}.Release|Win32.Build.0 = Release|x64 37 | {68B9239B-5AE6-45C0-B1CB-6FC6B58BB6EE}.Release|x64.ActiveCfg = Release|x64 38 | {68B9239B-5AE6-45C0-B1CB-6FC6B58BB6EE}.Release|x64.Build.0 = Release|x64 39 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Release|x64 40 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Release|x64 41 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.ActiveCfg = Release|x64 42 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.Build.0 = Release|x64 43 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|x64 44 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|x64 45 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.ActiveCfg = Release|x64 46 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.Build.0 = Release|x64 47 | {F8877612-5358-423D-980F-28A6DBDF252E}.Debug|Win32.ActiveCfg = Release|x64 48 | {F8877612-5358-423D-980F-28A6DBDF252E}.Debug|Win32.Build.0 = Release|x64 49 | {F8877612-5358-423D-980F-28A6DBDF252E}.Debug|x64.ActiveCfg = Release|x64 50 | {F8877612-5358-423D-980F-28A6DBDF252E}.Debug|x64.Build.0 = Release|x64 51 | {F8877612-5358-423D-980F-28A6DBDF252E}.Release|Win32.ActiveCfg = Release|x64 52 | {F8877612-5358-423D-980F-28A6DBDF252E}.Release|Win32.Build.0 = Release|x64 53 | {F8877612-5358-423D-980F-28A6DBDF252E}.Release|x64.ActiveCfg = Release|x64 54 | {F8877612-5358-423D-980F-28A6DBDF252E}.Release|x64.Build.0 = Release|x64 55 | {4D3BCFDD-E65D-4247-B303-E0839CAEC6A6}.Debug|Win32.ActiveCfg = Release|x64 56 | {4D3BCFDD-E65D-4247-B303-E0839CAEC6A6}.Debug|Win32.Build.0 = Release|x64 57 | {4D3BCFDD-E65D-4247-B303-E0839CAEC6A6}.Debug|x64.ActiveCfg = Release|x64 58 | {4D3BCFDD-E65D-4247-B303-E0839CAEC6A6}.Debug|x64.Build.0 = Release|x64 59 | {4D3BCFDD-E65D-4247-B303-E0839CAEC6A6}.Release|Win32.ActiveCfg = Release|Win32 60 | {4D3BCFDD-E65D-4247-B303-E0839CAEC6A6}.Release|Win32.Build.0 = Release|Win32 61 | {4D3BCFDD-E65D-4247-B303-E0839CAEC6A6}.Release|x64.ActiveCfg = Release|x64 62 | {4D3BCFDD-E65D-4247-B303-E0839CAEC6A6}.Release|x64.Build.0 = Release|x64 63 | EndGlobalSection 64 | GlobalSection(SolutionProperties) = preSolution 65 | HideSolutionNode = FALSE 66 | EndGlobalSection 67 | EndGlobal 68 | -------------------------------------------------------------------------------- /exampleApp/config.make: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # CONFIGURE PROJECT MAKEFILE (optional) 3 | # This file is where we make project specific configurations. 4 | ################################################################################ 5 | 6 | ################################################################################ 7 | # OF ROOT 8 | # The location of your root openFrameworks installation 9 | # (default) OF_ROOT = ../../.. 10 | ################################################################################ 11 | # OF_ROOT = ../../.. 12 | 13 | ################################################################################ 14 | # PROJECT ROOT 15 | # The location of the project - a starting place for searching for files 16 | # (default) PROJECT_ROOT = . (this directory) 17 | # 18 | ################################################################################ 19 | # PROJECT_ROOT = . 20 | 21 | ################################################################################ 22 | # PROJECT SPECIFIC CHECKS 23 | # This is a project defined section to create internal makefile flags to 24 | # conditionally enable or disable the addition of various features within 25 | # this makefile. For instance, if you want to make changes based on whether 26 | # GTK is installed, one might test that here and create a variable to check. 27 | ################################################################################ 28 | # None 29 | 30 | ################################################################################ 31 | # PROJECT EXTERNAL SOURCE PATHS 32 | # These are fully qualified paths that are not within the PROJECT_ROOT folder. 33 | # Like source folders in the PROJECT_ROOT, these paths are subject to 34 | # exlclusion via the PROJECT_EXLCUSIONS list. 35 | # 36 | # (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) 37 | # 38 | # Note: Leave a leading space when adding list items with the += operator 39 | ################################################################################ 40 | # PROJECT_EXTERNAL_SOURCE_PATHS = 41 | 42 | ################################################################################ 43 | # PROJECT EXCLUSIONS 44 | # These makefiles assume that all folders in your current project directory 45 | # and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations 46 | # to look for source code. The any folders or files that match any of the 47 | # items in the PROJECT_EXCLUSIONS list below will be ignored. 48 | # 49 | # Each item in the PROJECT_EXCLUSIONS list will be treated as a complete 50 | # string unless teh user adds a wildcard (%) operator to match subdirectories. 51 | # GNU make only allows one wildcard for matching. The second wildcard (%) is 52 | # treated literally. 53 | # 54 | # (default) PROJECT_EXCLUSIONS = (blank) 55 | # 56 | # Will automatically exclude the following: 57 | # 58 | # $(PROJECT_ROOT)/bin% 59 | # $(PROJECT_ROOT)/obj% 60 | # $(PROJECT_ROOT)/%.xcodeproj 61 | # 62 | # Note: Leave a leading space when adding list items with the += operator 63 | ################################################################################ 64 | # PROJECT_EXCLUSIONS = 65 | 66 | ################################################################################ 67 | # PROJECT LINKER FLAGS 68 | # These flags will be sent to the linker when compiling the executable. 69 | # 70 | # (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs 71 | # 72 | # Note: Leave a leading space when adding list items with the += operator 73 | ################################################################################ 74 | 75 | # Currently, shared libraries that are needed are copied to the 76 | # $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to 77 | # add a runtime path to search for those shared libraries, since they aren't 78 | # incorporated directly into the final executable application binary. 79 | # TODO: should this be a default setting? 80 | # PROJECT_LDFLAGS=-Wl,-rpath=./libs 81 | 82 | ################################################################################ 83 | # PROJECT DEFINES 84 | # Create a space-delimited list of DEFINES. The list will be converted into 85 | # CFLAGS with the "-D" flag later in the makefile. 86 | # 87 | # (default) PROJECT_DEFINES = (blank) 88 | # 89 | # Note: Leave a leading space when adding list items with the += operator 90 | ################################################################################ 91 | # PROJECT_DEFINES = 92 | 93 | ################################################################################ 94 | # PROJECT CFLAGS 95 | # This is a list of fully qualified CFLAGS required when compiling for this 96 | # project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS 97 | # defined in your platform specific core configuration files. These flags are 98 | # presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. 99 | # 100 | # (default) PROJECT_CFLAGS = (blank) 101 | # 102 | # Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in 103 | # your platform specific configuration file will be applied by default and 104 | # further flags here may not be needed. 105 | # 106 | # Note: Leave a leading space when adding list items with the += operator 107 | ################################################################################ 108 | # PROJECT_CFLAGS = 109 | 110 | ################################################################################ 111 | # PROJECT OPTIMIZATION CFLAGS 112 | # These are lists of CFLAGS that are target-specific. While any flags could 113 | # be conditionally added, they are usually limited to optimization flags. 114 | # These flags are added BEFORE the PROJECT_CFLAGS. 115 | # 116 | # PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. 117 | # 118 | # (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) 119 | # 120 | # PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. 121 | # 122 | # (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) 123 | # 124 | # Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the 125 | # PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration 126 | # file will be applied by default and further optimization flags here may not 127 | # be needed. 128 | # 129 | # Note: Leave a leading space when adding list items with the += operator 130 | ################################################################################ 131 | # PROJECT_OPTIMIZATION_CFLAGS_RELEASE = 132 | # PROJECT_OPTIMIZATION_CFLAGS_DEBUG = 133 | 134 | ################################################################################ 135 | # PROJECT COMPILERS 136 | # Custom compilers can be set for CC and CXX 137 | # (default) PROJECT_CXX = (blank) 138 | # (default) PROJECT_CC = (blank) 139 | # Note: Leave a leading space when adding list items with the += operator 140 | ################################################################################ 141 | # PROJECT_CXX = 142 | # PROJECT_CC = 143 | -------------------------------------------------------------------------------- /examplePlugin/config.make: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # CONFIGURE PROJECT MAKEFILE (optional) 3 | # This file is where we make project specific configurations. 4 | ################################################################################ 5 | 6 | ################################################################################ 7 | # OF ROOT 8 | # The location of your root openFrameworks installation 9 | # (default) OF_ROOT = ../../.. 10 | ################################################################################ 11 | # OF_ROOT = ../../.. 12 | 13 | ################################################################################ 14 | # PROJECT ROOT 15 | # The location of the project - a starting place for searching for files 16 | # (default) PROJECT_ROOT = . (this directory) 17 | # 18 | ################################################################################ 19 | # PROJECT_ROOT = . 20 | 21 | ################################################################################ 22 | # PROJECT SPECIFIC CHECKS 23 | # This is a project defined section to create internal makefile flags to 24 | # conditionally enable or disable the addition of various features within 25 | # this makefile. For instance, if you want to make changes based on whether 26 | # GTK is installed, one might test that here and create a variable to check. 27 | ################################################################################ 28 | # None 29 | 30 | ################################################################################ 31 | # PROJECT EXTERNAL SOURCE PATHS 32 | # These are fully qualified paths that are not within the PROJECT_ROOT folder. 33 | # Like source folders in the PROJECT_ROOT, these paths are subject to 34 | # exlclusion via the PROJECT_EXLCUSIONS list. 35 | # 36 | # (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) 37 | # 38 | # Note: Leave a leading space when adding list items with the += operator 39 | ################################################################################ 40 | # PROJECT_EXTERNAL_SOURCE_PATHS = 41 | 42 | ################################################################################ 43 | # PROJECT EXCLUSIONS 44 | # These makefiles assume that all folders in your current project directory 45 | # and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations 46 | # to look for source code. The any folders or files that match any of the 47 | # items in the PROJECT_EXCLUSIONS list below will be ignored. 48 | # 49 | # Each item in the PROJECT_EXCLUSIONS list will be treated as a complete 50 | # string unless teh user adds a wildcard (%) operator to match subdirectories. 51 | # GNU make only allows one wildcard for matching. The second wildcard (%) is 52 | # treated literally. 53 | # 54 | # (default) PROJECT_EXCLUSIONS = (blank) 55 | # 56 | # Will automatically exclude the following: 57 | # 58 | # $(PROJECT_ROOT)/bin% 59 | # $(PROJECT_ROOT)/obj% 60 | # $(PROJECT_ROOT)/%.xcodeproj 61 | # 62 | # Note: Leave a leading space when adding list items with the += operator 63 | ################################################################################ 64 | # PROJECT_EXCLUSIONS = 65 | 66 | ################################################################################ 67 | # PROJECT LINKER FLAGS 68 | # These flags will be sent to the linker when compiling the executable. 69 | # 70 | # (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs 71 | # 72 | # Note: Leave a leading space when adding list items with the += operator 73 | ################################################################################ 74 | 75 | # Currently, shared libraries that are needed are copied to the 76 | # $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to 77 | # add a runtime path to search for those shared libraries, since they aren't 78 | # incorporated directly into the final executable application binary. 79 | # TODO: should this be a default setting? 80 | # PROJECT_LDFLAGS=-Wl,-rpath=./libs 81 | 82 | ################################################################################ 83 | # PROJECT DEFINES 84 | # Create a space-delimited list of DEFINES. The list will be converted into 85 | # CFLAGS with the "-D" flag later in the makefile. 86 | # 87 | # (default) PROJECT_DEFINES = (blank) 88 | # 89 | # Note: Leave a leading space when adding list items with the += operator 90 | ################################################################################ 91 | # PROJECT_DEFINES = 92 | 93 | ################################################################################ 94 | # PROJECT CFLAGS 95 | # This is a list of fully qualified CFLAGS required when compiling for this 96 | # project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS 97 | # defined in your platform specific core configuration files. These flags are 98 | # presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. 99 | # 100 | # (default) PROJECT_CFLAGS = (blank) 101 | # 102 | # Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in 103 | # your platform specific configuration file will be applied by default and 104 | # further flags here may not be needed. 105 | # 106 | # Note: Leave a leading space when adding list items with the += operator 107 | ################################################################################ 108 | # PROJECT_CFLAGS = 109 | 110 | ################################################################################ 111 | # PROJECT OPTIMIZATION CFLAGS 112 | # These are lists of CFLAGS that are target-specific. While any flags could 113 | # be conditionally added, they are usually limited to optimization flags. 114 | # These flags are added BEFORE the PROJECT_CFLAGS. 115 | # 116 | # PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. 117 | # 118 | # (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) 119 | # 120 | # PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. 121 | # 122 | # (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) 123 | # 124 | # Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the 125 | # PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration 126 | # file will be applied by default and further optimization flags here may not 127 | # be needed. 128 | # 129 | # Note: Leave a leading space when adding list items with the += operator 130 | ################################################################################ 131 | # PROJECT_OPTIMIZATION_CFLAGS_RELEASE = 132 | # PROJECT_OPTIMIZATION_CFLAGS_DEBUG = 133 | 134 | ################################################################################ 135 | # PROJECT COMPILERS 136 | # Custom compilers can be set for CC and CXX 137 | # (default) PROJECT_CXX = (blank) 138 | # (default) PROJECT_CC = (blank) 139 | # Note: Leave a leading space when adding list items with the += operator 140 | ################################################################################ 141 | # PROJECT_CXX = 142 | # PROJECT_CC = 143 | -------------------------------------------------------------------------------- /examplePlugin/examplePlugin.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {F8877612-5358-423D-980F-28A6DBDF252E} 23 | examplePlugin 24 | 8.1 25 | 26 | 27 | 28 | DynamicLibrary 29 | true 30 | v140 31 | MultiByte 32 | 33 | 34 | DynamicLibrary 35 | true 36 | v140 37 | MultiByte 38 | 39 | 40 | DynamicLibrary 41 | false 42 | v140 43 | true 44 | MultiByte 45 | 46 | 47 | DynamicLibrary 48 | false 49 | v140 50 | true 51 | MultiByte 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | Level3 83 | Disabled 84 | true 85 | 86 | 87 | true 88 | 89 | 90 | 91 | 92 | Level3 93 | Disabled 94 | true 95 | 96 | 97 | true 98 | 99 | 100 | 101 | 102 | Level3 103 | MaxSpeed 104 | true 105 | true 106 | true 107 | 108 | 109 | true 110 | true 111 | true 112 | 113 | 114 | 115 | 116 | Level3 117 | MaxSpeed 118 | true 119 | true 120 | true 121 | 122 | 123 | true 124 | true 125 | true 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | {5837595d-aca9-485c-8e76-729040ce4b0b} 138 | 139 | 140 | {4d3bcfdd-e65d-4247-b303-e0839caec6a6} 141 | 142 | 143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /src/ofxPlugin/FactoryRegister.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Factory.h" 4 | 5 | #include "ofAppRunner.h" 6 | #include "ofConstants.h" 7 | 8 | #include "ofxSingleton.h" 9 | 10 | #ifdef _MSC_VER 11 | #include 12 | #else 13 | #include 14 | #define GetProcAddress(DLL, NAME) dlsym(DLL, NAME) 15 | #define FreeLibrary(DLL) dlclose(DLL) 16 | #endif 17 | 18 | #include 19 | 20 | namespace ofxPlugin { 21 | template 22 | class FactoryRegister : public std::map>> { 23 | public: 24 | //---------- 25 | struct PluginInitArgs { 26 | std::shared_ptr mainLoop; 27 | FactoryRegister * factoryRegister; 28 | ofxSingleton::Register * singletonRegister; 29 | }; 30 | 31 | //---------- 32 | typedef void(*InitPluginFunctionType)(PluginInitArgs *); 33 | typedef const char* (*GetPluginTypeNameType)(); 34 | typedef bool(*GetPluginIsDebugType)(); 35 | 36 | //---------- 37 | typedef ofxPlugin::BaseFactory BaseFactory; 38 | 39 | //---------- 40 | ///Add a factory which you already have to the register 41 | void add(std::shared_ptr baseFactory) { 42 | this->insert(pair>(baseFactory->getModuleTypeName(), baseFactory)); 43 | } 44 | 45 | //---------- 46 | ///Create a factory for a specific type (defined in the template arguments of the function call) and add it to the register. 47 | template 48 | void add() { 49 | this->add(std::make_shared>()); 50 | } 51 | 52 | //---------- 53 | ///Get a factory for a specific type (defined in the template arguments of the function call). Returns an empty pointer if factory wasn't found 54 | template 55 | std::shared_ptr get() { 56 | auto moduleTypeName = ModuleType().getTypeName(); 57 | return this->get(moduleTypeName); 58 | } 59 | 60 | //---------- 61 | ///Get a factory for a specific type (defined by moduleNameType). Returns an empty pointer if factory wasn't found 62 | std::shared_ptr get(std::string moduleTypeName) { 63 | auto findFactory = this->find(moduleTypeName); 64 | if (findFactory == this->end()) { 65 | return shared_ptr(); 66 | } 67 | else { 68 | return findFactory->second; 69 | } 70 | } 71 | 72 | //---------- 73 | // from http://www.codeproject.com/Tips/479880/GetLastError-as-std-string 74 | std::string GetLastErrorStdStr() 75 | { 76 | #ifdef _MSC_VER 77 | DWORD error = GetLastError(); 78 | if (error) 79 | { 80 | LPVOID lpMsgBuf; 81 | DWORD bufLen = FormatMessageA( 82 | FORMAT_MESSAGE_ALLOCATE_BUFFER | 83 | FORMAT_MESSAGE_FROM_SYSTEM | 84 | FORMAT_MESSAGE_IGNORE_INSERTS, 85 | NULL, 86 | error, 87 | MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), 88 | (LPSTR)&lpMsgBuf, 89 | 0, NULL); 90 | if (bufLen) 91 | { 92 | LPCSTR lpMsgStr = (LPCSTR)lpMsgBuf; 93 | std::string result(lpMsgStr, lpMsgStr + bufLen); 94 | 95 | LocalFree(lpMsgBuf); 96 | 97 | return result; 98 | } 99 | } 100 | #else 101 | char *error = dlerror(); 102 | if (error) 103 | { 104 | return error; 105 | } 106 | #endif 107 | return std::string(); 108 | } 109 | 110 | //---------- 111 | ///Load any factories from the plugin which match this FactoryRegister 112 | bool loadPlugin(std::filesystem::path path, bool verbose = false) { 113 | //transform path to data path 114 | if (path.is_relative()) { 115 | path = std::filesystem::path(ofToDataPath("")) / path; 116 | } 117 | 118 | //attempt to load DLL 119 | #ifdef _MSC_VER 120 | auto dll = LoadLibraryW(path.wstring().c_str()); 121 | #else 122 | auto dll = dlopen(path.string().c_str(), RTLD_LAZY); 123 | #endif 124 | if (!dll) { 125 | auto errorMessage = GetLastErrorStdStr(); 126 | ofLogWarning("ofxPlugin") << "Failed to open dynamic library file [" << path << "]. " << errorMessage; 127 | return false; 128 | } 129 | 130 | //check if dll contains plugin and what type it is 131 | auto getPluginTypeName = (GetPluginTypeNameType)GetProcAddress(dll, "getPluginTypeName"); 132 | if (!getPluginTypeName) { 133 | if (verbose) { 134 | ofLogWarning("ofxPlugin") << "This DLL file is not a plugin"; 135 | } 136 | FreeLibrary(dll); 137 | return false; 138 | } 139 | 140 | //check if dll is of same build type 141 | auto getPluginIsDebug = (GetPluginIsDebugType)GetProcAddress(dll, "getPluginIsDebug"); 142 | if (!getPluginIsDebug) { 143 | if (verbose) { 144 | ofLogWarning("ofxPlugin") << "Couldn't determine build type"; 145 | } 146 | FreeLibrary(dll); 147 | return false; 148 | } 149 | else { 150 | auto pluginIsDebug = getPluginIsDebug(); 151 | #if defined(NDEBUG) && !defined(_DEBUG) 152 | bool appIsDebug = false; 153 | #else 154 | bool appIsDebug = true; 155 | #endif 156 | if (pluginIsDebug != appIsDebug) { 157 | if (verbose) { 158 | ofLogWarning("ofxPlugin") << "Plugin is not of same build type as application"; 159 | } 160 | FreeLibrary(dll); 161 | return false; 162 | } 163 | } 164 | 165 | auto pluginTypeName = getPluginTypeName(); 166 | auto ourTypeName = typeid(ModuleBaseType).name(); 167 | if (string(pluginTypeName) != string(ourTypeName)) { 168 | if (verbose) { 169 | ofLogWarning("ofxPlugin") << "This DLL file contains a plugin of the incorrect type (" << pluginTypeName << "), we are (" << ourTypeName << ")"; 170 | } 171 | FreeLibrary(dll); 172 | return false; 173 | } 174 | 175 | //attempt to initialise plugin 176 | auto initPlugin = (InitPluginFunctionType) GetProcAddress(dll, "initPlugin"); 177 | if (!initPlugin) { 178 | if (verbose) { 179 | ofLogWarning("ofxPlugin") << "This DLL file is not a plugin"; 180 | } 181 | FreeLibrary(dll); 182 | return false; 183 | } 184 | 185 | //we are currently in the main application 186 | //the initialisation arguments are the 'ofMainLoop' singleton, this factory register, and the 187 | auto singletonRegisterRawPointer = ofxSingleton::Register::X().getInstance().get(); 188 | PluginInitArgs pluginInitArgs = { 189 | ofGetMainLoop(), 190 | this, 191 | singletonRegisterRawPointer 192 | }; 193 | initPlugin(&pluginInitArgs); 194 | 195 | return true; 196 | } 197 | 198 | //---------- 199 | ///Look within a path for dll's and try and find plugins there 200 | void loadPlugins(std::string searchPath = "../", bool verbose = true) { 201 | if (verbose) { 202 | cout << "--" << endl; 203 | cout << "Loading plugins of type [" << typeid(ModuleBaseType).name() << "] begin" << endl; 204 | } 205 | auto exePath = ofToDataPath(searchPath, true); 206 | for (auto & entry : std::filesystem::directory_iterator(exePath)) { 207 | const auto extension = entry.path().extension(); 208 | #ifdef TARGET_WIN32 209 | string desiredExtension = ".dll"; 210 | #else 211 | string desiredExtension = ".dylib"; 212 | #endif 213 | if (ofToLower(extension.string()) == desiredExtension) { 214 | try { 215 | this->loadPlugin(entry.path(), false); // try to load it as a plugin 216 | } 217 | catch (std::exception e) { 218 | ofLogError("ofxPlugin") << "Failed to load '" << entry.path() << "' : " << e.what(); 219 | } 220 | } 221 | } 222 | 223 | if (verbose) { 224 | cout << "Loading plugins of type [" << typeid(ModuleBaseType).name() << "] end" << endl; 225 | cout << "--" << endl; 226 | } 227 | } 228 | }; 229 | } -------------------------------------------------------------------------------- /ofxPluginLib/ofxPluginLib.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {68B9239B-5AE6-45C0-B1CB-6FC6B58BB6EE} 23 | ofxPlugin 24 | 8.1 25 | ofxPluginLib 26 | 10.0 27 | 28 | 29 | 30 | true 31 | v142 32 | MultiByte 33 | StaticLibrary 34 | 35 | 36 | true 37 | v142 38 | MultiByte 39 | StaticLibrary 40 | 41 | 42 | false 43 | v142 44 | true 45 | MultiByte 46 | StaticLibrary 47 | 48 | 49 | false 50 | v142 51 | true 52 | MultiByte 53 | StaticLibrary 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | Level3 89 | Disabled 90 | true 91 | 92 | 93 | true 94 | 95 | 96 | 97 | 98 | Level3 99 | Disabled 100 | true 101 | 102 | 103 | true 104 | 105 | 106 | 107 | 108 | Level3 109 | MaxSpeed 110 | true 111 | true 112 | true 113 | 114 | 115 | true 116 | true 117 | true 118 | 119 | 120 | 121 | 122 | Level3 123 | MaxSpeed 124 | true 125 | true 126 | true 127 | 128 | 129 | true 130 | true 131 | true 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /exampleApp/exampleApp.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {7FD42DF7-442E-479A-BA76-D0022F99702A} 23 | Win32Proj 24 | example 25 | exampleApp 26 | 27 | 28 | 29 | Application 30 | Unicode 31 | v140 32 | 33 | 34 | Application 35 | Unicode 36 | v140 37 | 38 | 39 | Application 40 | Unicode 41 | true 42 | v140 43 | 44 | 45 | Application 46 | Unicode 47 | true 48 | v140 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | bin\ 74 | obj\$(Configuration)\ 75 | $(ProjectName)_debug 76 | true 77 | true 78 | 79 | 80 | $(ProjectName)_debug 81 | true 82 | true 83 | 84 | 85 | bin\ 86 | obj\$(Configuration)\ 87 | false 88 | 89 | 90 | false 91 | 92 | 93 | 94 | Disabled 95 | true 96 | EnableFastChecks 97 | %(PreprocessorDefinitions) 98 | MultiThreadedDebugDLL 99 | Level3 100 | EditAndContinue 101 | %(AdditionalIncludeDirectories) 102 | CompileAsCpp 103 | 104 | 105 | true 106 | Console 107 | false 108 | %(AdditionalDependencies) 109 | %(AdditionalLibraryDirectories) 110 | 111 | 112 | 113 | 114 | Disabled 115 | EnableFastChecks 116 | %(PreprocessorDefinitions) 117 | MultiThreadedDebugDLL 118 | Level3 119 | ProgramDatabase 120 | %(AdditionalIncludeDirectories) 121 | CompileAsCpp 122 | 123 | 124 | true 125 | Console 126 | false 127 | %(AdditionalDependencies) 128 | %(AdditionalLibraryDirectories) 129 | 130 | 131 | 132 | 133 | false 134 | %(PreprocessorDefinitions) 135 | MultiThreadedDLL 136 | Level3 137 | %(AdditionalIncludeDirectories) 138 | CompileAsCpp 139 | 140 | 141 | false 142 | false 143 | Console 144 | true 145 | true 146 | false 147 | %(AdditionalDependencies) 148 | %(AdditionalLibraryDirectories) 149 | 150 | 151 | 152 | 153 | false 154 | %(PreprocessorDefinitions) 155 | MultiThreadedDLL 156 | Level3 157 | %(AdditionalIncludeDirectories) 158 | CompileAsCpp 159 | 160 | 161 | false 162 | false 163 | Console 164 | true 165 | true 166 | false 167 | %(AdditionalDependencies) 168 | %(AdditionalLibraryDirectories) 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | {5837595d-aca9-485c-8e76-729040ce4b0b} 184 | 185 | 186 | {68b9239b-5ae6-45c0-b1cb-6fc6b58bb6ee} 187 | 188 | 189 | 190 | 191 | /D_DEBUG %(AdditionalOptions) 192 | /D_DEBUG %(AdditionalOptions) 193 | 194 | 195 | 196 | -------------------------------------------------------------------------------- /examplePlugin/examplePlugin.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | E71500D61C219FA70020A52F /* CircleShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E715007C1C219E640020A52F /* CircleShape.cpp */; }; 11 | E71500D71C219FAA0020A52F /* plugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E715007E1C219E640020A52F /* plugin.cpp */; }; 12 | E71500D81C219FB20020A52F /* BaseStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E71500B61C219E810020A52F /* BaseStore.cpp */; }; 13 | E71500D91C219FB60020A52F /* Register.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E71500B81C219E810020A52F /* Register.cpp */; }; 14 | E71500DA1C219FBB0020A52F /* FactoryRegister.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E71500861C219E750020A52F /* FactoryRegister.cpp */; }; 15 | E7C0F75C1C21A0A600AF4CC1 /* openFrameworksDebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4328148138ABC890047C5CB /* openFrameworksDebug.a */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXContainerItemProxy section */ 19 | E4328147138ABC890047C5CB /* PBXContainerItemProxy */ = { 20 | isa = PBXContainerItemProxy; 21 | containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 22 | proxyType = 2; 23 | remoteGlobalIDString = E4B27C1510CBEB8E00536013; 24 | remoteInfo = openFrameworks; 25 | }; 26 | E7C0F75A1C21A09200AF4CC1 /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 29 | proxyType = 1; 30 | remoteGlobalIDString = E4B27C1410CBEB8E00536013; 31 | remoteInfo = openFrameworks; 32 | }; 33 | /* End PBXContainerItemProxy section */ 34 | 35 | /* Begin PBXFileReference section */ 36 | E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; }; 37 | E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = ""; }; 38 | E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = CoreOF.xcconfig; path = ../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig; sourceTree = SOURCE_ROOT; }; 39 | E4EB6923138AFD0F00A09F29 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = ""; }; 40 | E715007C1C219E640020A52F /* CircleShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CircleShape.cpp; sourceTree = ""; }; 41 | E715007D1C219E640020A52F /* CircleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CircleShape.h; sourceTree = ""; }; 42 | E715007E1C219E640020A52F /* plugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = plugin.cpp; sourceTree = ""; }; 43 | E71500841C219E750020A52F /* BaseModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseModule.h; sourceTree = ""; }; 44 | E71500851C219E750020A52F /* Factory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Factory.h; sourceTree = ""; }; 45 | E71500861C219E750020A52F /* FactoryRegister.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FactoryRegister.cpp; sourceTree = ""; }; 46 | E71500871C219E750020A52F /* FactoryRegister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FactoryRegister.h; sourceTree = ""; }; 47 | E71500881C219E750020A52F /* Plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Plugin.h; sourceTree = ""; }; 48 | E71500891C219E750020A52F /* ofxPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxPlugin.h; sourceTree = ""; }; 49 | E71500B61C219E810020A52F /* BaseStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BaseStore.cpp; sourceTree = ""; }; 50 | E71500B71C219E810020A52F /* BaseStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseStore.h; sourceTree = ""; }; 51 | E71500B81C219E810020A52F /* Register.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Register.cpp; sourceTree = ""; }; 52 | E71500B91C219E810020A52F /* Register.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Register.h; sourceTree = ""; }; 53 | E71500BA1C219E810020A52F /* Singleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Singleton.h; sourceTree = ""; }; 54 | E71500BB1C219E810020A52F /* UnmanagedSingleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnmanagedSingleton.h; sourceTree = ""; }; 55 | E71500BC1C219E810020A52F /* ofxSingleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxSingleton.h; sourceTree = ""; }; 56 | E71500CB1C219F850020A52F /* examplePlugin.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = examplePlugin.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | E71500C81C219F850020A52F /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | E7C0F75C1C21A0A600AF4CC1 /* openFrameworksDebug.a in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | 6948EE371B920CB800B5AC1A /* local_addons */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | ); 75 | name = local_addons; 76 | sourceTree = ""; 77 | }; 78 | BB4B014C10F69532006C3DED /* addons */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | E715008B1C219E810020A52F /* ofxSingleton */, 82 | E71500811C219E690020A52F /* ofxPlugin */, 83 | ); 84 | name = addons; 85 | sourceTree = ""; 86 | }; 87 | E4328144138ABC890047C5CB /* Products */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | E4328148138ABC890047C5CB /* openFrameworksDebug.a */, 91 | ); 92 | name = Products; 93 | sourceTree = ""; 94 | }; 95 | E4B69B4A0A3A1720003C02F2 = { 96 | isa = PBXGroup; 97 | children = ( 98 | E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */, 99 | E4EB6923138AFD0F00A09F29 /* Project.xcconfig */, 100 | E4B69E1C0A3A1BDC003C02F2 /* src */, 101 | E4EEC9E9138DF44700A80321 /* openFrameworks */, 102 | BB4B014C10F69532006C3DED /* addons */, 103 | 6948EE371B920CB800B5AC1A /* local_addons */, 104 | E71500CB1C219F850020A52F /* examplePlugin.dylib */, 105 | ); 106 | sourceTree = ""; 107 | }; 108 | E4B69E1C0A3A1BDC003C02F2 /* src */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | E715007C1C219E640020A52F /* CircleShape.cpp */, 112 | E715007D1C219E640020A52F /* CircleShape.h */, 113 | E715007E1C219E640020A52F /* plugin.cpp */, 114 | ); 115 | path = src; 116 | sourceTree = SOURCE_ROOT; 117 | }; 118 | E4EEC9E9138DF44700A80321 /* openFrameworks */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */, 122 | E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */, 123 | ); 124 | name = openFrameworks; 125 | sourceTree = ""; 126 | }; 127 | E71500811C219E690020A52F /* ofxPlugin */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | E71500821C219E750020A52F /* src */, 131 | ); 132 | name = ofxPlugin; 133 | sourceTree = ""; 134 | }; 135 | E71500821C219E750020A52F /* src */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | E71500831C219E750020A52F /* ofxPlugin */, 139 | E71500891C219E750020A52F /* ofxPlugin.h */, 140 | ); 141 | name = src; 142 | path = ../src; 143 | sourceTree = ""; 144 | }; 145 | E71500831C219E750020A52F /* ofxPlugin */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | E71500841C219E750020A52F /* BaseModule.h */, 149 | E71500851C219E750020A52F /* Factory.h */, 150 | E71500861C219E750020A52F /* FactoryRegister.cpp */, 151 | E71500871C219E750020A52F /* FactoryRegister.h */, 152 | E71500881C219E750020A52F /* Plugin.h */, 153 | ); 154 | path = ofxPlugin; 155 | sourceTree = ""; 156 | }; 157 | E715008B1C219E810020A52F /* ofxSingleton */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | E71500B41C219E810020A52F /* src */, 161 | ); 162 | name = ofxSingleton; 163 | path = ../../ofxSingleton; 164 | sourceTree = ""; 165 | }; 166 | E71500B41C219E810020A52F /* src */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | E71500B51C219E810020A52F /* ofxSingleton */, 170 | E71500BC1C219E810020A52F /* ofxSingleton.h */, 171 | ); 172 | path = src; 173 | sourceTree = ""; 174 | }; 175 | E71500B51C219E810020A52F /* ofxSingleton */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | E71500B61C219E810020A52F /* BaseStore.cpp */, 179 | E71500B71C219E810020A52F /* BaseStore.h */, 180 | E71500B81C219E810020A52F /* Register.cpp */, 181 | E71500B91C219E810020A52F /* Register.h */, 182 | E71500BA1C219E810020A52F /* Singleton.h */, 183 | E71500BB1C219E810020A52F /* UnmanagedSingleton.h */, 184 | ); 185 | path = ofxSingleton; 186 | sourceTree = ""; 187 | }; 188 | /* End PBXGroup section */ 189 | 190 | /* Begin PBXHeadersBuildPhase section */ 191 | E71500C91C219F850020A52F /* Headers */ = { 192 | isa = PBXHeadersBuildPhase; 193 | buildActionMask = 2147483647; 194 | files = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | /* End PBXHeadersBuildPhase section */ 199 | 200 | /* Begin PBXNativeTarget section */ 201 | E71500CA1C219F850020A52F /* examplePlugin */ = { 202 | isa = PBXNativeTarget; 203 | buildConfigurationList = E71500D31C219F850020A52F /* Build configuration list for PBXNativeTarget "examplePlugin" */; 204 | buildPhases = ( 205 | E71500C71C219F850020A52F /* Sources */, 206 | E71500C81C219F850020A52F /* Frameworks */, 207 | E71500C91C219F850020A52F /* Headers */, 208 | E7C0F7601C21AFC800AF4CC1 /* ShellScript */, 209 | ); 210 | buildRules = ( 211 | ); 212 | dependencies = ( 213 | E7C0F75B1C21A09200AF4CC1 /* PBXTargetDependency */, 214 | ); 215 | name = examplePlugin; 216 | productName = examplePlugin; 217 | productReference = E71500CB1C219F850020A52F /* examplePlugin.dylib */; 218 | productType = "com.apple.product-type.library.dynamic"; 219 | }; 220 | /* End PBXNativeTarget section */ 221 | 222 | /* Begin PBXProject section */ 223 | E4B69B4C0A3A1720003C02F2 /* Project object */ = { 224 | isa = PBXProject; 225 | attributes = { 226 | LastUpgradeCheck = 0600; 227 | TargetAttributes = { 228 | E71500CA1C219F850020A52F = { 229 | CreatedOnToolsVersion = 7.1.1; 230 | }; 231 | }; 232 | }; 233 | buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "examplePlugin" */; 234 | compatibilityVersion = "Xcode 3.2"; 235 | developmentRegion = English; 236 | hasScannedForEncodings = 0; 237 | knownRegions = ( 238 | English, 239 | Japanese, 240 | French, 241 | German, 242 | ); 243 | mainGroup = E4B69B4A0A3A1720003C02F2; 244 | productRefGroup = E4B69B4A0A3A1720003C02F2; 245 | projectDirPath = ""; 246 | projectReferences = ( 247 | { 248 | ProductGroup = E4328144138ABC890047C5CB /* Products */; 249 | ProjectRef = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 250 | }, 251 | ); 252 | projectRoot = ""; 253 | targets = ( 254 | E71500CA1C219F850020A52F /* examplePlugin */, 255 | ); 256 | }; 257 | /* End PBXProject section */ 258 | 259 | /* Begin PBXReferenceProxy section */ 260 | E4328148138ABC890047C5CB /* openFrameworksDebug.a */ = { 261 | isa = PBXReferenceProxy; 262 | fileType = archive.ar; 263 | path = openFrameworksDebug.a; 264 | remoteRef = E4328147138ABC890047C5CB /* PBXContainerItemProxy */; 265 | sourceTree = BUILT_PRODUCTS_DIR; 266 | }; 267 | /* End PBXReferenceProxy section */ 268 | 269 | /* Begin PBXShellScriptBuildPhase section */ 270 | E7C0F7601C21AFC800AF4CC1 /* ShellScript */ = { 271 | isa = PBXShellScriptBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | ); 275 | inputPaths = ( 276 | ); 277 | outputPaths = ( 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | shellPath = /bin/sh; 281 | shellScript = "rsync -aved ../../../libs/fmodex/lib/osx/libfmodex.dylib \"$PLUGIN_INSTALL_PATH\";\nrsync -aved \"$CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.$EXECUTABLE_EXTENSION\" \"$PLUGIN_INSTALL_PATH\";\n"; 282 | }; 283 | /* End PBXShellScriptBuildPhase section */ 284 | 285 | /* Begin PBXSourcesBuildPhase section */ 286 | E71500C71C219F850020A52F /* Sources */ = { 287 | isa = PBXSourcesBuildPhase; 288 | buildActionMask = 2147483647; 289 | files = ( 290 | E71500D71C219FAA0020A52F /* plugin.cpp in Sources */, 291 | E71500DA1C219FBB0020A52F /* FactoryRegister.cpp in Sources */, 292 | E71500D81C219FB20020A52F /* BaseStore.cpp in Sources */, 293 | E71500D91C219FB60020A52F /* Register.cpp in Sources */, 294 | E71500D61C219FA70020A52F /* CircleShape.cpp in Sources */, 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | }; 298 | /* End PBXSourcesBuildPhase section */ 299 | 300 | /* Begin PBXTargetDependency section */ 301 | E7C0F75B1C21A09200AF4CC1 /* PBXTargetDependency */ = { 302 | isa = PBXTargetDependency; 303 | name = openFrameworks; 304 | targetProxy = E7C0F75A1C21A09200AF4CC1 /* PBXContainerItemProxy */; 305 | }; 306 | /* End PBXTargetDependency section */ 307 | 308 | /* Begin XCBuildConfiguration section */ 309 | E4B69B4E0A3A1720003C02F2 /* Debug */ = { 310 | isa = XCBuildConfiguration; 311 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 312 | buildSettings = { 313 | CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; 314 | COPY_PHASE_STRIP = NO; 315 | DEAD_CODE_STRIPPING = YES; 316 | GCC_AUTO_VECTORIZATION = YES; 317 | GCC_ENABLE_SSE3_EXTENSIONS = YES; 318 | GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; 319 | GCC_INLINES_ARE_PRIVATE_EXTERN = NO; 320 | GCC_OPTIMIZATION_LEVEL = 0; 321 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 322 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 323 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; 324 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; 325 | GCC_WARN_UNINITIALIZED_AUTOS = NO; 326 | GCC_WARN_UNUSED_VALUE = NO; 327 | GCC_WARN_UNUSED_VARIABLE = NO; 328 | HEADER_SEARCH_PATHS = ( 329 | "$(OF_CORE_HEADERS)", 330 | src, 331 | ); 332 | MACOSX_DEPLOYMENT_TARGET = 10.8; 333 | ONLY_ACTIVE_ARCH = YES; 334 | OTHER_CPLUSPLUSFLAGS = ( 335 | "-D__MACOSX_CORE__", 336 | "-mtune=native", 337 | ); 338 | SDKROOT = macosx; 339 | }; 340 | name = Debug; 341 | }; 342 | E4B69B4F0A3A1720003C02F2 /* Release */ = { 343 | isa = XCBuildConfiguration; 344 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 345 | buildSettings = { 346 | CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; 347 | COPY_PHASE_STRIP = YES; 348 | DEAD_CODE_STRIPPING = YES; 349 | GCC_AUTO_VECTORIZATION = YES; 350 | GCC_ENABLE_SSE3_EXTENSIONS = YES; 351 | GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; 352 | GCC_INLINES_ARE_PRIVATE_EXTERN = NO; 353 | GCC_OPTIMIZATION_LEVEL = 3; 354 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 355 | GCC_UNROLL_LOOPS = YES; 356 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 357 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; 358 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; 359 | GCC_WARN_UNINITIALIZED_AUTOS = NO; 360 | GCC_WARN_UNUSED_VALUE = NO; 361 | GCC_WARN_UNUSED_VARIABLE = NO; 362 | HEADER_SEARCH_PATHS = ( 363 | "$(OF_CORE_HEADERS)", 364 | src, 365 | ); 366 | MACOSX_DEPLOYMENT_TARGET = 10.8; 367 | OTHER_CPLUSPLUSFLAGS = ( 368 | "-D__MACOSX_CORE__", 369 | "-mtune=native", 370 | ); 371 | SDKROOT = macosx; 372 | }; 373 | name = Release; 374 | }; 375 | E71500D41C219F850020A52F /* Debug */ = { 376 | isa = XCBuildConfiguration; 377 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 378 | buildSettings = { 379 | ALWAYS_SEARCH_USER_PATHS = NO; 380 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 381 | CLANG_CXX_LIBRARY = "libc++"; 382 | CLANG_ENABLE_MODULES = YES; 383 | CLANG_ENABLE_OBJC_ARC = YES; 384 | CLANG_WARN_BOOL_CONVERSION = YES; 385 | CLANG_WARN_CONSTANT_CONVERSION = YES; 386 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 387 | CLANG_WARN_EMPTY_BODY = YES; 388 | CLANG_WARN_ENUM_CONVERSION = YES; 389 | CLANG_WARN_INT_CONVERSION = YES; 390 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 391 | CLANG_WARN_UNREACHABLE_CODE = YES; 392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 393 | CODE_SIGN_IDENTITY = "-"; 394 | DEBUG_INFORMATION_FORMAT = dwarf; 395 | DYLIB_COMPATIBILITY_VERSION = 1; 396 | DYLIB_CURRENT_VERSION = 1; 397 | ENABLE_STRICT_OBJC_MSGSEND = YES; 398 | ENABLE_TESTABILITY = YES; 399 | GCC_C_LANGUAGE_STANDARD = gnu99; 400 | GCC_DYNAMIC_NO_PIC = NO; 401 | GCC_ENABLE_CPP_EXCEPTIONS = YES; 402 | GCC_ENABLE_CPP_RTTI = YES; 403 | GCC_NO_COMMON_BLOCKS = YES; 404 | GCC_PREPROCESSOR_DEFINITIONS = ( 405 | "DEBUG=1", 406 | "$(inherited)", 407 | ); 408 | GCC_SYMBOLS_PRIVATE_EXTERN = YES; 409 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 410 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 411 | GCC_WARN_UNDECLARED_SELECTOR = YES; 412 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 413 | GCC_WARN_UNUSED_FUNCTION = YES; 414 | GCC_WARN_UNUSED_VARIABLE = YES; 415 | MACOSX_DEPLOYMENT_TARGET = 10.11; 416 | MTL_ENABLE_DEBUG_INFO = YES; 417 | PRODUCT_NAME = examplePlugin; 418 | }; 419 | name = Debug; 420 | }; 421 | E71500D51C219F850020A52F /* Release */ = { 422 | isa = XCBuildConfiguration; 423 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 424 | buildSettings = { 425 | ALWAYS_SEARCH_USER_PATHS = NO; 426 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 427 | CLANG_CXX_LIBRARY = "libc++"; 428 | CLANG_ENABLE_MODULES = YES; 429 | CLANG_ENABLE_OBJC_ARC = YES; 430 | CLANG_WARN_BOOL_CONVERSION = YES; 431 | CLANG_WARN_CONSTANT_CONVERSION = YES; 432 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 433 | CLANG_WARN_EMPTY_BODY = YES; 434 | CLANG_WARN_ENUM_CONVERSION = YES; 435 | CLANG_WARN_INT_CONVERSION = YES; 436 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 437 | CLANG_WARN_UNREACHABLE_CODE = YES; 438 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 439 | CODE_SIGN_IDENTITY = "-"; 440 | COPY_PHASE_STRIP = NO; 441 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 442 | DYLIB_COMPATIBILITY_VERSION = 1; 443 | DYLIB_CURRENT_VERSION = 1; 444 | ENABLE_NS_ASSERTIONS = NO; 445 | ENABLE_STRICT_OBJC_MSGSEND = YES; 446 | GCC_C_LANGUAGE_STANDARD = gnu99; 447 | GCC_ENABLE_CPP_EXCEPTIONS = YES; 448 | GCC_ENABLE_CPP_RTTI = YES; 449 | GCC_NO_COMMON_BLOCKS = YES; 450 | GCC_SYMBOLS_PRIVATE_EXTERN = YES; 451 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 452 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 453 | GCC_WARN_UNDECLARED_SELECTOR = YES; 454 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 455 | GCC_WARN_UNUSED_FUNCTION = YES; 456 | GCC_WARN_UNUSED_VARIABLE = YES; 457 | MACOSX_DEPLOYMENT_TARGET = 10.11; 458 | MTL_ENABLE_DEBUG_INFO = NO; 459 | PRODUCT_NAME = examplePlugin; 460 | }; 461 | name = Release; 462 | }; 463 | /* End XCBuildConfiguration section */ 464 | 465 | /* Begin XCConfigurationList section */ 466 | E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "examplePlugin" */ = { 467 | isa = XCConfigurationList; 468 | buildConfigurations = ( 469 | E4B69B4E0A3A1720003C02F2 /* Debug */, 470 | E4B69B4F0A3A1720003C02F2 /* Release */, 471 | ); 472 | defaultConfigurationIsVisible = 0; 473 | defaultConfigurationName = Release; 474 | }; 475 | E71500D31C219F850020A52F /* Build configuration list for PBXNativeTarget "examplePlugin" */ = { 476 | isa = XCConfigurationList; 477 | buildConfigurations = ( 478 | E71500D41C219F850020A52F /* Debug */, 479 | E71500D51C219F850020A52F /* Release */, 480 | ); 481 | defaultConfigurationIsVisible = 0; 482 | defaultConfigurationName = Release; 483 | }; 484 | /* End XCConfigurationList section */ 485 | }; 486 | rootObject = E4B69B4C0A3A1720003C02F2 /* Project object */; 487 | } 488 | -------------------------------------------------------------------------------- /exampleApp/exampleApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4328148138ABC890047C5CB /* openFrameworksDebug.a */; }; 11 | E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; }; 12 | E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */; }; 13 | E715003E1C2199F10020A52F /* FactoryRegister.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E715002C1C2199F10020A52F /* FactoryRegister.cpp */; }; 14 | E71500791C219A830020A52F /* BaseStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E715006A1C219A830020A52F /* BaseStore.cpp */; }; 15 | E715007A1C219A830020A52F /* Register.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E715006C1C219A830020A52F /* Register.cpp */; }; 16 | E715FFD81C2199B90020A52F /* RectangleShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E715FFD61C2199B90020A52F /* RectangleShape.cpp */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | E4328147138ABC890047C5CB /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 23 | proxyType = 2; 24 | remoteGlobalIDString = E4B27C1510CBEB8E00536013; 25 | remoteInfo = openFrameworks; 26 | }; 27 | E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 30 | proxyType = 1; 31 | remoteGlobalIDString = E4B27C1410CBEB8E00536013; 32 | remoteInfo = openFrameworks; 33 | }; 34 | /* End PBXContainerItemProxy section */ 35 | 36 | /* Begin PBXCopyFilesBuildPhase section */ 37 | E4C2427710CC5ABF004149E2 /* CopyFiles */ = { 38 | isa = PBXCopyFilesBuildPhase; 39 | buildActionMask = 2147483647; 40 | dstPath = ""; 41 | dstSubfolderSpec = 10; 42 | files = ( 43 | ); 44 | runOnlyForDeploymentPostprocessing = 0; 45 | }; 46 | /* End PBXCopyFilesBuildPhase section */ 47 | 48 | /* Begin PBXFileReference section */ 49 | E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; }; 50 | E4B69B5B0A3A1756003C02F2 /* exampleAppDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = exampleAppDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; }; 52 | E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofApp.cpp; path = src/ofApp.cpp; sourceTree = SOURCE_ROOT; }; 53 | E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ofApp.h; path = src/ofApp.h; sourceTree = SOURCE_ROOT; }; 54 | E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = ""; }; 55 | E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = CoreOF.xcconfig; path = ../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig; sourceTree = SOURCE_ROOT; }; 56 | E4EB6923138AFD0F00A09F29 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = ""; }; 57 | E715002A1C2199F10020A52F /* BaseModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseModule.h; sourceTree = ""; }; 58 | E715002B1C2199F10020A52F /* Factory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Factory.h; sourceTree = ""; }; 59 | E715002C1C2199F10020A52F /* FactoryRegister.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FactoryRegister.cpp; sourceTree = ""; }; 60 | E715002D1C2199F10020A52F /* FactoryRegister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FactoryRegister.h; sourceTree = ""; }; 61 | E715002E1C2199F10020A52F /* Plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Plugin.h; sourceTree = ""; }; 62 | E715002F1C2199F10020A52F /* ofxPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxPlugin.h; sourceTree = ""; }; 63 | E715006A1C219A830020A52F /* BaseStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BaseStore.cpp; sourceTree = ""; }; 64 | E715006B1C219A830020A52F /* BaseStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseStore.h; sourceTree = ""; }; 65 | E715006C1C219A830020A52F /* Register.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Register.cpp; sourceTree = ""; }; 66 | E715006D1C219A830020A52F /* Register.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Register.h; sourceTree = ""; }; 67 | E715006E1C219A830020A52F /* Singleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Singleton.h; sourceTree = ""; }; 68 | E715006F1C219A830020A52F /* UnmanagedSingleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnmanagedSingleton.h; sourceTree = ""; }; 69 | E71500701C219A830020A52F /* ofxSingleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxSingleton.h; sourceTree = ""; }; 70 | E715FFD51C2199B90020A52F /* BaseShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseShape.h; sourceTree = ""; }; 71 | E715FFD61C2199B90020A52F /* RectangleShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RectangleShape.cpp; sourceTree = ""; }; 72 | E715FFD71C2199B90020A52F /* RectangleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RectangleShape.h; sourceTree = ""; }; 73 | /* End PBXFileReference section */ 74 | 75 | /* Begin PBXFrameworksBuildPhase section */ 76 | E4B69B590A3A1756003C02F2 /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */, 81 | ); 82 | runOnlyForDeploymentPostprocessing = 0; 83 | }; 84 | /* End PBXFrameworksBuildPhase section */ 85 | 86 | /* Begin PBXGroup section */ 87 | 6948EE371B920CB800B5AC1A /* local_addons */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | ); 91 | name = local_addons; 92 | sourceTree = ""; 93 | }; 94 | BB4B014C10F69532006C3DED /* addons */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | E715003F1C219A830020A52F /* ofxSingleton */, 98 | E715FFD91C2199F10020A52F /* ofxPlugin */, 99 | ); 100 | name = addons; 101 | sourceTree = ""; 102 | }; 103 | E4328144138ABC890047C5CB /* Products */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | E4328148138ABC890047C5CB /* openFrameworksDebug.a */, 107 | ); 108 | name = Products; 109 | sourceTree = ""; 110 | }; 111 | E4B69B4A0A3A1720003C02F2 = { 112 | isa = PBXGroup; 113 | children = ( 114 | E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */, 115 | E4EB6923138AFD0F00A09F29 /* Project.xcconfig */, 116 | E4B69E1C0A3A1BDC003C02F2 /* src */, 117 | E4EEC9E9138DF44700A80321 /* openFrameworks */, 118 | BB4B014C10F69532006C3DED /* addons */, 119 | 6948EE371B920CB800B5AC1A /* local_addons */, 120 | E4B69B5B0A3A1756003C02F2 /* exampleAppDebug.app */, 121 | ); 122 | sourceTree = ""; 123 | }; 124 | E4B69E1C0A3A1BDC003C02F2 /* src */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | E715FFD41C2199B90020A52F /* Modules */, 128 | E4B69E1D0A3A1BDC003C02F2 /* main.cpp */, 129 | E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */, 130 | E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */, 131 | ); 132 | path = src; 133 | sourceTree = SOURCE_ROOT; 134 | }; 135 | E4EEC9E9138DF44700A80321 /* openFrameworks */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */, 139 | E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */, 140 | ); 141 | name = openFrameworks; 142 | sourceTree = ""; 143 | }; 144 | E71500281C2199F10020A52F /* src */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | E71500291C2199F10020A52F /* ofxPlugin */, 148 | E715002F1C2199F10020A52F /* ofxPlugin.h */, 149 | ); 150 | path = src; 151 | sourceTree = ""; 152 | }; 153 | E71500291C2199F10020A52F /* ofxPlugin */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | E715002A1C2199F10020A52F /* BaseModule.h */, 157 | E715002B1C2199F10020A52F /* Factory.h */, 158 | E715002C1C2199F10020A52F /* FactoryRegister.cpp */, 159 | E715002D1C2199F10020A52F /* FactoryRegister.h */, 160 | E715002E1C2199F10020A52F /* Plugin.h */, 161 | ); 162 | path = ofxPlugin; 163 | sourceTree = ""; 164 | }; 165 | E715003F1C219A830020A52F /* ofxSingleton */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | E71500681C219A830020A52F /* src */, 169 | ); 170 | name = ofxSingleton; 171 | path = ../../ofxSingleton; 172 | sourceTree = ""; 173 | }; 174 | E71500681C219A830020A52F /* src */ = { 175 | isa = PBXGroup; 176 | children = ( 177 | E71500691C219A830020A52F /* ofxSingleton */, 178 | E71500701C219A830020A52F /* ofxSingleton.h */, 179 | ); 180 | path = src; 181 | sourceTree = ""; 182 | }; 183 | E71500691C219A830020A52F /* ofxSingleton */ = { 184 | isa = PBXGroup; 185 | children = ( 186 | E715006A1C219A830020A52F /* BaseStore.cpp */, 187 | E715006B1C219A830020A52F /* BaseStore.h */, 188 | E715006C1C219A830020A52F /* Register.cpp */, 189 | E715006D1C219A830020A52F /* Register.h */, 190 | E715006E1C219A830020A52F /* Singleton.h */, 191 | E715006F1C219A830020A52F /* UnmanagedSingleton.h */, 192 | ); 193 | path = ofxSingleton; 194 | sourceTree = ""; 195 | }; 196 | E715FFD41C2199B90020A52F /* Modules */ = { 197 | isa = PBXGroup; 198 | children = ( 199 | E715FFD51C2199B90020A52F /* BaseShape.h */, 200 | E715FFD61C2199B90020A52F /* RectangleShape.cpp */, 201 | E715FFD71C2199B90020A52F /* RectangleShape.h */, 202 | ); 203 | path = Modules; 204 | sourceTree = ""; 205 | }; 206 | E715FFD91C2199F10020A52F /* ofxPlugin */ = { 207 | isa = PBXGroup; 208 | children = ( 209 | E71500281C2199F10020A52F /* src */, 210 | ); 211 | name = ofxPlugin; 212 | path = ..; 213 | sourceTree = ""; 214 | }; 215 | /* End PBXGroup section */ 216 | 217 | /* Begin PBXNativeTarget section */ 218 | E4B69B5A0A3A1756003C02F2 /* exampleApp */ = { 219 | isa = PBXNativeTarget; 220 | buildConfigurationList = E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "exampleApp" */; 221 | buildPhases = ( 222 | E4B69B580A3A1756003C02F2 /* Sources */, 223 | E4B69B590A3A1756003C02F2 /* Frameworks */, 224 | E4B6FFFD0C3F9AB9008CF71C /* ShellScript */, 225 | E4C2427710CC5ABF004149E2 /* CopyFiles */, 226 | ); 227 | buildRules = ( 228 | ); 229 | dependencies = ( 230 | E4EEB9AC138B136A00A80321 /* PBXTargetDependency */, 231 | ); 232 | name = exampleApp; 233 | productName = myOFApp; 234 | productReference = E4B69B5B0A3A1756003C02F2 /* exampleAppDebug.app */; 235 | productType = "com.apple.product-type.application"; 236 | }; 237 | /* End PBXNativeTarget section */ 238 | 239 | /* Begin PBXProject section */ 240 | E4B69B4C0A3A1720003C02F2 /* Project object */ = { 241 | isa = PBXProject; 242 | attributes = { 243 | LastUpgradeCheck = 0600; 244 | }; 245 | buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "exampleApp" */; 246 | compatibilityVersion = "Xcode 3.2"; 247 | developmentRegion = English; 248 | hasScannedForEncodings = 0; 249 | knownRegions = ( 250 | English, 251 | Japanese, 252 | French, 253 | German, 254 | ); 255 | mainGroup = E4B69B4A0A3A1720003C02F2; 256 | productRefGroup = E4B69B4A0A3A1720003C02F2; 257 | projectDirPath = ""; 258 | projectReferences = ( 259 | { 260 | ProductGroup = E4328144138ABC890047C5CB /* Products */; 261 | ProjectRef = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 262 | }, 263 | ); 264 | projectRoot = ""; 265 | targets = ( 266 | E4B69B5A0A3A1756003C02F2 /* exampleApp */, 267 | ); 268 | }; 269 | /* End PBXProject section */ 270 | 271 | /* Begin PBXReferenceProxy section */ 272 | E4328148138ABC890047C5CB /* openFrameworksDebug.a */ = { 273 | isa = PBXReferenceProxy; 274 | fileType = archive.ar; 275 | path = openFrameworksDebug.a; 276 | remoteRef = E4328147138ABC890047C5CB /* PBXContainerItemProxy */; 277 | sourceTree = BUILT_PRODUCTS_DIR; 278 | }; 279 | /* End PBXReferenceProxy section */ 280 | 281 | /* Begin PBXShellScriptBuildPhase section */ 282 | E4B6FFFD0C3F9AB9008CF71C /* ShellScript */ = { 283 | isa = PBXShellScriptBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | ); 287 | inputPaths = ( 288 | ); 289 | outputPaths = ( 290 | ); 291 | runOnlyForDeploymentPostprocessing = 0; 292 | shellPath = /bin/sh; 293 | shellScript = "rsync -aved ../../../libs/fmodex/lib/osx/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/\"; install_name_tool -change ./libfmodex.dylib @executable_path/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\";\nmkdir -p \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/\"\nrsync -aved \"$ICON_FILE\" \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/\"\nrsync -aved ../../../libs/glut/lib/osx/GLUT.framework \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/\"\n"; 294 | }; 295 | /* End PBXShellScriptBuildPhase section */ 296 | 297 | /* Begin PBXSourcesBuildPhase section */ 298 | E4B69B580A3A1756003C02F2 /* Sources */ = { 299 | isa = PBXSourcesBuildPhase; 300 | buildActionMask = 2147483647; 301 | files = ( 302 | E715FFD81C2199B90020A52F /* RectangleShape.cpp in Sources */, 303 | E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */, 304 | E715003E1C2199F10020A52F /* FactoryRegister.cpp in Sources */, 305 | E715007A1C219A830020A52F /* Register.cpp in Sources */, 306 | E71500791C219A830020A52F /* BaseStore.cpp in Sources */, 307 | E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */, 308 | ); 309 | runOnlyForDeploymentPostprocessing = 0; 310 | }; 311 | /* End PBXSourcesBuildPhase section */ 312 | 313 | /* Begin PBXTargetDependency section */ 314 | E4EEB9AC138B136A00A80321 /* PBXTargetDependency */ = { 315 | isa = PBXTargetDependency; 316 | name = openFrameworks; 317 | targetProxy = E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */; 318 | }; 319 | /* End PBXTargetDependency section */ 320 | 321 | /* Begin XCBuildConfiguration section */ 322 | E4B69B4E0A3A1720003C02F2 /* Debug */ = { 323 | isa = XCBuildConfiguration; 324 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 325 | buildSettings = { 326 | CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; 327 | COPY_PHASE_STRIP = NO; 328 | DEAD_CODE_STRIPPING = YES; 329 | GCC_AUTO_VECTORIZATION = YES; 330 | GCC_ENABLE_SSE3_EXTENSIONS = YES; 331 | GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; 332 | GCC_INLINES_ARE_PRIVATE_EXTERN = NO; 333 | GCC_OPTIMIZATION_LEVEL = 0; 334 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 335 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 336 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; 337 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; 338 | GCC_WARN_UNINITIALIZED_AUTOS = NO; 339 | GCC_WARN_UNUSED_VALUE = NO; 340 | GCC_WARN_UNUSED_VARIABLE = NO; 341 | HEADER_SEARCH_PATHS = ( 342 | "$(OF_CORE_HEADERS)", 343 | src, 344 | ); 345 | MACOSX_DEPLOYMENT_TARGET = 10.8; 346 | ONLY_ACTIVE_ARCH = YES; 347 | OTHER_CPLUSPLUSFLAGS = ( 348 | "-D__MACOSX_CORE__", 349 | "-mtune=native", 350 | ); 351 | SDKROOT = macosx; 352 | }; 353 | name = Debug; 354 | }; 355 | E4B69B4F0A3A1720003C02F2 /* Release */ = { 356 | isa = XCBuildConfiguration; 357 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 358 | buildSettings = { 359 | CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; 360 | COPY_PHASE_STRIP = YES; 361 | DEAD_CODE_STRIPPING = YES; 362 | GCC_AUTO_VECTORIZATION = YES; 363 | GCC_ENABLE_SSE3_EXTENSIONS = YES; 364 | GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; 365 | GCC_INLINES_ARE_PRIVATE_EXTERN = NO; 366 | GCC_OPTIMIZATION_LEVEL = 3; 367 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 368 | GCC_UNROLL_LOOPS = YES; 369 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 370 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; 371 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; 372 | GCC_WARN_UNINITIALIZED_AUTOS = NO; 373 | GCC_WARN_UNUSED_VALUE = NO; 374 | GCC_WARN_UNUSED_VARIABLE = NO; 375 | HEADER_SEARCH_PATHS = ( 376 | "$(OF_CORE_HEADERS)", 377 | src, 378 | ); 379 | MACOSX_DEPLOYMENT_TARGET = 10.8; 380 | OTHER_CPLUSPLUSFLAGS = ( 381 | "-D__MACOSX_CORE__", 382 | "-mtune=native", 383 | ); 384 | SDKROOT = macosx; 385 | }; 386 | name = Release; 387 | }; 388 | E4B69B600A3A1757003C02F2 /* Debug */ = { 389 | isa = XCBuildConfiguration; 390 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 391 | buildSettings = { 392 | COMBINE_HIDPI_IMAGES = YES; 393 | COPY_PHASE_STRIP = NO; 394 | FRAMEWORK_SEARCH_PATHS = ( 395 | "$(inherited)", 396 | "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 397 | ); 398 | FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\""; 399 | GCC_DYNAMIC_NO_PIC = NO; 400 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 401 | GCC_MODEL_TUNING = NONE; 402 | HEADER_SEARCH_PATHS = ( 403 | "$(OF_CORE_HEADERS)", 404 | src, 405 | ); 406 | ICON = "$(ICON_NAME_DEBUG)"; 407 | ICON_FILE = "$(ICON_FILE_PATH)$(ICON)"; 408 | INFOPLIST_FILE = "openFrameworks-Info.plist"; 409 | INSTALL_PATH = "$(HOME)/Applications"; 410 | LIBRARY_SEARCH_PATHS = ( 411 | "$(inherited)", 412 | "$(PROJECT_DIR)/bin", 413 | ); 414 | PRODUCT_NAME = exampleAppDebug; 415 | WRAPPER_EXTENSION = app; 416 | }; 417 | name = Debug; 418 | }; 419 | E4B69B610A3A1757003C02F2 /* Release */ = { 420 | isa = XCBuildConfiguration; 421 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 422 | buildSettings = { 423 | COMBINE_HIDPI_IMAGES = YES; 424 | COPY_PHASE_STRIP = YES; 425 | FRAMEWORK_SEARCH_PATHS = ( 426 | "$(inherited)", 427 | "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 428 | ); 429 | FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\""; 430 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 431 | GCC_MODEL_TUNING = NONE; 432 | HEADER_SEARCH_PATHS = ( 433 | "$(OF_CORE_HEADERS)", 434 | src, 435 | ); 436 | ICON = "$(ICON_NAME_RELEASE)"; 437 | ICON_FILE = "$(ICON_FILE_PATH)$(ICON)"; 438 | INFOPLIST_FILE = "openFrameworks-Info.plist"; 439 | INSTALL_PATH = "$(HOME)/Applications"; 440 | LIBRARY_SEARCH_PATHS = ( 441 | "$(inherited)", 442 | "$(PROJECT_DIR)/bin", 443 | ); 444 | PRODUCT_NAME = exampleAppDebug; 445 | WRAPPER_EXTENSION = app; 446 | baseConfigurationReference = E4EB6923138AFD0F00A09F29; 447 | }; 448 | name = Release; 449 | }; 450 | /* End XCBuildConfiguration section */ 451 | 452 | /* Begin XCConfigurationList section */ 453 | E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "exampleApp" */ = { 454 | isa = XCConfigurationList; 455 | buildConfigurations = ( 456 | E4B69B4E0A3A1720003C02F2 /* Debug */, 457 | E4B69B4F0A3A1720003C02F2 /* Release */, 458 | ); 459 | defaultConfigurationIsVisible = 0; 460 | defaultConfigurationName = Release; 461 | }; 462 | E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "exampleApp" */ = { 463 | isa = XCConfigurationList; 464 | buildConfigurations = ( 465 | E4B69B600A3A1757003C02F2 /* Debug */, 466 | E4B69B610A3A1757003C02F2 /* Release */, 467 | ); 468 | defaultConfigurationIsVisible = 0; 469 | defaultConfigurationName = Release; 470 | }; 471 | /* End XCConfigurationList section */ 472 | }; 473 | rootObject = E4B69B4C0A3A1720003C02F2 /* Project object */; 474 | } 475 | --------------------------------------------------------------------------------