summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2016-03-30 11:38:13 +0200
committerGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2016-03-30 11:38:13 +0200
commit87047cd015c07f5d98def6681a0187639ccc62b5 (patch)
treec915adfe32353877c6eaaf4b580a93bf42f7586d
parent62eb04905d6dcb3ab0b6d7cbf1051c97fec01474 (diff)
Add a wrapper for DafnyServer.exe
-rwxr-xr-xBinaries/dafny-server16
-rwxr-xr-xpackage.py6
2 files changed, 19 insertions, 3 deletions
diff --git a/Binaries/dafny-server b/Binaries/dafny-server
new file mode 100755
index 00000000..2fd0d202
--- /dev/null
+++ b/Binaries/dafny-server
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+MONO=$(which mono)
+DAFNYSERVER=$(dirname "${BASH_SOURCE[0]}")/DafnyServer.exe
+
+if [[ ! -x "$MONO" ]]; then
+ echo "Error: Dafny requires Mono to run on non-Windows systems."
+ exit 1
+fi
+
+if [[ ! -x "$DAFNYSERVER" ]]; then
+ echo "Error: DafnyServer.exe not found at $DAFNYSERVER."
+ exit 1
+fi
+
+"$MONO" "$DAFNYSERVER" "$@"
diff --git a/package.py b/package.py
index 32192822..721bb0eb 100755
--- a/package.py
+++ b/package.py
@@ -34,8 +34,8 @@ Z3_PACKAGE_PREFIX = path.join("z3")
## What do we take from the z3 archive? (Glob syntax)
Z3_INTERESTING_FILES = ["LICENSE.txt", "bin/*"]
-## On unix system, which Dafny files should be marked as executable? (Glob syntax; Z3's permissions are preserved)
-UNIX_EXECUTABLES = ["dafny"]
+## On unix systems, which Dafny files should be marked as executable? (Glob syntax; Z3's permissions are preserved)
+UNIX_EXECUTABLES = ["dafny", "dafny-server"]
## What do we take from Dafny's Binaries folder?
DLLs = ["AbsInt",
@@ -55,7 +55,7 @@ DLLs = ["AbsInt",
"VCExpr",
"VCGeneration"]
EXEs = ["Dafny", "DafnyServer"]
-ETCs = ["dafny", "DafnyPrelude.bpl", "DafnyRuntime.cs", "DafnyLanguageService.vsix"]
+ETCs = UNIX_EXECUTABLES + ["DafnyPrelude.bpl", "DafnyRuntime.cs", "DafnyLanguageService.vsix"]
# Constants