diff --git a/project/packaging.scala b/project/packaging.scala index 137d7acc4..1de6a1dfb 100644 --- a/project/packaging.scala +++ b/project/packaging.scala @@ -86,15 +86,23 @@ object Packaging { // WINDOWS SPECIFIC name in Windows := "sbt", - wixConfig <<= (sbtVersion) map { (sv) => - val version = (sv split "\\.") match { + lightOptions ++= Seq("-ext", "WixUIExtension", "-cultures:en-us"), + wixConfig <<= (sbtVersion, sourceDirectory in Windows) map makeWindowsXml, + //wixFile <<= sourceDirectory in Windows map (_ / "sbt.xml"), + mappings in packageMsi in Windows <+= sbtLaunchJar map { f => f -> "sbt-launch.jar" }, + mappings in packageMsi in Windows <+= sourceDirectory in Windows map { d => + (d / "sbt.bat") -> "sbt.bat" } + ) + + def makeWindowsXml(sbtVersion: String, sourceDir: File) = { + val version = (sbtVersion split "\\.") match { case Array(major,minor,bugfix, _*) => Seq(major,minor,bugfix, "1") mkString "." case Array(major,minor) => Seq(major,minor,"0","1") mkString "." case Array(major) => Seq(major,"0","0","1") mkString "." } ( - - - + + + + + - - - + + + + + + + + + + + + + ) - }, - //wixFile <<= sourceDirectory in Windows map (_ / "sbt.xml"), - mappings in packageMsi in Windows <+= sbtLaunchJar map { f => f -> "sbt-launch.jar" }, - mappings in packageMsi in Windows <+= sourceDirectory in Windows map { d => - (d / "sbt.bat") -> "sbt.bat" } - ) + } } diff --git a/src/windows/License.rtf b/src/windows/License.rtf new file mode 100644 index 000000000..218b93046 Binary files /dev/null and b/src/windows/License.rtf differ