diff --git a/.gitmodules b/.gitmodules index 1dc85fb4..ceed831e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,14 +1,14 @@ [submodule "ext/nanovg"] - path = ext/nanovg + path = dep/nanovg url = https://github.com/memononen/nanovg.git [submodule "ext/nanosvg"] - path = ext/nanosvg + path = dep/nanosvg url = https://github.com/memononen/nanosvg.git [submodule "ext/osdialog"] - path = ext/osdialog + path = dep/osdialog url = https://github.com/AndrewBelt/osdialog.git [submodule "ext/oui-blendish"] - path = ext/oui-blendish + path = dep/oui-blendish url = https://github.com/AndrewBelt/oui-blendish.git [submodule "dep/glfw"] path = dep/glfw diff --git a/Makefile b/Makefile index 5a67ad2c..1d429d3a 100644 --- a/Makefile +++ b/Makefile @@ -8,14 +8,14 @@ ifdef RELEASE FLAGS += -DRELEASE=$(RELEASE) endif -SOURCES = $(wildcard src/*.cpp src/*/*.cpp) \ - ext/nanovg/src/nanovg.c +SOURCES += $(wildcard src/*.cpp src/*/*.cpp) +SOURCES += dep/nanovg/src/nanovg.c include arch.mk ifeq ($(ARCH), lin) - SOURCES += ext/osdialog/osdialog_gtk2.c + SOURCES += dep/osdialog/osdialog_gtk2.c CFLAGS += $(shell pkg-config --cflags gtk+-2.0) LDFLAGS += -rdynamic \ -lpthread -lGL -ldl \ @@ -25,7 +25,7 @@ ifeq ($(ARCH), lin) endif ifeq ($(ARCH), mac) - SOURCES += ext/osdialog/osdialog_mac.m + SOURCES += dep/osdialog/osdialog_mac.m CXXFLAGS += -DAPPLE -stdlib=libc++ LDFLAGS += -stdlib=libc++ -lpthread -ldl \ -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo \ @@ -35,7 +35,7 @@ ifeq ($(ARCH), mac) endif ifeq ($(ARCH), win) - SOURCES += ext/osdialog/osdialog_win.c + SOURCES += dep/osdialog/osdialog_win.c LDFLAGS += -static-libgcc -static-libstdc++ -lpthread \ -Wl,--export-all-symbols,--out-implib,libRack.a -mwindows \ -lgdi32 -lopengl32 -lcomdlg32 -lole32 \ @@ -94,6 +94,8 @@ include compile.mk dist: all rm -rf dist + + # Rack distribution $(MAKE) -C plugins/Fundamental dist ifeq ($(ARCH), mac) @@ -184,6 +186,14 @@ ifeq ($(ARCH), lin) cd dist && zip -5 -r Rack-$(VERSION)-$(ARCH).zip Rack endif + # Rack SDK distribution + mkdir -p dist/Rack-SDK + cp -R include dist/Rack-SDK/ + cp *.mk dist/Rack-SDK/ + mkdir -p dist/Rack-SDK/dep/ + cp -R dep/include dist/Rack-SDK/dep/ + cd dist && zip -5 -r Rack-SDK-$(VERSION)-$(ARCH).zip Rack-SDK + # Obviously this will only work if you have the private keys to my server UPLOAD_URL = vortico@vcvrack.com:files/ diff --git a/dep/Makefile b/dep/Makefile index dc9898a1..e4865237 100755 --- a/dep/Makefile +++ b/dep/Makefile @@ -64,10 +64,15 @@ ifeq ($(ARCH),win) openssl = bin/libssl-1_1-x64.dll endif +nanovg = include/nanovg.h +nanosvg = include/nanosvg.h +oui-blendish = include/blendish.h +osdialog = include/osdialog.h + .NOTPARALLEL: -all: $(glew) $(glfw) $(jansson) $(libspeexdsp) $(libcurl) $(libzip) $(rtmidi) $(rtaudio) +all: $(glew) $(glfw) $(jansson) $(libspeexdsp) $(libcurl) $(libzip) $(rtmidi) $(rtaudio) $(nanovg) $(nanosvg) $(oui-blendish) $(osdialog) @echo "" @echo "#######################################" @echo "# Built all dependencies successfully #" @@ -149,5 +154,17 @@ $(rtaudio): $(MAKE) -C rtaudio/build $(MAKE) -C rtaudio/build install +$(nanovg): + cp nanovg/src/*.h include/ + +$(nanosvg): + cp nanosvg/src/*.h include/ + +$(oui-blendish): + cp oui-blendish/*.h include/ + +$(osdialog): + cp osdialog/*.h include/ + clean: git clean -ffdx diff --git a/ext/nanosvg b/dep/nanosvg similarity index 100% rename from ext/nanosvg rename to dep/nanosvg diff --git a/ext/nanovg b/dep/nanovg similarity index 100% rename from ext/nanovg rename to dep/nanovg diff --git a/ext/osdialog b/dep/osdialog similarity index 100% rename from ext/osdialog rename to dep/osdialog diff --git a/ext/oui-blendish b/dep/oui-blendish similarity index 100% rename from ext/oui-blendish rename to dep/oui-blendish diff --git a/include/ui.hpp b/include/ui.hpp index c62818af..482fbcf7 100644 --- a/include/ui.hpp +++ b/include/ui.hpp @@ -1,6 +1,6 @@ #pragma once #include "widgets.hpp" -#include "../ext/oui-blendish/blendish.h" +#include "blendish.h" namespace rack { diff --git a/include/util/color.hpp b/include/util/color.hpp index 485c53a7..92b52a48 100644 --- a/include/util/color.hpp +++ b/include/util/color.hpp @@ -2,7 +2,7 @@ #include "util/math.hpp" -#include "../ext/nanovg/src/nanovg.h" +#include "nanovg.h" namespace rack { diff --git a/include/widgets.hpp b/include/widgets.hpp index df3efd65..98757813 100644 --- a/include/widgets.hpp +++ b/include/widgets.hpp @@ -2,8 +2,8 @@ #include #include -#include "../ext/nanovg/src/nanovg.h" -#include "../ext/nanosvg/src/nanosvg.h" +#include "nanovg.h" +#include "nanosvg.h" #include "util/common.hpp" #include "events.hpp" diff --git a/src/app/PluginManagerWidget.cpp b/src/app/PluginManagerWidget.cpp index 90a825ad..914f0faa 100644 --- a/src/app/PluginManagerWidget.cpp +++ b/src/app/PluginManagerWidget.cpp @@ -2,7 +2,7 @@ #include "app.hpp" #include "plugin.hpp" #include "window.hpp" -#include "../ext/osdialog/osdialog.h" +#include "osdialog.h" namespace rack { diff --git a/src/app/RackScene.cpp b/src/app/RackScene.cpp index 340c13ee..e893d7c7 100644 --- a/src/app/RackScene.cpp +++ b/src/app/RackScene.cpp @@ -1,7 +1,7 @@ #include "app.hpp" #include "window.hpp" #include "util/request.hpp" -#include "../ext/osdialog/osdialog.h" +#include "osdialog.h" #include #include diff --git a/src/app/RackWidget.cpp b/src/app/RackWidget.cpp index 4c6da163..8eb6b09d 100644 --- a/src/app/RackWidget.cpp +++ b/src/app/RackWidget.cpp @@ -6,7 +6,7 @@ #include "asset.hpp" #include #include -#include "../ext/osdialog/osdialog.h" +#include "osdialog.h" namespace rack { diff --git a/src/asset.cpp b/src/asset.cpp index 64613b35..25384e65 100644 --- a/src/asset.cpp +++ b/src/asset.cpp @@ -1,7 +1,7 @@ #include "asset.hpp" #include "util/common.hpp" #include // for mkdir -#include "../ext/osdialog/osdialog.h" +#include "osdialog.h" #if ARCH_MAC #include diff --git a/src/main.cpp b/src/main.cpp index 438abfa1..37b32a8b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,7 +6,7 @@ #include "settings.hpp" #include "asset.hpp" #include -#include "../ext/osdialog/osdialog.h" +#include "osdialog.h" using namespace rack; diff --git a/src/widgets/FramebufferWidget.cpp b/src/widgets/FramebufferWidget.cpp index f111dade..0e1c7e05 100644 --- a/src/widgets/FramebufferWidget.cpp +++ b/src/widgets/FramebufferWidget.cpp @@ -1,9 +1,8 @@ #include "widgets.hpp" #include "window.hpp" #include -#include "../ext/nanovg/src/nanovg_gl.h" -#include "../ext/nanovg/src/nanovg_gl_utils.h" -#include "../ext/osdialog/osdialog.h" +#include "nanovg_gl.h" +#include "nanovg_gl_utils.h" namespace rack { diff --git a/src/window.cpp b/src/window.cpp index f600a29d..cc0d69ea 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -6,21 +6,21 @@ #include #include -#include "../ext/osdialog/osdialog.h" +#include "osdialog.h" #define NANOVG_GL2 1 // #define NANOVG_GL3 1 // #define NANOVG_GLES2 1 #define NANOVG_GL_IMPLEMENTATION 1 -#include "../ext/nanovg/src/nanovg_gl.h" +#include "nanovg_gl.h" // Hack to get framebuffer objects working on OpenGL 2 (we blindly assume the extension is supported) #define NANOVG_FBO_VALID 1 -#include "../ext/nanovg/src/nanovg_gl_utils.h" +#include "nanovg_gl_utils.h" #define BLENDISH_IMPLEMENTATION -#include "../ext/oui-blendish/blendish.h" +#include "blendish.h" #define NANOSVG_IMPLEMENTATION #define NANOSVG_ALL_COLOR_KEYWORDS -#include "../ext/nanosvg/src/nanosvg.h" +#include "nanosvg.h" #ifdef ARCH_MAC // For CGAssociateMouseAndMouseCursorPosition