Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #43 - unable to create MSI of play application #50

Merged
merged 5 commits into from
Oct 21, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.12.4
sbt.version=0.13.0
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ trait GenericPackageSettings
(file, name) <- mappings
if !file.isDirectory
if name startsWith "conf/"
} yield name
} yield name.replaceAll("//", "/").stripSuffix("/").stripSuffix("/")
val menuLinks =
WindowsFeature(
id="AddConfigLinks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ object WixHelper {
// Now for directories...
def parentDir(filename: String) = { filename take (filename lastIndexOf '/') }
def simpleName(filename: String) = {
val lastSlash = filename lastIndexOf '/'
val lastSlash =
if(filename contains '/') filename lastIndexOf '/'
else filename lastIndexOf '\\'
filename drop (lastSlash + 1)
}
val dirs = (filenames map parentDir).distinct;
Expand Down Expand Up @@ -105,7 +107,7 @@ object WixHelper {
ComponentInfo(id, xml)
case ComponentFile(name, editable) =>
val uname = name.replaceAll("\\\\", "/")
val dir = parentDir(uname)
val dir = parentDir(uname).replaceAll("//", "/").stripSuffix("/").stripSuffix("/")
val dirRef = if(dir.isEmpty) "INSTALLDIR" else cleanStringForId(dir)
val fname = simpleName(uname)
val id = cleanStringForId(uname).takeRight(67) // Room for "fl_"
Expand Down Expand Up @@ -134,8 +136,9 @@ object WixHelper {
for(target <- targets) yield {
val name = simpleName(target)
val desc = "Edit configuration file: " + name
val cleanName = name.replaceAll("[\\.-\\\\//]+","_")
<Shortcut Id={id+"_SC"}
Name={name}
Name={cleanName}
Description={desc}
Target={"[INSTALLDIR]\\" + target.replaceAll("\\/", "\\\\")}
WorkingDirectory="INSTALLDIR"/>
Expand Down
2 changes: 1 addition & 1 deletion test-project/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import NativePackagerKeys._

packageArchetype.java_server
play.Project.playScalaSettings //packageArchetype.java_server

name := "dtest"

Expand Down
1 change: 1 addition & 0 deletions test-project/conf/application.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

3 changes: 3 additions & 0 deletions test-project/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resolvers += Resolver.typesafeRepo("releases")

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0")