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

Commit ce0f4d6

Browse files
committed
Merge pull request #19 from tofi86/feature/splash-screen
support for a splash file details: #19
2 parents b40fe14 + 94081eb commit ce0f4d6

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)