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>
145
145
</ tr >
146
146
< tr >
147
147
< 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 >
149
150
< td align ="center " valign ="top "> Yes</ td >
150
151
</ tr >
151
152
</ table >
@@ -160,7 +161,8 @@ <h4>argument</h4>
160
161
</ tr >
161
162
< tr >
162
163
< 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 >
164
166
< td align ="center " valign ="top "> Yes</ td >
165
167
</ tr >
166
168
</ table >
Original file line number Diff line number Diff line change 35
35
#define JVM_OPTIONS_KEY " JVMOptions"
36
36
#define JVM_ARGUMENTS_KEY " JVMArguments"
37
37
38
+ #define APP_ROOT_PREFIX " $APP_ROOT"
39
+
38
40
#define LIBJLI_DYLIB " /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib"
39
41
40
42
typedef int (JNICALL *JLI_Launch_t)(int argc, char ** argv,
@@ -152,12 +154,14 @@ int launch(char *commandName) {
152
154
argv[i++] = strdup ([libraryPath UTF8String ]);
153
155
154
156
for (NSString *option in options) {
157
+ option = [option stringByReplacingOccurrencesOfString: @APP_ROOT_PREFIX withString: [mainBundle bundlePath ]];
155
158
argv[i++] = strdup ([option UTF8String ]);
156
159
}
157
160
158
161
argv[i++] = strdup ([mainClassName UTF8String ]);
159
162
160
163
for (NSString *argument in arguments) {
164
+ argument = [argument stringByReplacingOccurrencesOfString: @APP_ROOT_PREFIX withString: [mainBundle bundlePath ]];
161
165
argv[i++] = strdup ([argument UTF8String ]);
162
166
}
163
167
Original file line number Diff line number Diff line change @@ -27,11 +27,8 @@ questions.
27
27
28
28
<project name =" appbundler" default =" package" >
29
29
<property environment =" env" />
30
-
31
30
<property file =" build.properties" />
32
-
33
31
<property name =" folder.src" value =" src" />
34
- <property name =" folder.native" value =" native" />
35
32
<property name =" folder.bin" value =" bin" />
36
33
<property name =" folder.classes" value =" ${ folder.bin } /classes" />
37
34
@@ -63,7 +60,6 @@ questions.
63
60
</fileset >
64
61
</copy >
65
62
66
- <!-- TODO Move this to a makefile so we can reference the defines required by JLI_Launch() -->
67
63
<exec executable =" gcc" >
68
64
<arg value =" -I" />
69
65
<arg value =" ${ env.JAVA_HOME } /include" />
You can’t perform that action at this time.
0 commit comments