more debugging display and some start-up input path sanity checking
i expect the most common set of problems with running this project will be path related, thus all the "silly" code i've been adding related to paths and checking / debug displays
This commit is contained in:
parent
c6787f8794
commit
bf0cd16696
|
@ -61,11 +61,34 @@ public class CJavaPipeline {
|
||||||
listener = new GetPolygonPointsInjector();
|
listener = new GetPolygonPointsInjector();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run(PackageProcessOptions[] packages, Properties processingOptions) {
|
public void run(PackageProcessOptions[] packages, Properties processingOptions) throws Exception {
|
||||||
|
PackageProcessOptions bwapiOptions = packages[0];
|
||||||
|
PackageProcessOptions bwtaOptions = packages[1];
|
||||||
|
|
||||||
|
System.out.println("BWAPI package processing options:");
|
||||||
|
System.out.println(" cHeadersDir = " + bwapiOptions.cHeadersDir);
|
||||||
|
System.out.println(" manualCopyClassesDir = " + bwapiOptions.manualCopyClassesDir);
|
||||||
|
System.out.println();
|
||||||
|
|
||||||
|
System.out.println("BWTA package processing options:");
|
||||||
|
System.out.println(" cHeadersDir = " + bwtaOptions.cHeadersDir);
|
||||||
|
System.out.println(" manualCopyClassesDir = " + bwtaOptions.manualCopyClassesDir);
|
||||||
|
System.out.println();
|
||||||
|
|
||||||
System.out.println("Processing options:");
|
System.out.println("Processing options:");
|
||||||
for (String propKey : processingOptions.stringPropertyNames())
|
for (String propKey : processingOptions.stringPropertyNames())
|
||||||
System.out.println(" " + propKey + " = " + processingOptions.getProperty(propKey));
|
System.out.println(" " + propKey + " = " + processingOptions.getProperty(propKey));
|
||||||
|
|
||||||
|
// some input path/files sanity checking first ...
|
||||||
|
if (bwapiOptions.cHeadersDir != null && !bwapiOptions.cHeadersDir.exists())
|
||||||
|
throw new FileNotFoundException("BWAPI cHeadersDir not found: " + bwapiOptions.cHeadersDir.toString());
|
||||||
|
if (bwapiOptions.manualCopyClassesDir != null && !bwapiOptions.manualCopyClassesDir.exists())
|
||||||
|
throw new FileNotFoundException("BWAPI manualCopyClassesDir not found: " + bwapiOptions.manualCopyClassesDir.toString());
|
||||||
|
if (bwtaOptions.cHeadersDir != null && !bwtaOptions.cHeadersDir.exists())
|
||||||
|
throw new FileNotFoundException("BWTA cHeadersDir not found: " + bwtaOptions.cHeadersDir.toString());
|
||||||
|
if (bwtaOptions.manualCopyClassesDir != null && !bwtaOptions.manualCopyClassesDir.exists())
|
||||||
|
throw new FileNotFoundException("BWTA manualCopyClassesDir not found: " + bwtaOptions.manualCopyClassesDir.toString());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Init
|
Init
|
||||||
*/
|
*/
|
||||||
|
@ -262,7 +285,9 @@ public class CJavaPipeline {
|
||||||
if (args.length > 0)
|
if (args.length > 0)
|
||||||
basePathString = args[0];
|
basePathString = args[0];
|
||||||
else
|
else
|
||||||
basePathString = ".";
|
// assumes running from this project's directory, which means the correct path to use in the
|
||||||
|
// current un-altered git repository layout is one level up from this one
|
||||||
|
basePathString = "..";
|
||||||
|
|
||||||
File basePath = new File(basePathString);
|
File basePath = new File(basePathString);
|
||||||
|
|
||||||
|
@ -275,7 +300,9 @@ public class CJavaPipeline {
|
||||||
System.out.println("Using base path: " + basePath.getPath());
|
System.out.println("Using base path: " + basePath.getPath());
|
||||||
if (!basePath.isAbsolute())
|
if (!basePath.isAbsolute())
|
||||||
System.out.println("Absolute base path: " + basePath.getAbsolutePath());
|
System.out.println("Absolute base path: " + basePath.getAbsolutePath());
|
||||||
|
System.out.println();
|
||||||
|
|
||||||
|
try {
|
||||||
if (BWAPI_VERSION == BWAPI_V3) {
|
if (BWAPI_VERSION == BWAPI_V3) {
|
||||||
|
|
||||||
PackageProcessOptions bwapiOptions = new PackageProcessOptions();
|
PackageProcessOptions bwapiOptions = new PackageProcessOptions();
|
||||||
|
@ -323,7 +350,9 @@ public class CJavaPipeline {
|
||||||
|
|
||||||
new CJavaPipeline().run(new PackageProcessOptions[]{bwapiOptions, bwtaOptions}, props);
|
new CJavaPipeline().run(new PackageProcessOptions[]{bwapiOptions, bwtaOptions}, props);
|
||||||
}
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String COMPILE_DIR_PROPERTY = "compiled_dir";
|
private static final String COMPILE_DIR_PROPERTY = "compiled_dir";
|
||||||
|
|
Reference in a new issue