runeliteplus: enable bootstrap args and run bootstrapper through gradle run --args='-bootstrap'

This commit is contained in:
Zeruth
2019-08-02 20:02:23 -04:00
parent 6fb7b1fc43
commit 1d50a7a3bb
3 changed files with 16 additions and 3 deletions

View File

@@ -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<String> 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(":");

View File

@@ -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/";

1
staging/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*bootstrap*.json