From 1d50a7a3bbb6ce2377d699120b1386209df18fc1 Mon Sep 17 00:00:00 2001 From: Zeruth Date: Fri, 2 Aug 2019 20:02:23 -0400 Subject: [PATCH] runeliteplus: enable bootstrap args and run bootstrapper through gradle run --args='-bootstrap' --- .../main/java/net/runelite/client/RuneLite.java | 14 +++++++++++++- .../client/util/bootstrap/Bootstrapper.java | 4 ++-- staging/.gitignore | 1 + 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 staging/.gitignore diff --git a/runelite-client/src/main/java/net/runelite/client/RuneLite.java b/runelite-client/src/main/java/net/runelite/client/RuneLite.java index b0595c1e19..5048173093 100644 --- a/runelite-client/src/main/java/net/runelite/client/RuneLite.java +++ b/runelite-client/src/main/java/net/runelite/client/RuneLite.java @@ -72,6 +72,7 @@ import net.runelite.client.ui.overlay.infobox.InfoBoxManager; import net.runelite.client.ui.overlay.infobox.InfoBoxOverlay; import net.runelite.client.ui.overlay.tooltip.TooltipOverlay; import net.runelite.client.ui.overlay.worldmap.WorldMapOverlay; +import net.runelite.client.util.bootstrap.Bootstrapper; import net.runelite.client.ws.PartyService; import org.slf4j.LoggerFactory; @@ -178,7 +179,8 @@ public class RuneLite parser.accepts("developer-mode", "Enable developer tools"); parser.accepts("debug", "Show extra debugging output"); parser.accepts("no-splash", "Do not show the splash screen"); - + parser.accepts("bootstrap", "Builds a bootstrap with locally built jars"); + parser.accepts("bootstrap-staging", "Builds a testing bootstrap with locally built jars"); final ArgumentAcceptingOptionSpec proxyInfo = parser .accepts("proxy") .withRequiredArg().ofType(String.class); @@ -200,6 +202,16 @@ public class RuneLite parser.accepts("help", "Show this text").forHelp(); OptionSet options = parser.parse(args); + if (options.has("bootstrap")) + { + Bootstrapper.main(false); + System.exit(0); + } + if (options.has("bootstrap-staging")) + { + Bootstrapper.main(true); + System.exit(0); + } if (options.has("proxy")) { String[] proxy = options.valueOf(proxyInfo).split(":"); diff --git a/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Bootstrapper.java b/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Bootstrapper.java index 770c377457..c934f2e043 100644 --- a/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Bootstrapper.java +++ b/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Bootstrapper.java @@ -11,10 +11,10 @@ public class Bootstrapper public static String remoteLocation; public static String localLocation; - public static void main(String[] args) + public static void main(boolean staging) { - if (args.length > 0) + if (staging) { remoteLocation = "staging/"; localLocation = "./staging/"; diff --git a/staging/.gitignore b/staging/.gitignore new file mode 100644 index 0000000000..b45be0d724 --- /dev/null +++ b/staging/.gitignore @@ -0,0 +1 @@ +*bootstrap*.json