Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds background image and Applications shortcut to macOS disk image #607

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added icons/osx-dmg-background.tiff
Binary file not shown.
14 changes: 12 additions & 2 deletions packaging/osx/release_osx.sh
@@ -1,6 +1,7 @@
#!/bin/bash

# Create and package a clean, release-mode build of the application
# Install `create-dmg` with `brew install create-dmg` or from source: https://github.com/create-dmg/create-dmg
# Must be run from the git source directory.
# Create a .packagingrc file to define:
# TOR_BINARY Path to tor binary to copy into bundle.
Expand All @@ -27,7 +28,7 @@ rm -r build || true
mkdir build
cd build

qmake CONFIG+=release ..
/usr/local/opt/qt5/bin/qmake OPENSSLDIR=/usr/local/opt/openssl/ CONFIG+=release ..
make

cp "$TOR_BINARY" ricochet.app/Contents/MacOS/
Expand All @@ -42,7 +43,16 @@ if [ ! -z "$CODESIGN_ID" ]; then
codesign --verbose --sign "$CODESIGN_ID" --deep Ricochet.app
fi

hdiutil create Ricochet.dmg -srcfolder Ricochet.app -format UDZO -volname Ricochet
# Since create-dmg does not clobber, be sure to delete previous DMG
[[ -f Ricochet.dmg ]] && rm Ricochet.dmg

# Creates source folder required by create-dmg
# [[ -f osx-dmg-source ]] && rm -rf osx-dmg-source
mkdir osx-dmg-source
cp -r Ricochet.app osx-dmg-source/Ricochet.app

# Create "fancy" DMG with shortcut to `Applications` and instruction to user. (See: https://github.com/create-dmg/create-dmg)
create-dmg --window-size 540 380 --icon-size 80 --text-size 12 --app-drop-link 370 225 --icon "Ricochet.app" 165 225 --volname "Ricochet" --hide-extension "Ricochet.app" --background "../icons/osx-dmg-background.tiff" "Ricochet.dmg" "osx-dmg-source/"

echo "---------"

Expand Down