Skip to content

Commit 8a77c7d

Browse files
committed
U use bootstrap file name from packager
1 parent b10770a commit 8a77c7d

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/main/resources/linux/startup.sh.vtl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ cd "$SCRIPTPATH"
7878

7979
#if ($info.scripts.bootstrap)
8080
# invoke bootstrap script
81-
Bootstrap=$SCRIPTPATH/scripts/bootstrap && [ -x "$Bootstrap" ] && $Bootstrap
81+
Bootstrap=$SCRIPTPATH/scripts/${info.bootstrapFile.name} && [ -x "$Bootstrap" ] && $Bootstrap
8282
#end
8383

8484
#if ($info.administratorRequired)

src/main/resources/mac/Info.plist.vtl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@
113113
#end
114114
<key>JVMOptionsFile</key>
115115
<string>$APP_PACKAGE/Contents/Resources/${info.name}.l4j.ini</string>
116+
#if ($info.scripts.bootstrap)
117+
<key>BootstrapScript</key>
118+
<string>$APP_PACKAGE/Contents/Resources/scripts/${info.bootstrapFile.name}</string>
119+
#end
116120
</dict>
117121
<key>LSEnvironment</key>
118122
<dict>

src/main/resources/mac/universalJavaApplicationStub

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ if [ $exitcode -eq 0 ]; then
242242
# read options file name
243243
JVMOptionsFile=$(plist_get_java ':JVMOptionsFile')
244244

245+
# read bootstrap script file name
246+
BootstrapScript=$(plist_get_java ':BootstrapScript')
247+
245248
# read 'Info.plist' file in Oracle style
246249
else
247250
stub_logger "[PlistStyle] Oracle"
@@ -306,6 +309,9 @@ else
306309
# read options file name
307310
JVMOptionsFile=$(plist_get ':JVMOptionsFile')
308311

312+
# read bootstrap script file name
313+
BootstrapScript=$(plist_get ':BootstrapScript')
314+
309315
fi
310316

311317
# read JVM options from file
@@ -874,7 +880,7 @@ cd "${WorkingDirectory}" || exit 13
874880
stub_logger "[WorkingDirectory] ${WorkingDirectory}"
875881

876882
# invoke bootstrap script
877-
Bootstrap=$ResourcesFolder/scripts/bootstrap && [ -x "$Bootstrap" ] && $Bootstrap
883+
[ -x "$BootstrapScript" ] && "$BootstrapScript"
878884

879885
# execute Java and set
880886
# - classpath

0 commit comments

Comments
 (0)