Skip to content

Commit

Permalink
package NetLogoLite and demo in zip - fix #63
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaspayette committed Sep 6, 2012
1 parent 7845481 commit a89714b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,19 @@ packageBin in Compile <<= (packageBin in Compile, dependencyClasspath in Runtime
pack200(path.getName)
}
if(Process("git diff --quiet --exit-code HEAD").! == 0) {
//Process("git archive -o nw.zip --prefix=nw/ HEAD").!!
// copy everything thing we need for distribution in
// a temporary "nw" directory, which we will then zip
// before deleting it.
IO.createDirectory(base / "nw")
val zipExtras =
(libraryJarPaths.map(_.getName) :+ "nw.jar")
.filterNot(_ == "NetLogoLite-5.0.2.jar")
.flatMap{ jar => Seq(jar, jar + ".pack.gz") }
for(extra <- zipExtras)
IO.copyFile(base / extra, base / "nw" / extra)
Process("zip nw.zip " + zipExtras.map("nw/" + _).mkString(" ")).!!
for (dir <- Seq("alternate-netlogolite", "demo"))
IO.copyDirectory(base / dir, base / "nw" / dir)
Process("zip -r nw.zip nw").!!
IO.delete(base / "nw")
}
else {
Expand Down

0 comments on commit a89714b

Please sign in to comment.