Browse Source

Switch from ZIP to PKG installer on Mac.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
f4ddb556e4
3 changed files with 47 additions and 6 deletions
  1. +13
    -0
      Component.plist
  2. +20
    -0
      Distribution.xml
  3. +14
    -6
      Makefile

+ 13
- 0
Component.plist View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>BundleHasStrictIdentifier</key><true/>
<key>BundleIsVersionChecked</key><false/>
<key>BundleIsRelocatable</key><false/>
<key>BundleOverwriteAction</key><string>upgrade</string>
<key>RootRelativeBundlePath</key><string>VCV Rack 2.app</string>
</dict>
</array>
</plist>

+ 20
- 0
Distribution.xml View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<installer-gui-script minSpecVersion="1">
<title>VCV Rack Community 2</title>

<allowed-os-versions>
<os-version min="10.9"/>
</allowed-os-versions>

<options require-scripts="false" customize="never"/>
<choices-outline>
<line choice="com.vcvrack.rack"/>
</choices-outline>

<choice id="com.vcvrack.rack" title="Standalone" enabled="false">
<pkg-ref id="com.vcvrack.rack"/>
</choice>
<pkg-ref id="com.vcvrack.rack" version="0" onConclusion="none">Component.pkg</pkg-ref>

<pkg-ref id="com.vcvrack.rack"/>
</installer-gui-script>

+ 14
- 6
Makefile View File

@@ -157,6 +157,7 @@ DIST_HTML := $(patsubst %.md, build/%.html, $(DIST_MD))


# Target not supported for public use # Target not supported for public use
dist: $(TARGET) $(STANDALONE_TARGET) $(DIST_HTML) dist: $(TARGET) $(STANDALONE_TARGET) $(DIST_HTML)
rm -rf dist
mkdir -p dist mkdir -p dist
# Copy Rack to dist # Copy Rack to dist
ifdef ARCH_LIN ifdef ARCH_LIN
@@ -199,8 +200,14 @@ ifdef ARCH_MAC
xattr -cr dist/"$(DIST_BUNDLE)" xattr -cr dist/"$(DIST_BUNDLE)"
codesign --verbose --sign "Developer ID Application: Andrew Belt (VRF26934X5)" --options runtime --entitlements Entitlements.plist --timestamp --deep dist/"$(DIST_BUNDLE)"/Contents/Resources/$(TARGET) dist/"$(DIST_BUNDLE)" codesign --verbose --sign "Developer ID Application: Andrew Belt (VRF26934X5)" --options runtime --entitlements Entitlements.plist --timestamp --deep dist/"$(DIST_BUNDLE)"/Contents/Resources/$(TARGET) dist/"$(DIST_BUNDLE)"
codesign --verify --deep --strict --verbose=2 dist/"$(DIST_BUNDLE)" codesign --verify --deep --strict --verbose=2 dist/"$(DIST_BUNDLE)"
# Make ZIP
cd dist && zip -q -9 -r "$(DIST_NAME)".zip "$(DIST_BUNDLE)"
# Make standalone PKG
mkdir -p dist/Component
cp -R dist/"$(DIST_BUNDLE)" dist/Component/
pkgbuild --identifier com.vcvrack.rack --component-plist Component.plist --root dist/Component --install-location /Applications dist/Component.pkg
# Make PKG
productbuild --distribution Distribution.xml --package-path dist dist/"$(DIST_NAME)".pkg
productsign --sign "Developer ID Installer: Andrew Belt (V8SW9J626X)" dist/"$(DIST_NAME)".pkg dist/"$(DIST_NAME)"-signed.pkg
mv dist/"$(DIST_NAME)"-signed.pkg dist/"$(DIST_NAME)".pkg
endif endif
ifdef ARCH_WIN ifdef ARCH_WIN
mkdir -p dist/"$(DIST_DIR)" mkdir -p dist/"$(DIST_DIR)"
@@ -244,7 +251,7 @@ endif
# Target not supported for public use # Target not supported for public use
notarize: notarize:
ifdef ARCH_MAC ifdef ARCH_MAC
xcrun altool --notarize-app --primary-bundle-id=com.vcvrack.rack --username "andrew@vcvrack.com" --password "@keychain:notarize" --output-format xml --file dist/"$(DIST_NAME)".zip > dist/UploadInfo.plist
xcrun altool --notarize-app --primary-bundle-id "com.vcvrack.rack" --username "andrew@vcvrack.com" --password @keychain:notarize --output-format xml --file dist/"$(DIST_NAME)".pkg > dist/UploadInfo.plist
# Wait for Apple's servers to approve the app # Wait for Apple's servers to approve the app
while true; do \ while true; do \
echo "Waiting on Apple servers..." ; \ echo "Waiting on Apple servers..." ; \
@@ -254,10 +261,11 @@ ifdef ARCH_MAC
break ; \ break ; \
fi ; \ fi ; \
done done
# Mark app as notarized, check, and re-zip
xcrun stapler staple dist/"$(DIST_BUNDLE)"
# Mark app as notarized
xcrun stapler staple dist/"$(DIST_NAME)".pkg
# Check notarization
stapler validate --verbose dist/"$(DIST_NAME)".pkg
spctl --assess --type execute --ignore-cache --no-cache -vv dist/"$(DIST_BUNDLE)" spctl --assess --type execute --ignore-cache --no-cache -vv dist/"$(DIST_BUNDLE)"
cd dist && zip -q -9 -r "$(DIST_NAME)".zip "$(DIST_BUNDLE)"
endif endif






Loading…
Cancel
Save