Browse Source

Add codesigning on Mac. Silently fail if settings.json is not found when loaded.

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
fe713d5a7a
3 changed files with 11 additions and 6 deletions
  1. +9
    -4
      Makefile
  2. +1
    -1
      plugin.mk
  3. +1
    -1
      src/settings.cpp

+ 9
- 4
Makefile View File

@@ -106,7 +106,7 @@ ifdef ARCH_LIN
ldd dist/Rack/$(TARGET)
cp plugins/Fundamental/dist/*.zip dist/Rack/Fundamental.zip
# Make ZIP
cd dist && zip -5 -r Rack-$(VERSION)-$(ARCH).zip Rack
cd dist && zip -q -5 -r Rack-$(VERSION)-$(ARCH).zip Rack
endif
ifdef ARCH_MAC
mkdir -p dist/$(TARGET).app
@@ -123,8 +123,13 @@ ifdef ARCH_MAC
otool -L dist/$(TARGET).app/Contents/MacOS/$(TARGET)

cp plugins/Fundamental/dist/*.zip dist/$(TARGET).app/Contents/Resources/Fundamental.zip
# Clean up and sign bundle
xattr -cr dist/$(TARGET).app
codesign --sign "VCV" --verbose dist/$(TARGET).app
codesign --verify --verbose dist/$(TARGET).app
spctl --assess --verbose dist/$(TARGET).app
# Make ZIP
cd dist && zip -5 -r Rack-$(VERSION)-$(ARCH).zip $(TARGET).app
cd dist && zip -q -5 -r Rack-$(VERSION)-$(ARCH).zip $(TARGET).app
endif
ifdef ARCH_WIN
mkdir -p dist/Rack
@@ -136,7 +141,7 @@ ifdef ARCH_WIN
cp /mingw64/bin/libgcc_s_seh-1.dll dist/Rack/
cp plugins/Fundamental/dist/*.zip dist/Rack/Fundamental.zip
# Make ZIP
cd dist && zip -5 -r Rack-$(VERSION)-$(ARCH).zip Rack
cd dist && zip -q -5 -r Rack-$(VERSION)-$(ARCH).zip Rack
# Make NSIS installer
# pacman -S mingw-w64-x86_64-nsis
makensis -DVERSION=$(VERSION) installer.nsi
@@ -153,7 +158,7 @@ endif
ifdef ARCH_WIN
cp libRack.a dist/Rack-SDK/
endif
cd dist && zip -5 -r Rack-SDK-$(VERSION).zip Rack-SDK
cd dist && zip -q -5 -r Rack-SDK-$(VERSION).zip Rack-SDK


# Obviously this will only work if you have the private keys to my server


+ 1
- 1
plugin.mk View File

@@ -62,7 +62,7 @@ endif
@# Copy distributables
cp -R $(DISTRIBUTABLES) dist/$(SLUG)/
@# Create ZIP package
cd dist && zip -5 -r $(SLUG)-$(VERSION)-$(ARCH).zip $(SLUG)
cd dist && zip -q -5 -r $(SLUG)-$(VERSION)-$(ARCH).zip $(SLUG)

install: dist
cp dist/$(SLUG)-$(VERSION)-$(ARCH).zip $(RACK_USER_DIR)/plugins/


+ 1
- 1
src/settings.cpp View File

@@ -248,7 +248,7 @@ void load(const std::string &path) {
INFO("Loading settings %s", path.c_str());
FILE *file = fopen(path.c_str(), "r");
if (!file)
throw UserException(string::f("Could not load settings file %s", path.c_str()));
return;
DEFER({
fclose(file);
});


Loading…
Cancel
Save