mirror of https://github.com/sbt/sbt.git
Windows config now works. Still an issue with sbt.bat not setting up paths/temp files correctly....
This commit is contained in:
parent
42fbfabc6a
commit
37f9d6bf21
|
|
@ -0,0 +1 @@
|
||||||
|
src/windows/sbtconfig.txt eol=crlf
|
||||||
|
|
@ -143,7 +143,10 @@ object Packaging {
|
||||||
|
|
||||||
// WINDOWS SPECIFIC
|
// WINDOWS SPECIFIC
|
||||||
name in Windows := "sbt",
|
name in Windows := "sbt",
|
||||||
lightOptions ++= Seq("-ext", "WixUIExtension", "-cultures:en-us"),
|
candleOptions ++= Seq("-ext", "WixUtilExtension"),
|
||||||
|
lightOptions ++= Seq("-ext", "WixUIExtension",
|
||||||
|
"-ext", "WixUtilExtension",
|
||||||
|
"-cultures:en-us"),
|
||||||
wixConfig <<= (sbtVersion, sourceDirectory in Windows) map makeWindowsXml,
|
wixConfig <<= (sbtVersion, sourceDirectory in Windows) map makeWindowsXml,
|
||||||
//wixFile <<= sourceDirectory in Windows map (_ / "sbt.xml"),
|
//wixFile <<= sourceDirectory in Windows map (_ / "sbt.xml"),
|
||||||
mappings in packageMsi in Windows <+= sbtLaunchJar map { f => f -> "sbt-launch.jar" },
|
mappings in packageMsi in Windows <+= sbtLaunchJar map { f => f -> "sbt-launch.jar" },
|
||||||
|
|
@ -151,6 +154,7 @@ object Packaging {
|
||||||
mappings in packageMsi in Windows <++= sourceDirectory in Windows map { d => Seq(
|
mappings in packageMsi in Windows <++= sourceDirectory in Windows map { d => Seq(
|
||||||
(d / "sbt.bat") -> "sbt.bat",
|
(d / "sbt.bat") -> "sbt.bat",
|
||||||
(d / "sbt") -> "sbt",
|
(d / "sbt") -> "sbt",
|
||||||
|
(d / "sbtconfig.txt") -> "sbtconfig.txt",
|
||||||
(d / "jansi-license.txt") -> "jansi-license.txt"
|
(d / "jansi-license.txt") -> "jansi-license.txt"
|
||||||
)},
|
)},
|
||||||
mappings in packageMsi in Windows <+= (compile in Compile, classDirectory in Compile) map { (c, d) =>
|
mappings in packageMsi in Windows <+= (compile in Compile, classDirectory in Compile) map { (c, d) =>
|
||||||
|
|
@ -196,7 +200,8 @@ object Packaging {
|
||||||
case Array(major) => Seq(major,"0","0","1") mkString "."
|
case Array(major) => Seq(major,"0","0","1") mkString "."
|
||||||
}
|
}
|
||||||
(
|
(
|
||||||
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi' xmlns:util='http://schemas.microsoft.com/wix/UtilExtension'>
|
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'
|
||||||
|
xmlns:util='http://schemas.microsoft.com/wix/UtilExtension'>
|
||||||
<Product Id='ce07be71-510d-414a-92d4-dff47631848a'
|
<Product Id='ce07be71-510d-414a-92d4-dff47631848a'
|
||||||
Name='Simple Build Tool'
|
Name='Simple Build Tool'
|
||||||
Language='1033'
|
Language='1033'
|
||||||
|
|
@ -212,8 +217,17 @@ object Packaging {
|
||||||
|
|
||||||
<Media Id='1' Cabinet='sbt.cab' EmbedCab='yes' />
|
<Media Id='1' Cabinet='sbt.cab' EmbedCab='yes' />
|
||||||
|
|
||||||
|
<Property Id='NOTEPADEXE'>
|
||||||
|
<DirectorySearch Id='NotePadContainer' Path='[SystemFolder]' Depth='0'>
|
||||||
|
<FileSearch Id='NotepadFile' Name='notepad.exe'/>
|
||||||
|
</DirectorySearch>
|
||||||
|
</Property>
|
||||||
|
|
||||||
<Directory Id='TARGETDIR' Name='SourceDir'>
|
<Directory Id='TARGETDIR' Name='SourceDir'>
|
||||||
<Directory Id='ProgramFilesFolder' Name='PFiles'>
|
<Directory Id="ProgramMenuFolder">
|
||||||
|
<Directory Id="ApplicationProgramsFolder" Name="sbt"/>
|
||||||
|
</Directory>
|
||||||
|
<Directory Id='ProgramFilesFolder' Name='PFiles'>
|
||||||
<Directory Id='INSTALLDIR' Name='sbt'>
|
<Directory Id='INSTALLDIR' Name='sbt'>
|
||||||
<Directory Id='classes_dir' Name='classes'>
|
<Directory Id='classes_dir' Name='classes'>
|
||||||
<Component Id='JansiLaunch' Guid='*'>
|
<Component Id='JansiLaunch' Guid='*'>
|
||||||
|
|
@ -222,12 +236,19 @@ object Packaging {
|
||||||
</Directory>
|
</Directory>
|
||||||
<Component Id='SbtLauncherScript' Guid='DE0A5B50-0792-40A9-AEE0-AB97E9F845F5'>
|
<Component Id='SbtLauncherScript' Guid='DE0A5B50-0792-40A9-AEE0-AB97E9F845F5'>
|
||||||
<File Id='sbt_bat' Name='sbt.bat' DiskId='1' Source='sbt.bat'>
|
<File Id='sbt_bat' Name='sbt.bat' DiskId='1' Source='sbt.bat'>
|
||||||
<!-- <util:PermissionEx User="Users" Domain="[LOCAL_MACHINE_NAME]" GenericRead="yes" Read="yes" GenericExecute="yes" ChangePermission="yes"/> -->
|
<util:PermissionEx User="Administrators" GenericAll="yes" />
|
||||||
|
<util:PermissionEx User="Users" GenericAll="yes" />
|
||||||
</File>
|
</File>
|
||||||
<File Id='sbt_sh' Name='sbt' DiskId='1' Source='sbt'>
|
<File Id='sbt_sh' Name='sbt' DiskId='1' Source='sbt'>
|
||||||
<!-- <util:PermissionEx User="Users" Domain="[LOCAL_MACHINE_NAME]" GenericRead="yes" Read="yes" GenericExecute="yes" ChangePermission="yes"/> -->
|
<!-- <util:PermissionEx User="Users" Domain="[LOCAL_MACHINE_NAME]" GenericRead="yes" Read="yes" GenericExecute="yes" ChangePermission="yes"/> -->
|
||||||
</File>
|
</File>
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component Id='SbtConfigFile' Guid='*'>
|
||||||
|
<File Id='sbtconfig_txt' Name='sbtconfig.txt' DiskId='1' Source='sbtconfig.txt'>
|
||||||
|
<util:PermissionEx User="Administrators" GenericAll="yes" />
|
||||||
|
<util:PermissionEx User="Users" GenericAll="yes" />
|
||||||
|
</File>
|
||||||
|
</Component>
|
||||||
<Component Id='JansiJar' Guid='3370A26B-E8AB-4143-B837-CE9A8573BF60'>
|
<Component Id='JansiJar' Guid='3370A26B-E8AB-4143-B837-CE9A8573BF60'>
|
||||||
<File Id='jansi_jar' Name='jansi.jar' DiskId='1' Source='jansi.jar' />
|
<File Id='jansi_jar' Name='jansi.jar' DiskId='1' Source='jansi.jar' />
|
||||||
<File Id='jansi_license' Name='jansi-license.txt' DiskId='1' Source='jansi-license.txt' />
|
<File Id='jansi_license' Name='jansi-license.txt' DiskId='1' Source='jansi-license.txt' />
|
||||||
|
|
@ -243,6 +264,18 @@ object Packaging {
|
||||||
</Directory>
|
</Directory>
|
||||||
</Directory>
|
</Directory>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
<!-- Step 2: Add the shortcut to your installer package -->
|
||||||
|
<DirectoryRef Id="ApplicationProgramsFolder">
|
||||||
|
<Component Id="ConfigShortcut" Guid="3370A26B-E8AB-4143-B837-CE9A8573BF61">
|
||||||
|
<Shortcut Id="ConfigStartMenuShortcut"
|
||||||
|
Name="sbt configuration"
|
||||||
|
Description="Modify sbt configuration settings"
|
||||||
|
Target="[INSTALLDIR]sbtconfig.txt"
|
||||||
|
WorkingDirectory="INSTALLDIR"/>
|
||||||
|
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
|
||||||
|
<RegistryValue Root="HKCU" Key="Software\Typesafe\sbt" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
|
||||||
|
</Component>
|
||||||
|
</DirectoryRef>
|
||||||
|
|
||||||
<Feature Id='Complete' Title='Simple Build Tool' Description='The windows installation of Simple Build Tool.'
|
<Feature Id='Complete' Title='Simple Build Tool' Description='The windows installation of Simple Build Tool.'
|
||||||
Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR'>
|
Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR'>
|
||||||
|
|
@ -251,10 +284,14 @@ object Packaging {
|
||||||
<ComponentRef Id='SbtLauncherJar' />
|
<ComponentRef Id='SbtLauncherJar' />
|
||||||
<ComponentRef Id='JansiLaunch' />
|
<ComponentRef Id='JansiLaunch' />
|
||||||
<ComponentRef Id='JansiJar' />
|
<ComponentRef Id='JansiJar' />
|
||||||
|
<ComponentRef Id='SbtConfigFile' />
|
||||||
</Feature>
|
</Feature>
|
||||||
<Feature Id='SbtLauncherPathF' Title='Add SBT to windows system PATH' Description='This will append SBT to your windows system path.' Level='1'>
|
<Feature Id='SbtLauncherPathF' Title='Add SBT to windows system PATH' Description='This will append SBT to your windows system path (Requires Restart).' Level='1'>
|
||||||
<ComponentRef Id='SbtLauncherPath'/>
|
<ComponentRef Id='SbtLauncherPath'/>
|
||||||
</Feature>
|
</Feature>
|
||||||
|
<Feature Id='SbtLauncherConfigF' Title='Add Menu Shortcuts' Description='This will add menu shortcuts for sbt configuration.' Level='1'>
|
||||||
|
<ComponentRef Id='ConfigShortcut'/>
|
||||||
|
</Feature>
|
||||||
</Feature>
|
</Feature>
|
||||||
<!--<Property Id="JAVAVERSION">
|
<!--<Property Id="JAVAVERSION">
|
||||||
<RegistrySearch Id="JavaVersion"
|
<RegistrySearch Id="JavaVersion"
|
||||||
|
|
|
||||||
|
|
@ -9,23 +9,20 @@
|
||||||
@REM ZOMG! We need delayed expansion to build up CFG_OPTS later
|
@REM ZOMG! We need delayed expansion to build up CFG_OPTS later
|
||||||
@setlocal enabledelayedexpansion
|
@setlocal enabledelayedexpansion
|
||||||
|
|
||||||
@echo off
|
@echo on
|
||||||
set SBT_HOME=%~dp0
|
set SBT_HOME=%~dp0
|
||||||
set ERROR_CODE=0
|
set ERROR_CODE=0
|
||||||
|
|
||||||
rem FIRST we load the config file of extra options.
|
rem FIRST we load the config file of extra options.
|
||||||
set FN=%SBT_HOME%/sbtconfig.txt
|
set FN=%SBT_HOME%sbtconfig.txt
|
||||||
set CFG_OPTS=
|
set CFG_OPTS=
|
||||||
FOR /F "tokens=* eol=#" %%i IN (%FN%) DO (
|
FOR /F "tokens=* eol=# usebackq delims=" %%i IN ("%FN%") DO (
|
||||||
set TMP=%%i
|
set TMP=%%i
|
||||||
rem ZOMG (Part #2) WE use !! here to delay the expansion of
|
rem ZOMG (Part #2) WE use !! here to delay the expansion of
|
||||||
rem CFG_OPTS, otherwise it remains "" for this loop.
|
rem CFG_OPTS, otherwise it remains "" for this loop.
|
||||||
set CFG_OPTS=!CFG_OPTS! !TMP!
|
set CFG_OPTS=!CFG_OPTS! !TMP!
|
||||||
)
|
)
|
||||||
|
|
||||||
echo CFG_OPTS = %CFG_OPTS%
|
|
||||||
exit /B 1
|
|
||||||
|
|
||||||
rem We use the value of the JAVACMD environment variable if defined
|
rem We use the value of the JAVACMD environment variable if defined
|
||||||
set _JAVACMD=%JAVACMD%
|
set _JAVACMD=%JAVACMD%
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,14 @@
|
||||||
# Set the java args to high
|
# Set the java args to high
|
||||||
|
|
||||||
-Xmx512M
|
-Xmx512M
|
||||||
|
|
||||||
-XX:MaxPermSize=256m
|
-XX:MaxPermSize=256m
|
||||||
|
|
||||||
-XX:ReservedCodeCacheSize=128m
|
-XX:ReservedCodeCacheSize=128m
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Set the extra SBT options
|
# Set the extra SBT options
|
||||||
|
|
||||||
-Dsbt.log.format=true
|
-Dsbt.log.format=true
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue