From f1c5af511a3ba9a8b3e7c2896e589199711c75cc Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 20 Mar 2018 02:37:30 -0400 Subject: [PATCH] Strip binary when making distributable --- plugin.mk | 7 +++++-- src/app/ModuleBrowser.cpp | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/plugin.mk b/plugin.mk index 7896ad22..7fdda480 100644 --- a/plugin.mk +++ b/plugin.mk @@ -25,8 +25,6 @@ ifeq ($(ARCH), win) TARGET = plugin.dll endif -DISTRIBUTABLES += $(TARGET) - all: $(TARGET) @@ -38,7 +36,12 @@ clean: dist: all rm -rf dist mkdir -p dist/$(SLUG) + # Strip and copy plugin binary + cp $(TARGET) dist/$(SLUG)/ + strip -s dist/$(SLUG)/$(TARGET) + # Copy distributables cp -R $(DISTRIBUTABLES) dist/$(SLUG)/ + # Create ZIP package cd dist && zip -5 -r $(SLUG)-$(VERSION)-$(ARCH).zip $(SLUG) .PHONY: clean dist \ No newline at end of file diff --git a/src/app/ModuleBrowser.cpp b/src/app/ModuleBrowser.cpp index 374e6e8b..7f71a8da 100644 --- a/src/app/ModuleBrowser.cpp +++ b/src/app/ModuleBrowser.cpp @@ -164,6 +164,8 @@ struct ModelItem : BrowserListItem { void onAction(EventAction &e) override { ModuleWidget *moduleWidget = model->createModuleWidget(); + if (!moduleWidget) + return; gRackWidget->moduleContainer->addChild(moduleWidget); // Move module nearest to the mouse position moduleWidget->box.pos = gRackWidget->lastMousePos.minus(moduleWidget->box.size.div(2));