pass MW home to the client

pull/34/head
Zlatin Balevsky 2019-11-30 06:21:32 +00:00
parent 562d9a0f4a
commit 5d2d831b9e
2 changed files with 6 additions and 1 deletions

View File

@ -3,4 +3,4 @@ clientApp.0.name=MuWire
clientApp.0.startOnLoad=true
clientApp.0.delay=5
clientApp.0.classpath=${libname}
clientApp.0.args=version=${version}
clientApp.0.args=version=${version} home="\$PLUGIN"

View File

@ -11,6 +11,7 @@ public class MuWireClient implements RouterApp {
private final ClientAppManager mgr;
private final String[] args;
private final String version;
private final String home;
private ClientAppState state;
@ -19,12 +20,16 @@ public class MuWireClient implements RouterApp {
this.mgr = mgr;
this.args = args;
String version = null;
String home = null;
for (String arg : args) {
String [] split = arg.split("=");
if (split[0].equals("version"))
version = split[1];
else if (split[0].equals("home"))
home = split[1];
}
this.version = version;
this.home = home;
}
@Override