File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,8 @@ <h4>option</h4>
145145 </ tr >
146146 < tr >
147147 < td valign ="top "> value</ td >
148- < td valign ="top "> The option value.</ td >
148+ < td valign ="top "> The option value. Occurrences of the string "$APP_ROOT" will be replaced with
149+ the absolute file system path to the application bundle.</ td >
149150 < td align ="center " valign ="top "> Yes</ td >
150151 </ tr >
151152</ table >
@@ -160,7 +161,8 @@ <h4>argument</h4>
160161 </ tr >
161162 < tr >
162163 < td valign ="top "> value</ td >
163- < td valign ="top "> The argument value.</ td >
164+ < td valign ="top "> The argument value. Occurrences of the string "$APP_ROOT" will be replaced with
165+ the absolute file system path to the application bundle.</ td >
164166 < td align ="center " valign ="top "> Yes</ td >
165167 </ tr >
166168</ table >
Original file line number Diff line number Diff line change 3535#define JVM_OPTIONS_KEY " JVMOptions"
3636#define JVM_ARGUMENTS_KEY " JVMArguments"
3737
38+ #define APP_ROOT_PREFIX " $APP_ROOT"
39+
3840#define LIBJLI_DYLIB " /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib"
3941
4042typedef int (JNICALL *JLI_Launch_t)(int argc, char ** argv,
@@ -152,12 +154,14 @@ int launch(char *commandName) {
152154 argv[i++] = strdup ([libraryPath UTF8String ]);
153155
154156 for (NSString *option in options) {
157+ option = [option stringByReplacingOccurrencesOfString: @APP_ROOT_PREFIX withString: [mainBundle bundlePath ]];
155158 argv[i++] = strdup ([option UTF8String ]);
156159 }
157160
158161 argv[i++] = strdup ([mainClassName UTF8String ]);
159162
160163 for (NSString *argument in arguments) {
164+ argument = [argument stringByReplacingOccurrencesOfString: @APP_ROOT_PREFIX withString: [mainBundle bundlePath ]];
161165 argv[i++] = strdup ([argument UTF8String ]);
162166 }
163167
Original file line number Diff line number Diff line change @@ -27,11 +27,8 @@ questions.
2727
2828<project name =" appbundler" default =" package" >
2929 <property environment =" env" />
30-
3130 <property file =" build.properties" />
32-
3331 <property name =" folder.src" value =" src" />
34- <property name =" folder.native" value =" native" />
3532 <property name =" folder.bin" value =" bin" />
3633 <property name =" folder.classes" value =" ${ folder.bin } /classes" />
3734
@@ -63,7 +60,6 @@ questions.
6360 </fileset >
6461 </copy >
6562
66- <!-- TODO Move this to a makefile so we can reference the defines required by JLI_Launch() -->
6763 <exec executable =" gcc" >
6864 <arg value =" -I" />
6965 <arg value =" ${ env.JAVA_HOME } /include" />
You can’t perform that action at this time.
0 commit comments