summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Binaries/z3bin0 -> 16438468 bytes
-rw-r--r--Source/Dafny/DafnyOptions.cs10
2 files changed, 10 insertions, 0 deletions
diff --git a/Binaries/z3 b/Binaries/z3
new file mode 100644
index 00000000..7c60feb4
--- /dev/null
+++ b/Binaries/z3
Binary files differ
diff --git a/Source/Dafny/DafnyOptions.cs b/Source/Dafny/DafnyOptions.cs
index 8972c490..66cf639f 100644
--- a/Source/Dafny/DafnyOptions.cs
+++ b/Source/Dafny/DafnyOptions.cs
@@ -11,6 +11,7 @@ namespace Microsoft.Dafny
{
public DafnyOptions()
: base("Dafny", "Dafny program verifier") {
+ SetZ3ExecutableName();
}
public override string VersionNumber {
@@ -255,6 +256,15 @@ namespace Microsoft.Dafny
// TODO: provide attribute help here
}
+ private void SetZ3ExecutableName() {
+ var platform = (int)System.Environment.OSVersion.Platform;
+ var isLinux = platform == 4 || platform == 128; // http://www.mono-project.com/docs/faq/technical/
+
+ //TODO should we also vendor an OSX build?
+ var binDir = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
+ Z3ExecutablePath = System.IO.Path.Combine(binDir, isLinux ? "z3" : "z3.exe");
+ }
+
public override void Usage() {
Console.WriteLine(@" ---- Dafny options ---------------------------------------------------------