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

add Mac OSX application creation script #750

Open
wants to merge 3 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions distribution/Assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@
<source>${basedir}/distribution/linux/digital-simulator.xml</source>
<outputDirectory>/linux/</outputDirectory>
</file>
<file>
<source>${basedir}/distribution/macosx/Digital-background.png</source>
<outputDirectory>/macosx/</outputDirectory>
</file>
<file>
<source>${basedir}/distribution/macosx/Digital.icns</source>
<outputDirectory>/macosx/</outputDirectory>
</file>
<file>
<source>${basedir}/distribution/makeDigitalMacApp.sh</source>
<outputDirectory>/</outputDirectory>
</file>
<file>
<source>${basedir}/src/main/svg/icon.svg</source>
<outputDirectory>/</outputDirectory>
Expand Down
Binary file added distribution/macosx/Digital-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added distribution/macosx/Digital.icns
Binary file not shown.
23 changes: 23 additions & 0 deletions distribution/makeDigitalMacApp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
JAR=$DIR/Digital.jar
ICON=$DIR/macosx/Digital.icns

# create App in same directory, even if run from Finder
cd $DIR

# check to see if Digital.app has already been created
if [ -d "Digital.app" ]
then
echo "Updating .jar file in Digital Mac application"
cp $JAR Digital.app/Contents/Java/Digital.jar
else
echo "Using jar2app to package .jar file into Mac application"
curl -LJO https://github.com/Jorl17/jar2app/archive/refs/tags/stable.tar.gz
tar zxf jar2app-stable.tar.gz
jar2app-stable/jar2app -i $ICON $JAR
rm -rf jar2app-stable*
fi

# NOTE:
# Digital is a Java program and requires that the Java Runtime is installed separately