diff --git a/src/main/java/com/threerings/getdown/launcher/GetdownAppletConfig.java b/src/main/java/com/threerings/getdown/launcher/GetdownAppletConfig.java index c420e82..f6cb990 100644 --- a/src/main/java/com/threerings/getdown/launcher/GetdownAppletConfig.java +++ b/src/main/java/com/threerings/getdown/launcher/GetdownAppletConfig.java @@ -33,6 +33,8 @@ import java.io.IOException; import java.io.PrintStream; import java.net.MalformedURLException; import java.net.URL; +import java.util.ArrayList; +import java.util.List; import java.util.Map; import java.util.Properties; @@ -50,25 +52,32 @@ import static com.threerings.getdown.Log.log; public class GetdownAppletConfig { public static final String APPBASE = "appbase"; - public static final String APPNAME = "appname"; - public static final String BGIMAGE = "bgimage"; - public static final String ERRORBGIMAGE = "errorbgimage"; - - public static final String PROPERTIES = "properties"; - public static final String PARAM_DELIMITER = "."; - - public static final String APP_PROPERTIES = "app_properties"; - public static final String DIRECT = "direct"; - public static final String REDIRECT_ON_FINISH = "redirect_on_finish"; - public static final String REDIRECT_ON_FINISH_TARGET = "redirect_on_finish_target"; + /** Used to specify the names of additional jvmargs properties. Each jvmarg property will + * be suffixed by a monotonically increasing integer starting at zero, e.g. + *
{@code
+ *
+ *
+ * }
+ * When a number is reached for which no value exists, we stop looking. */
+ public static final String JVMARG_PREFIX = "jvmargs";
+
+ /** A property specifying the names of additional appargs properties. Each apparg property will
+ * be suffixed by a monotonically increasing integer starting at zero, e.g.
+ * {@code
+ *
+ *
+ * }
+ * When a number is reached for which no value exists, we stop looking. */
+ public static final String APPARG_PREFIX = "appargs";
+
public String appbase;
public String appname;
@@ -79,12 +88,14 @@ public class GetdownAppletConfig
/** The error background image */
public String errorimgpath;
- public Properties properties = new Properties();
-
public File appdir;
+ /** Additional jvmargs to supply to the launching app. */
public String[] jvmargs;
+ /** Additional appargs to supply to the launching app. */
+ public String[] appargs;
+
/** An optional URL to which the applet should redirect when done. */
public URL redirectUrl;
@@ -92,10 +103,8 @@ public class GetdownAppletConfig
public String installerFileContents;
- /**
- * Indicates whether the downloaded app should be launched in the parent applet (true) or as a
- * separate java process (false).
- */
+ /** Indicates whether the downloaded app should be launched in the parent applet (true) or as a
+ * separate java process (false). */
public boolean invokeDirect;
/** Optional default bounds for the status panel. */
@@ -121,15 +130,17 @@ public class GetdownAppletConfig
imgpath = getParameter(BGIMAGE);
errorimgpath = getParameter(ERRORBGIMAGE);
- String props = getParameter(PROPERTIES);
+ // DEPRECATED LEGACY CRAP: extract system properties to set in applet JVM (not app JVM)
+ String props = getParameter("properties");
if (props != null) {
String[] proparray = props.split(" ");
for (String property : proparray) {
String key = property.substring(property.indexOf("-D") + 2, property.indexOf("="));
String value = property.substring(property.indexOf("=") + 1);
- properties.setProperty(key, value);
+ _properties.setProperty(key, value);
}
}
+ // END DLC
String root;
if (RunAnywhere.isWindows()) {
@@ -153,16 +164,21 @@ public class GetdownAppletConfig
installerFileContents = getParameter("installer");
- // Pull out -D properties to pass through to the launched vm if they exist
- String params = getParameter(APP_PROPERTIES);
- if (params == null) {
- jvmargs = new String[0];
- } else {
- jvmargs = params.split(",");
- for (int ii = 0; ii < jvmargs.length; ii++) {
- jvmargs[ii] = "-D" + jvmargs[ii];
+ // extract arguments to be added to getdown.txt's jvmargs
+ List