Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #19 from tofi86/feature/splash-screen
Browse files Browse the repository at this point in the history
support for a splash file

details: #19
  • Loading branch information
tofi86 committed Oct 8, 2015
2 parents b40fe14 + 94081eb commit ce0f4d6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/universalJavaApplicationStub
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ if [ $exitcode -eq 0 ]; then
# read the MainClass name
JVMMainClass=`/usr/libexec/PlistBuddy -c "print ${JavaKey}:MainClass" "${InfoPlistFile}" 2> /dev/null`

# read the SplashFile name
JVMSplashFile=`/usr/libexec/PlistBuddy -c "print ${JavaKey}:SplashFile" "${InfoPlistFile}" 2> /dev/null`

# read the JVM Options
JVMOptions=`/usr/libexec/PlistBuddy -c "print ${JavaKey}:Properties" "${InfoPlistFile}" 2> /dev/null | grep " =" | sed 's/^ */-D/g' | tr '\n' ' ' | sed 's/ */ /g' | sed 's/ = /=/g' | xargs`
# replace occurences of $APP_ROOT with its content
Expand Down Expand Up @@ -201,6 +204,9 @@ else
# read the MainClass name
JVMMainClass=`/usr/libexec/PlistBuddy -c "print :JVMMainClassName" "${InfoPlistFile}" 2> /dev/null`

# read the SplashFile name
JVMSplashFile=`/usr/libexec/PlistBuddy -c "print :JVMSplashFile" "${InfoPlistFile}" 2> /dev/null`

# read the JVM Options
JVMOptions=`/usr/libexec/PlistBuddy -c "print :JVMOptions" "${InfoPlistFile}" 2> /dev/null | grep " -" | tr -d '\n' | sed 's/ */ /g' | xargs`
# replace occurences of $APP_ROOT with its content
Expand Down Expand Up @@ -370,6 +376,7 @@ elif [ -f "$JAVACMD" ] && [ -x "$JAVACMD" ] ; then
# - JVM arguments
exec "$JAVACMD" \
-cp "${JVMClassPath}" \
-splash:"${ResourcesFolder}/${JVMSplashFile}" \
-Xdock:icon="${ResourcesFolder}/${CFBundleIconFile}" \
-Xdock:name="${CFBundleName}" \
${JVMOptions:+$JVMOptions }\
Expand Down

0 comments on commit ce0f4d6

Please sign in to comment.