Created
April 11, 2020 14:03
-
-
Save nullxx/c3aa9c2e21b49bcbac4a5dd119fd0571 to your computer and use it in GitHub Desktop.
./macPackager.sh <JAVA_HOME> <APP_NAME> <MAIN_APP_CLASS> <APP_VERSION> <ICON_NAME> <JAR_EXECUTABLE_INPUT>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
JAVA_HOME=$1 | |
APP_NAME=$2 | |
MAIN_APP_CLASS=$3 | |
APP_VERSION=$4 | |
ICON_NAME=$5 | |
JAR_EXECUTABLE_INPUT=$6 | |
OUT_EXECUTABLE_TYPE=pkg | |
OUT_FOLDER=out | |
mkdir -p package/macosx | |
cp -v *.png *.icns package/macosx | |
$JAVA_HOME/bin/javapackager -deploy -native $OUT_EXECUTABLE_TYPE -name $APP_NAME \ | |
-BappVersion=$APP_VERSION -Bicon=package/macosx/$ICON_NAME.icns \ | |
-srcdir . -srcfiles $JAR_EXECUTABLE_INPUT -appclass $MAIN_APP_CLASS \ | |
-outdir $OUT_FOLDER -outfile $APP_NAME_v$APP_VERSION.$OUT_EXECUTABLE_TYPE | |
rm -r package |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment