Play 2.2: WiX Installer and sbt-native-package-manager can't get it working.

656 views
Skip to first unread message

Christian Schmitt

unread,
Sep 24, 2013, 10:20:42 AM9/24/13
to play-fr...@googlegroups.com
Hello, I try to make a native msi package under windows for my play project.

Currently this is the error i get:


I really don't know how to fix it. I tried nearly everything. 

Christian Schmitt

unread,
Sep 24, 2013, 10:35:56 AM9/24/13
to play-fr...@googlegroups.com
import com.typesafe.sbt.packager.Keys._

name := "RSFlex"

version := "1.0.0"

organization := "de.envisia.rsflex"

resolvers ++= Seq(
  "Local Play Repository" at "file://C:/Users/Christian/Documents/play-2.2.0/repository/local"
)

libraryDependencies ++= Seq(
  jdbc,
  anorm,
  "de.envisia" %% "play2-quartz" % "1.2.0",
  "de.envisia" %% "play2-elasticsearch" % "0.7.1",
  "de.envisia" %% "securesocial" % "master-SNAPSHOT",
  "org.apache.pdfbox" % "pdfbox" % "1.8.2",
  "postgresql" % "postgresql" % "9.1-901.jdbc4"
)

play.Project.playScalaSettings ++ Seq(
  maintainer in Windows := "envisia GmbH",
  packageSummary in Windows := "RSFlex PDF Tool",
  packageDescription in Windows := "RSFlex PDF Tool",
  wixProductId := "238cdf4b-b6ea-4c9f-9b9d-c55cd2baa2c4",
  wixProductUpgradeId := "3378d6e9-183a-4e5f-9d87-695b59cb796c"
)

here are my configs

laguiz

unread,
Sep 24, 2013, 12:00:46 PM9/24/13
to play-fr...@googlegroups.com
I have the same error. I'm trying to test sbt plugin with a sample project (play/java `forms` sample).

Here is my build.sbt

import play.Project._
import NativePackagerKeys._


playJavaSettings

name := "forms"

version := "1.0"

packageSummary in Linux := "The name you want displayed in package summaries"

packageSummary in Windows := "The name you want displayed in Add/Remove Programs"

packageDescription := " A description of your project"

maintainer in Windows := "Company"

maintainer in Debian := "Your Name <yo...@email.com>"

wixProductId := "ce07be71-510d-414a-92d4-dff47631848a"

wixProductUpgradeId := "4552fb0e-e257-4dbd-9ecb-dba9dbacf424"




Here is the error running `play windows:package-bin` :


[info] [...] play\play-2.2.0\samples\java\forms\target\windows\forms.wix(1173) : error CNDL0027 : The Shortcut/@Name attribute's value, '\application.conf', is not a valid long name because it contains illegal characters.  Legal long names contain no more than 260 characters and must contain at least one non-period character.  Any character except for the follow may be used: \ ? | > < : / * ".
java.lang.RuntimeException: Unable to run WIX compilation to wixobj...
        at scala.sys.package$.error(package.scala:27)
        at com.typesafe.sbt.packager.windows.WindowsPlugin$$anonfun$windowsSettings$14.apply(WindowsPlugin.scala:81)
        at com.typesafe.sbt.packager.windows.WindowsPlugin$$anonfun$windowsSettings$14.apply(WindowsPlugin.scala:69)
        at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:35)
        at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:34)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
        at sbt.std.Transform$$anon$4.work(System.scala:64)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
        at sbt.Execute.work(Execute.scala:244)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[error] (windows:packageBin) Unable to run WIX compilation to wixobj...
[error] Total time: 1 s, completed Sep 24, 2013 5:40:27 PM



Generate some invalid names in wix file. In my case :


<Component Id="shortcut_3dd9158d_540a_4728_b759_11203f352fdc1702832501xxxxxxxxx" Guid="1f4b2895-5d8b-46da-9736-a27cf7c4eccb">
                <Shortcut Id="shortcut_3dd9158d_540a_4728_b759_11203f352fdc1702832501xxxxxxxxx_SC" Name="\application.conf" Description="Edit configuration file: \application.conf" Target="[INSTALLDIR]\conf\\application.conf" WorkingDirectory="INSTALLDIR"/>
              <RemoveFolder Id="ApplicationProgramsFolderRemove" Directory="ApplicationProgramsFolder" On="uninstall"/>
              <RegistryValue Root="HKCU" Key="Software\Company\forms" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
            </Component>




Could be a bug?

Christian Schmitt

unread,
Sep 24, 2013, 2:36:31 PM9/24/13
to play-fr...@googlegroups.com
it seems that there is a bug.

I tried the sbt-native-package manager with another Build.sbt and didn't used the play scala settings and everything worked. I just needed to write my own Packaging Handler.

Josh Suereth

unread,
Sep 24, 2013, 5:53:58 PM9/24/13
to play-fr...@googlegroups.com
Yes, this is most certainly a bug.   The mapping from universal -> windows packaging is still relatively new for the native packager (since 0.6), so we're trying to work out any kinks that have arisen.  In this case, I think one of our "clean for id" method calls is missing before we generate the WiX configuration.    I'll follow up on the native packager bug report with further findings:

laguiz

unread,
Sep 25, 2013, 11:18:49 AM9/25/13
to play-fr...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages