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

Commit 94081eb

Browse files
committed
support for a splash file
uses the Java parameter -splash:<file> Info.plist entry in Apple style: <key>Java</key> <dict> <key>SplashFile</key> <string>splash.png</string> </dict> Info.plist entry in Oracle style: <key>JVMSplashFile</key> <string>splash.png</string> Splash files need to be placed in "Resources/" folder in the package
1 parent b40fe14 commit 94081eb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/universalJavaApplicationStub

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ if [ $exitcode -eq 0 ]; then
156156
# read the MainClass name
157157
JVMMainClass=`/usr/libexec/PlistBuddy -c "print ${JavaKey}:MainClass" "${InfoPlistFile}" 2> /dev/null`
158158

159+
# read the SplashFile name
160+
JVMSplashFile=`/usr/libexec/PlistBuddy -c "print ${JavaKey}:SplashFile" "${InfoPlistFile}" 2> /dev/null`
161+
159162
# read the JVM Options
160163
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`
161164
# replace occurences of $APP_ROOT with its content
@@ -201,6 +204,9 @@ else
201204
# read the MainClass name
202205
JVMMainClass=`/usr/libexec/PlistBuddy -c "print :JVMMainClassName" "${InfoPlistFile}" 2> /dev/null`
203206

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

0 commit comments

Comments
 (0)