Browse Source

Merge branch 'master' of github.com:VCVRack/Rack

tags/v0.3.0
Andrew Belt 7 years ago
parent
commit
2785a39c9c
5 changed files with 35 additions and 18 deletions
  1. +8
    -11
      Makefile
  2. +2
    -1
      compile.mk
  3. +18
    -5
      dep/Makefile
  4. +5
    -0
      src/gui.cpp
  5. +2
    -1
      src/plugin.cpp

+ 8
- 11
Makefile View File

@@ -29,17 +29,10 @@ endif

ifeq ($(ARCH), win)
SOURCES += ext/osdialog/osdialog_win.c
CXXFLAGS += -DGLEW_STATIC \
-I$(HOME)/pkg/portaudio-r1891-build/include -I/mingw64/lib/libzip/include -I$(HOME)/local/include
LDFLAGS += \
-Wl,-Bstatic,--whole-archive \
-ljansson -lsamplerate \
-Wl,-Bdynamic,--no-whole-archive \
-lpthread -lglfw3 -lgdi32 -lglew32 -lopengl32 -lcomdlg32 -lole32 -lzip \
-L $(HOME)/local/lib -lcurl \
-lportmidi \
-L$(HOME)/pkg/portaudio-r1891-build/lib/x64/ReleaseMinDependency -lportaudio_x64 \
-Wl,--export-all-symbols,--out-implib,libRack.a -mwindows
LDFLAGS += -static-libgcc -static-libstdc++ -lpthread \
-Wl,--export-all-symbols,--out-implib,libRack.a -mwindows \
-lgdi32 -lopengl32 -lcomdlg32 -lole32 \
-Ldep/lib -lglew32 -lglfw3dll -ljansson -lsamplerate -lcurl -lzip -lportaudio -lportmidi
TARGET = Rack.exe
# OBJECTS = Rack.res
endif
@@ -54,6 +47,10 @@ endif
ifeq ($(ARCH), mac)
DYLD_FALLBACK_LIBRARY_PATH=dep/lib ./$<
endif
ifeq ($(ARCH), win)
# TODO get rid of the mingw64 path
env PATH=dep/bin:/mingw64/bin ./$<
endif

clean:
rm -rf $(TARGET) build


+ 2
- 1
compile.mk View File

@@ -20,7 +20,8 @@ ifeq ($(ARCH), mac)
endif

ifeq ($(ARCH), win)
FLAGS += -DARCH_WIN -D_USE_MATH_DEFINES
FLAGS += -DARCH_WIN
FLAGS += -D_USE_MATH_DEFINES
endif




+ 18
- 5
dep/Makefile View File

@@ -16,9 +16,9 @@ WGET = wget -nc
UNTAR = tar xf
UNZIP = unzip
ifeq ($(ARCH),win)
CMAKE = cmake -G 'MSYS Makefiles'
CMAKE = cmake -G 'MSYS Makefiles'
else
CMAKE = cmake
CMAKE = cmake
endif

# Packages
@@ -30,6 +30,7 @@ libcurl = curl-7.54.1
libzip = libzip-1.2.0
portmidi = portmidi
portaudio = portaudio
asio = asiosdk2.3


.NOTPARALLEL:
@@ -51,6 +52,10 @@ $(glfw):
-DGLFW_USE_CHDIR=ON -DGLFW_USE_MENUBAR=ON -DGLFW_USE_RETINA=ON
$(MAKE) -C $@
$(MAKE) -C $@ install
ifeq ($(ARCH),win)
# Not sure why the GLFW build system puts a .dll in the lib directory
mv "$(LOCAL)/lib/glfw3.dll" "$(LOCAL)/bin/"
endif

$(jansson):
$(WGET) http://www.digip.org/jansson/releases/$@.tar.gz
@@ -84,15 +89,23 @@ $(libzip):

$(portmidi):
git clone https://github.com/AndrewBelt/portmidi.git $@
# TODO Fix on Windows
cd $@ && $(CMAKE) . -DCMAKE_INSTALL_PREFIX="$(LOCAL)"
$(MAKE) -C $@
$(MAKE) -C $@ install

$(portaudio):
$(asio):
echo "For ASIO support, download and move the ASIO SDK to $@"
exit 1

ifeq ($(ARCH),win)
PORTAUDIO_DEPS = $(asio)
PORTAUDIO_ASIO = --with-host_os=mingw --with-winapi=wmme,asio --with-asiodir="../$(asio)"
endif

$(portaudio): $(PORTAUDIO_DEPS)
$(WGET) http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz
$(UNTAR) pa_stable_v190600_20161030.tgz
cd $@ && ./configure --prefix="$(LOCAL)"
cd $@ && ./configure --prefix="$(LOCAL)" $(PORTAUDIO_ASIO)
$(MAKE) -C $@
$(MAKE) -C $@ install



+ 5
- 0
src/gui.cpp View File

@@ -163,6 +163,10 @@ void keyCallback(GLFWwindow* window, int key, int scancode, int action, int mods
}
}

void errorCallback(int error, const char *description) {
fprintf(stderr, "GLFW error %d: %s\n", error, description);
}

void renderGui() {
int width, height;
glfwGetFramebufferSize(window, &width, &height);
@@ -191,6 +195,7 @@ void guiInit() {
int err;

// Set up GLFW
glfwSetErrorCallback(errorCallback);
err = glfwInit();
assert(err);



+ 2
- 1
src/plugin.cpp View File

@@ -17,8 +17,9 @@
#include <shellapi.h>
#include <direct.h>
#define mkdir(_dir, _perms) _mkdir(_dir)
#else
#include <dlfcn.h>
#endif
#include <dlfcn.h>
#include <dirent.h>

#include "plugin.hpp"


Loading…
Cancel
Save