Skip to content

Instantly share code, notes, and snippets.

@usagimaru
Last active February 5, 2024 03:09
Show Gist options
  • Save usagimaru/938c3fb5db891b65033372fccb2db719 to your computer and use it in GitHub Desktop.
Save usagimaru/938c3fb5db891b65033372fccb2db719 to your computer and use it in GitHub Desktop.
My `create-dmg` script for macOS
#!/bin/sh
in_dir_name=$1
the_app_name=$2
out_dmg_name=$3
bg_image=$4
## https://github.com/create-dmg/create-dmg
create-dmg \
--icon-size 128 \
--text-size 16 \
--icon $the_app_name 200 150 \
--app-drop-link 450 150 \
--window-pos 200 200 \
--window-size 650 376 \
--background $bg_image \
$out_dmg_name.dmg $in_dir_name
@usagimaru
Copy link
Author

usagimaru commented Aug 21, 2023

Required

create-dmg
https://github.com/create-dmg/create-dmg

Usage

% createdmg_shortcut.sh input_dir_name AppName.app Output bg.png

Result:


Background Images

Examples of a background image for the 4th parameter

bg1

bg2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment