@@ -65,16 +65,14 @@ object WixHelper {
65
65
} yield allParentDirs(file(name))
66
66
val filenames = filenamesPrep.flatten.map(_.toString.replaceAll(" \\\\ " ," /" )).filter(_ != " " )
67
67
// Now for directories...
68
- def parentDir (filename : String ) = {/* println("xxxxxxxxxxx: " + ( filename take (filename lastIndexOf '/'))); */ filename take (filename lastIndexOf '/' ) }
68
+ def parentDir (filename : String ) = { filename take (filename lastIndexOf '/' ) }
69
69
def simpleName (filename : String ) = {
70
70
val lastSlash = filename lastIndexOf '/'
71
71
filename drop (lastSlash + 1 )
72
72
}
73
73
val dirs = (filenames map parentDir).distinct;
74
- // TODO println("DDDDDDDDDDDDDDD:" + dirs.toString)
75
74
// Now we need our directory tree xml?
76
75
val dirToChildren = dirs groupBy parentDir;
77
- // TODO println("CCCCCCCCCCCCCCC:" + dirToChildren.toString)
78
76
def dirXml (currentDir : String ): scala.xml.Node = if (! currentDir.isEmpty) {
79
77
val children = dirToChildren.getOrElse(currentDir, Seq .empty)
80
78
<Directory Id ={cleanStringForId(currentDir)} Name ={simpleName(currentDir)}>
@@ -194,7 +192,7 @@ object WixHelper {
194
192
< MajorUpgrade
195
193
AllowDowngrades = " no"
196
194
Schedule = " afterInstallInitialize"
197
- DowngradeErrorMessage = " A later version of [ProductName] is already installed. Setup will no exit." />
195
+ DowngradeErrorMessage = " A later version of [ProductName] is already installed. Setup will now exit." />
198
196
<UIRef Id =" WixUI_FeatureTree" />
199
197
<UIRef Id =" WixUI_ErrorProgressText" />
200
198
<Property Id =" WIXUI_INSTALLDIR" Value =" INSTALLDIR" />
@@ -235,7 +233,7 @@ object WixHelper {
235
233
* 72) so we can safely add a few later.
236
234
*/
237
235
def cleanStringForId (n : String ) = {
238
- n.replaceAll(" [^0-9a-zA-Z_]" , " _" ).takeRight(50 ) + (math.abs(n.hashCode).toString + " xxxxxxxxxxxxxxxxxxx " ).substring(0 , 19 )
236
+ n.replaceAll(" [^0-9a-zA-Z_]" , " _" ).takeRight(60 ) + (math.abs(n.hashCode).toString + " xxxxxxxxx " ).substring(0 , 9 )
239
237
}
240
238
241
239
/** Cleans a file name for the Wix pre-processor. Every $ should be doubled. */
0 commit comments