summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-08-27 17:55:08 -0700
committerGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-08-27 17:55:08 -0700
commita8f980afe85d26774806ba9c987423185f1c11ac (patch)
treec40152418f19fcd29da04d392aae5f1b8d1668ba
parent8ede9fda35767f083899940886b69f53640891c9 (diff)
Make the packaging script Windows-compatible
-rw-r--r--package.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/package.py b/package.py
index 22ed232c..7fc624cf 100644
--- a/package.py
+++ b/package.py
@@ -101,7 +101,10 @@ class Release:
flush("done!")
def unpack(self):
- shutil.rmtree(self.z3_directory)
+ try:
+ shutil.rmtree(self.z3_directory)
+ except FileNotFoundError:
+ pass
with zipfile.ZipFile(self.z3_zip) as archive:
archive.extractall(CACHE_DIRECTORY)
flush("done!")
@@ -165,9 +168,13 @@ def run(cmd):
def build():
os.chdir(ROOT_DIRECTORY)
flush(" - Building")
- builder = "xbuild" if MONO else "xbuild"
- run([builder, "Source/Dafny.sln", "/t:Clean"])
- run([builder, "Source/Dafny.sln", "/p:Configuration=Checked", "/t:Rebuild"])
+ builder = "xbuild" if MONO else "msbuild"
+ try:
+ run([builder, "Source/Dafny.sln", "/p:Configuration=Checked", "/p:Platform=Any CPU", "/t:Clean"])
+ run([builder, "Source/Dafny.sln", "/p:Configuration=Checked", "/p:Platform=Any CPU", "/t:Rebuild"])
+ except FileNotFoundError:
+ flush("Could not find '{}'! On Windows, you need to run this from the VS native tools command prompt.".format(builder))
+ sys.exit(1)
def pack(releases):
flush(" - Packaging {} Dafny archives".format(len(releases)))