diff --git a/Makefile b/Makefile index 5a3343f..ce1c02f 100644 --- a/Makefile +++ b/Makefile @@ -121,7 +121,7 @@ dist-free: doodads bindata build-free __dist-common __dist-common: mkdir -p dist/doodle-$(VERSION) cp bin/* dist/doodle-$(VERSION)/ - cp -r README.md "Open Source Licenses.md" dist/doodle-$(VERSION)/ + cp -r README.md Changes.md "Open Source Licenses.md" dist/doodle-$(VERSION)/ cd dist && tar -czvf doodle-$(VERSION).tar.gz doodle-$(VERSION) cd dist && zip -r doodle-$(VERSION).zip doodle-$(VERSION) diff --git a/etc/macos/Project Doodle.app/Contents/Info.plist b/etc/macos/Project Doodle.app/Contents/Info.plist new file mode 100644 index 0000000..f32e901 --- /dev/null +++ b/etc/macos/Project Doodle.app/Contents/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleGetInfoString + Project: Doodle + CFBundleExecutable + doodle + CFBundleIdentifier + net.kirsle.ProjectDoodle + CFBundleName + Doodle + CFBundleIconFile + icon.icns + CFBundleShortVersionString + 0.01 + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + IFMajorVersion + 0 + IFMinorVersion + 1 + NSHighResolutionCapable + NSSupportsAutomaticGraphicsSwitching + + diff --git a/etc/macos/Project Doodle.app/Contents/Resources/icon.icns b/etc/macos/Project Doodle.app/Contents/Resources/icon.icns new file mode 100644 index 0000000..8db1a56 Binary files /dev/null and b/etc/macos/Project Doodle.app/Contents/Resources/icon.icns differ diff --git a/etc/macos/README.md b/etc/macos/README.md new file mode 100644 index 0000000..3d79887 --- /dev/null +++ b/etc/macos/README.md @@ -0,0 +1,13 @@ +# Mac OS Configuration + +This directory contains a template `.app` folder for Mac OS. + +## Creating the ICNS Icon + +On Fedora: `dnf install libicns-utils`, Ubuntu `apt install icnsutils` + +Command: `png2icns icon.icns 16.png 32.png 128.png 256.png` + +Note, 48x48 is also a valid icon size but I didn't make one that size yet. + +https://dentrassi.de/2014/02/25/creating-mac-os-x-icons-icns-on-linux/ diff --git a/scripts/mac-app.sh b/scripts/mac-app.sh new file mode 100755 index 0000000..e9cc3b9 --- /dev/null +++ b/scripts/mac-app.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# mac-app: create Mac OS .app distribution. Run this script from the directory +# containing the doodad binaries (subdirectory of /dist from git repo root) + +VERSION=`grep -e 'Version =' ../../pkg/branding/branding.go | head -n 1 | cut -d '"' -f 2` +INSTALL_ROOT="/opt/project-doodle" +APP_NAME="Project Doodle.app" +APP_FOLDER="../../etc/macos/$APP_NAME" +APP_CONTENTS="$APP_NAME/Contents" + +if [[ ! -f "./doodle" ]]; then + echo Run this script from the directory containing the Doodle binary. + echo This is usually at /dist/doodle-VERSION/ relative to the git root. + exit 1 +fi + +if [[ ! -d "$APP_FOLDER" ]]; then + echo "Didn't find Mac .app template relative to current folder." + echo "I looked at $APP_FOLDER." + exit 1 +fi + +# Copy the Mac app template in to current folder. +echo Copying template app: $APP_FOLDER +cp -r "$APP_FOLDER" ./ +mkdir -p "$APP_CONTENTS/MacOS" +mkdir -p "$APP_CONTENTS/Resources" + +# Copy binaries to /MacOS +cp doodle doodad "$APP_CONTENTS/MacOS/" +cp *.* "$APP_CONTENTS/Resources/"