Browse Source

Notarization for macOS. Fixed #197

Conflicts:
	src/scripts/dounifiedbuild.ps1
	src/scripts/mkmacdmg.sh
pull/102/head
Aditya Kulkarni 5 years ago
committed by Jonathan "Duke" Leto
parent
commit
ae9d12e0a1
  1. 3
      src/scripts/dounifiedbuild.ps1
  2. 18
      src/scripts/mkmacdmg.sh

3
src/scripts/dounifiedbuild.ps1

@ -2,6 +2,7 @@
param (
[Parameter(Mandatory=$true)][string]$version,
[Parameter(Mandatory=$true)][string]$prev,
[Parameter(Mandatory=$true)][string]$certificate,
[Parameter(Mandatory=$true)][string]$server,
[Parameter(Mandatory=$true)][string]$winserver
)
@ -27,7 +28,7 @@ Write-Host ""
Write-Host "[Building on Mac]"
bash src/scripts/mkmacdmg.sh --qt_path ~/Qt/5.11.1/clang_64/ --version $version --zcash_path ~/github/zcash
bash src/scripts/mkmacdmg.sh --qt_path ~/Qt/5.11.1/clang_64/ --version $version --zcash_path ~/gi/hush3 --certificate "$certificate"
if (! $?) {
Write-Output "[Error]"
exit 1;

18
src/scripts/mkmacdmg.sh

@ -17,6 +17,11 @@ case $key in
shift # past argument
shift # past value
;;
-c|--certificate)
CERTIFICATE="$2"
shift # past argument
shift # past value
;;
-v|--version)
APP_VERSION="$2"
shift # past argument
@ -40,6 +45,11 @@ if [ -z $HUSH_DIR ]; then
exit 1;
fi
if [ -z "$CERTIFICATE" ]; then
echo "CERTIFICATE is not set. Please set it the name of the MacOS developer certificate to sign the binary with";
exit 1;
fi
if [ -z $APP_VERSION ]; then
echo "APP_VERSION is not set. Please set it to the current release version of the app";
exit 1;
@ -85,10 +95,18 @@ cp $HUSH_DIR/src/hush-cli silentdragon.app/Contents/MacOS/
cp $HUSH_DIR/src/komodod silentdragon.app/Contents/MacOS/
cp $HUSH_DIR/src/komodo-cli silentdragon.app/Contents/MacOS/
$QT_PATH/bin/macdeployqt silentdragon.app
codesign --deep --force --verify --verbose -s "$CERTIFICATE" --options runtime --timestamp silentdragon.app
echo "[OK]"
# Code Signing Note:
# On MacOS, you still need to run these 3 commands:
# xcrun altool --notarize-app -t osx -f macOS-zecwallet-v0.8.0.dmg --primary-bundle-id="com.yourcompany.zecwallet" -u "apple developer id@email.com" -p "one time password"
# xcrun altool --notarization-info <output from pervious command> -u "apple developer id@email.com" -p "one time password"
#...wait for the notarization to finish...
# xcrun stapler staple macOS-zecwallet-v0.8.0.dmg
echo -n "Building dmg..........."
<<<<<<< HEAD
mv silentdragon.app silentdragon.app
create-dmg --volname "silentdragon-v$APP_VERSION" --volicon "res/logo.icns" --window-pos 200 120 --icon "silentdragon.app" 200 190 --app-drop-link 600 185 --hide-extension "silentdragon.app" --window-size 800 400 --hdiutil-quiet --background res/dmgbg.png artifacts/macOS-silentdragon-v$APP_VERSION.dmg silentdragon.app >/dev/null 2>&1

Loading…
Cancel
Save