Description: Putting the paths of a Debian install in Beast main class
Author: Pierre Gruet <pgtdebian@free.fr>
Forwarded: not-needed
Last-Update: 2020-09-27

--- a/src/beast/app/beastapp/BeastLauncher.java
+++ b/src/beast/app/beastapp/BeastLauncher.java
@@ -70,7 +70,7 @@
 		while ((!foundJavaJarFile) && (jarDir0 != null)) {
 			foundJavaJarFile = checkForBEAST(jarDir0);
 			foundJavaJarFile = foundJavaJarFile
-					|| checkForBEAST(new File(jarDir0.getAbsolutePath() + pathDelimiter + "lib"));
+					|| checkForBEAST(new File(jarDir0.getAbsolutePath() + pathDelimiter + "beast2-mcmc"));
 
 			if (foundJavaJarFile) {
 				createBeastPackage(jarDir0);
@@ -94,7 +94,7 @@
 
 	private static void createBeastPackage(File jarDir0) {
 		try {
-			if (jarDir0.toString().toLowerCase().endsWith("lib")) {
+			if (jarDir0.toString().toLowerCase().endsWith("mcmc")) {
 				jarDir0 = jarDir0.getParentFile();
 			}
 
@@ -123,7 +123,7 @@
 				}
 			}
 
-			File beastJar = new File(jarDir0 + pathDelimiter + "lib" + pathDelimiter + "beast.jar");
+			File beastJar = new File(jarDir0 + pathDelimiter + "beast2-mcmc" + pathDelimiter + "beast.jar");
 			File target = new File(dir + pathDelimiter + "beast.jar");
 			copyFileUsingStream(beastJar, target);
 
@@ -132,14 +132,10 @@
 			outfile.write(version);
 			outfile.close();
 
-			File beastSrcJar = new File(jarDir0 + pathDelimiter + "lib" + pathDelimiter + "beast.src.jar");
-			File srcTarget = new File(dir + pathDelimiter + "beast.src.jar");
-			copyFileUsingStream(beastSrcJar, srcTarget);
-
-			copyFilesInDir(new File(jarDir0 + pathDelimiter + "examples"),
+			copyFilesInDir(new File(jarDir0 + pathDelimiter + "doc/beast2-mcmc" + pathDelimiter + "examples"),
 					new File(userDir + pathDelimiter + "BEAST" + pathDelimiter + "examples"));
-			copyFilesInDir(new File(jarDir0 + pathDelimiter + "examples" + pathDelimiter + "nexus"), exampleDir);
-			copyFilesInDir(new File(jarDir0 + pathDelimiter + "templates"), templateDir);
+			copyFilesInDir(new File(jarDir0 + pathDelimiter + "doc/beast2-mcmc" + pathDelimiter + "examples" + pathDelimiter + "nexus"), exampleDir);
+			copyFilesInDir(new File(jarDir0 + pathDelimiter + "beast2-mcmc" + pathDelimiter + "templates"), templateDir);
 
 		} catch (Exception e) {
 			// do net let exceptions hold up launch of beast & friends
