Skip to content

Commit

Permalink
add packagedir cli options to BEAST and BEAUti CompEvol/beast2#1070
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouckaert committed Dec 14, 2022
1 parent c417ca1 commit 87ec763
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/beastfx/app/beast/BeastMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ public static void main(String[] args) {
new Arguments.StringOption("DFout", "DEFINITIONRESULTFILE", "BEAST XML file written when -DF option is used"),
new Arguments.Option("sampleFromPrior", "samples from prior for MCMC analysis (by adding sampleFromPrior=\"true\" in the first run element)"),
new Arguments.StringOption("version_file", "VERSIONFILE" ,"Provide a version file containing a list of services to explicitly allow. (Useful for package development.)").allowMultipleUse(),
new Arguments.StringOption("packagedir", "PACKAGEDIR" ,"Set user package directory instead of using the default"),
});

try {
Expand All @@ -171,6 +172,11 @@ public static void main(String[] args) {
System.exit(1);
}

if (arguments.hasOption("packagedir")) {
String dir = arguments.getStringOption("packagedir");
System.setProperty("beast.user.package.dir", dir);
}

if (arguments.hasOption("loglevel")) {
String l = arguments.getStringOption("loglevel");
switch (l) {
Expand Down
7 changes: 7 additions & 0 deletions src/beastfx/app/beauti/BeautiTabPane.java
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,13 @@ public void close() throws IOException {
i++;
}
}
if (args[i].equals("-packagedir")) {
args[i] = "";
i++;
String dir = args[i];
System.setProperty("beast.user.package.dir", dir);
args[i] = "";
}
}
if (Utils.isMac()) {
Utils.loadUIManager();
Expand Down

0 comments on commit 87ec763

Please sign in to comment.