- Timestamp:
- Apr 24, 2018 4:18:21 AM (3 years ago)
- Branches:
- master
- Children:
- 832e55d
- Parents:
- 9307b27
- Location:
- launchers
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
launchers/build.sbt
r9307b27 r8adf55a 1 import sbt.Keys._ 1 import sbt._ 2 import Keys._ 3 2 4 3 5 resolvers ++= Seq( … … 12 14 organization := "net.i2p", 13 15 scalaVersion := "2.11.11", // We have to use Scala 11 as long as we're going to support JRE 1.7 14 version := "0.1.0-SNAPSHOT" 16 version := "0.1.0-SNAPSHOT", 17 maintainer := "Meeh <mikalv@mikalv.net>", 18 packageSummary := "The Invisible Internet Project", 19 packageDescription := "Blabla" 15 20 ) 16 21 … … 27 32 .settings( 28 33 commonSettings, 29 name := " RouterLaunchApp",34 name := "MacI2PLauncher", 30 35 assemblyJarName in assembly := s"${name.value}-${version.value}.jar", 31 36 mainClass in assembly := Some("net.i2p.MacOSXRouterLauncherApp") … … 37 42 38 43 39 40 41 44 fork := true 42 45 -
launchers/macosx/build.sbt
r9307b27 r8adf55a 1 1 import sbtassembly.AssemblyPlugin.defaultShellScript 2 import sbt._ 3 import Keys._ 4 import sbt.io.IO 5 import java.io.File 2 6 3 7 lazy val i2pVersion = "0.9.34" 8 9 lazy val buildAppBundleTask = taskKey[Unit](s"Build an Mac OS X bundle for I2P ${i2pVersion}.") 10 lazy val bundleBuildPath = file("./output") 11 12 13 // Pointing the resources directory to the "installer" directory 14 resourceDirectory in Compile := baseDirectory.value / ".." / ".." / "installer" / "resources" 15 lazy val resDir = new File("./../installer/resources") 16 lazy val i2pBuildDir = new File("./../build") 17 lazy val warsForCopy = i2pBuildDir.list.filter { f => f.endsWith(".war") } 18 lazy val jarsForCopy = i2pBuildDir.list.filter { f => f.endsWith(".jar") } 19 20 buildAppBundleTask := { 21 println(s"Building Mac OS X bundle for I2P version ${i2pVersion}.") 22 bundleBuildPath.mkdir() 23 val paths = Map[String,File]( 24 "execBundlePath" -> new File(bundleBuildPath, "I2P.app/Contents/MacOS"), 25 "resBundlePath" -> new File(bundleBuildPath, "I2P.app/Contents/Resources"), 26 "i2pbaseBunldePath" -> new File(bundleBuildPath, "I2P.app/Contents/Resources/i2pbase"), 27 "i2pJarsBunldePath" -> new File(bundleBuildPath, "I2P.app/Contents/Resources/i2pbase/lib"), 28 "webappsBunldePath" -> new File(bundleBuildPath, "I2P.app/Contents/Resources/i2pbase/webapps") 29 ) 30 paths.map { case (s,p) => p.mkdirs() } 31 val dirsToCopy = List("certificates","locale","man") 32 dirsToCopy.map { d => IO.copyDirectory( new File(resDir, d), new File(paths.get("i2pbaseBunldePath").get, d) ) } 33 warsForCopy.map { w => IO.copyFile( new File(i2pBuildDir, w), new File(paths.get("webappsBunldePath").get, w) ) } 34 warsForCopy.map { j => IO.copyFile( new File(i2pBuildDir, j), new File(paths.get("i2pJarsBunldePath").get, j) ) } 35 } 4 36 5 37 // Unmanaged classpath will be available at compile time -
launchers/macosx/src/main/scala/net/i2p/MacOSXRouterLauncherApp.scala
r9307b27 r8adf55a 2 2 3 3 import net.i2p.router.Router 4 import java.io.File 4 5 5 6 /** … … 18 19 * 19 20 * 21 * The i2p base directory in the build should be in a relative path from 22 * the launcher, which would be ../Resources/i2pbase - this directory would 23 * need to be copied out to a "writable" area, since we're in a signed "immutable" 24 * bundle. First this launcher will check if i2pbase is already deployed to a 25 * writable area, if it's not, it deploys, if the i2pbase directory has an older 26 * version than the one in the bundle, it upgrades. It does nothing if versions 27 * matches. 28 * 29 * 20 30 * @author Meeh 21 31 * @version 0.0.1 … … 24 34 object MacOSXRouterLauncherApp extends App { 25 35 36 val i2pBaseBundleDir = new File(new File("."), "../Resources/i2pbase") 26 37 27 38 Router.main(args) -
launchers/project/build.properties
r9307b27 r8adf55a 1 sbt.version=1.1. 11 sbt.version=1.1.2 -
launchers/project/plugins.sbt
r9307b27 r8adf55a 2 2 addSbtPlugin("com.oradian.sbt" % "sbt-sh" % "0.3.0") 3 3 addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") 4 4 addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.4")
Note: See TracChangeset
for help on using the changeset viewer.