2019-01-04 23:35:23 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
version="@STRAWBERRY_VERSION_PACKAGE@"
|
|
|
|
|
|
|
|
if [ -z "$1" ]; then
|
2019-02-04 23:42:07 +01:00
|
|
|
echo "Usage: $0 <bundle.app> (append)"
|
2019-01-04 23:35:23 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
name=$(basename "$1" | perl -pe 's/(.*).app/\1/')
|
|
|
|
bundle_dir="$1"
|
|
|
|
temp_dir="dmg/$name"
|
2019-02-04 23:42:07 +01:00
|
|
|
if [ -z "$2" ]; then
|
|
|
|
output_file="$name-$version.dmg"
|
|
|
|
else
|
|
|
|
output_file="$name-$2-$version.dmg"
|
|
|
|
fi
|
2019-01-04 23:35:23 +01:00
|
|
|
|
|
|
|
rm -rf "$temp_dir"
|
|
|
|
rm -f "$output_file"
|
|
|
|
|
|
|
|
mkdir -p "$temp_dir"
|
|
|
|
|
2019-07-20 15:23:22 +02:00
|
|
|
/usr/local/bin/create-dmg --volname "$name" --background "@CMAKE_SOURCE_DIR@/dist/macos/dmg_background.png" --app-drop-link 450 218 --icon $bundle_dir 150 218 --window-size 600 450 $output_file $bundle_dir
|