Use macOS 10.12 - 10.13 for better backwards compability.
-
HOMEBREW_OPTFLAGS="-march=core2" HOMEBREW_OPTIMIZATION_LEVEL="O0" brew install boost zmq libpgm miniupnpc libsodium expat libunwind-headers protobuf libgcrypt hidapi
-
Get the latest LTS from here: https://www.qt.io/offline-installers and install
-
git clone --recursive -b v0.X.Y.Z --depth 1 https://github.com/scala-project/scala-gui
-
Compile
scala-wallet-gui.app
mkdir build && cd build
cmake -D CMAKE_BUILD_TYPE=Release -D ARCH=default -D CMAKE_PREFIX_PATH=~/Qt5.12.8/5.12.8/clang_64 ..
make
make deploy
- Replace the
scalad
binary insidescala-wallet-gui.app/Contents/MacOS/
with one built using deterministic builds / gitian.
- Save the following text as
entitlements.plist
<?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">
<dict>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
</dict>
</plist>
codesign --deep --force --verify --verbose --options runtime --timestamp --entitlements entitlements.plist --sign 'XXXXXXXXXX' scala-wallet-gui.app
You can check if this step worked by using codesign -dvvv scala-wallet-gui.app
-
hdiutil create -fs HFS+ -srcfolder scala-gui-v0.X.Y.Z -volname scala-wallet-gui scala-gui-mac-x64-v0.X.Y.Z.dmg
-
xcrun altool -t osx --file scala-gui-mac-x64-v0.X.Y.Z.dmg --primary-bundle-id org.scala-project.scala-wallet-gui.dmg --notarize-app --username email@address.org
-
xcrun altool --notarization-info aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee -u email@address.org
-
xcrun stapler staple -v scala-gui-mac-x64-v0.X.Y.Z.dmg