reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit a9be9bb84ee22b3cf9cc3f468e4035cf91604689
parent 2ffc4afc93fcc236949eeb00a4c267d69be7bf0b
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Sun, 22 Nov 2015 17:04:06 -0500

fix build target name – extensions must be prefixed with "reaper_"

is this documented somewhere?

Diffstat:
MREADME.md | 4++--
MTupfile | 6+++---
Msrc/main.cpp | 13++++++++++++-
3 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md @@ -23,5 +23,5 @@ vendor ### OS X 1. Install [tup](http://gittup.org/tup/) and Xcode Command Line Tools -2. Run `tup` from this directory -3. Copy or link bin/reapack.dylib to REAPER's extension directory +2. Run `tup --quiet` from this directory +3. Copy or link `bin/reaper_reapack.dylib` to REAPER's extension directory diff --git a/Tupfile b/Tupfile @@ -3,12 +3,12 @@ CXX := c++ CXXFLAGS := -Wall -Wextra -Werror -Wno-unused-parameter -pipe -fPIC CXXFLAGS += -fdiagnostics-color CXXFLAGS += -O2 -std=c++14 -CXXFLAGS += -Ivendor/ -Ivendor/WDL/WDL/ +CXXFLAGS += -Ivendor/ -Ivendor/WDL/ -Ivendor/WDL/WDL/ -LDFLAGS := -shared +LDFLAGS := -dynamiclib !build = |> $(CXX) $(CXXFLAGS) -c %f -o %o |> !link = |> $(CXX) $(CXXFLAGS) %f $(LDFLAGS) -o %o |> : foreach src/*.cpp |> !build |> build/%B.o -: build/*.o |> !link |> bin/reapack.dylib +: build/*.o |> !link |> bin/reaper_reapack.dylib diff --git a/src/main.cpp b/src/main.cpp @@ -1,5 +1,11 @@ -#include "reaper_plugin.h" +#define REAPERAPI_IMPLEMENT +#include "reaper_plugin_functions.h" +bool commandHook(int command, int flag) +{ + ShowMessageBox("Hello World!", "Test", 0); + return true; +} extern "C" REAPER_PLUGIN_DLL_EXPORT int REAPER_PLUGIN_ENTRYPOINT( REAPER_PLUGIN_HINSTANCE instance, reaper_plugin_info_t *rec) @@ -7,5 +13,10 @@ extern "C" REAPER_PLUGIN_DLL_EXPORT int REAPER_PLUGIN_ENTRYPOINT( if(!rec || rec->caller_version != REAPER_PLUGIN_VERSION || !rec->GetFunc) return 0; + if(REAPERAPI_LoadAPI(rec->GetFunc) > 0) + return 0; + + rec->Register("hookcommand", (void *)commandHook); + return 1; }