Author: brett
Date: Tue Jul 8 13:19:50 2014
New Revision: 1608770
URL: http://svn.apache.org/r1608770
Log:
locate ildasm without PATH
Modified:
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java
Modified:
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java
URL:
http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java?rev=1608770&r1=1608769&r2=1608770&view=diff
==============================================================================
---
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java
(original)
+++
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java
Tue Jul 8 13:19:50 2014
@@ -425,19 +425,29 @@ public abstract class AbstractNPandayInt
}
}
- String value = null;
- try
- {
- value = execute( "ildasm", new String[]{"/text", assembly} );
- disasmExec = "ildasm";
+ String value;
+
+ for (String path : new String[] { System.getenv("ProgramFiles"),
System.getenv("ProgramFiles(x86)")}) {
+ File[] versions = new File(path, "Microsoft
SDKs\\Windows").listFiles();
+ if (versions != null) {
+ for (File f : versions) {
+ File ildasm = new File(f, "bin\\ildasm.exe");
+ if (ildasm.exists()) {
+ disasmExec = ildasm.getAbsolutePath();
+ }
+ }
+ }
+ }
+ if (disasmExec != null) {
+ value = execute( disasmExec, new String[]{"/text", assembly} );
disasmArg = "/text";
}
- catch ( VerificationException e )
- {
+ else {
value = execute( "monodis", new String[]{assembly} );
disasmExec = "monodis";
disasmArg = null;
}
+
return value;
}