diff --git a/launchers/build.sbt b/launchers/build.sbt index 29b02e3e6..b609d2172 100644 --- a/launchers/build.sbt +++ b/launchers/build.sbt @@ -40,7 +40,7 @@ lazy val browserbundle = (project in file("browserbundle")) lazy val macosx = (project in file("macosx")) .settings( commonSettings, - name := "MacI2PLauncher", + name := "RouterPack.jar", mainClass in assembly := Some("net.i2p.launchers.osx.LauncherAppMain") ).dependsOn(common) diff --git a/launchers/macosx/Info.plist b/launchers/macosx/Info.plist deleted file mode 100644 index e5d92f9a4..000000000 --- a/launchers/macosx/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - I2P - NSHumanReadableCopyright - Public Domain - CFBundleGetInfoString - 0.9.35-experimental - CFBundleIconFile - i2p - CFBundleIdentifier - net.i2p - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - I2P - CFBundlePackageType - APPL - CFBundleShortVersionString - 0.0.1 - CFBundleSignature - I2P - CFBundleVersion - 0.0.1 - NSAppleScriptEnabled - - CGDisableCoalescedUpdates - - LSMinimumSystemVersion - 10.5 - CFBundleDisplayName - I2P - LSMinimumSystemVersionByArchitecture - - i386 - 10.5.0 - x86_64 - 10.6.0 - - LSUIElement - 1 - - diff --git a/launchers/macosx/build.sbt b/launchers/macosx/build.sbt index b9199ae52..1b1cb5968 100644 --- a/launchers/macosx/build.sbt +++ b/launchers/macosx/build.sbt @@ -1,7 +1,7 @@ import java.io.{File, FileNotFoundException, FileOutputStream} import java.util.zip._ -lazy val i2pVersion = "0.9.34" +lazy val i2pVersion = "0.9.35" lazy val cleanAllTask = taskKey[Unit]("Clean up and remove the OSX bundle") lazy val buildAppBundleTask = taskKey[Unit](s"Build an Mac OS X bundle for I2P ${i2pVersion}.") @@ -24,7 +24,7 @@ lazy val i2pBuildDir = new File("./../pkg-temp") lazy val warsForCopy = new File(i2pBuildDir, "webapps").list.filter { f => f.endsWith(".war") } lazy val jarsForCopy = new File(i2pBuildDir, "lib").list.filter { f => f.endsWith(".jar") } - +// TODO: Meeh: To be removed - logic is moved to obj-cpp def defaultOSXLauncherShellScript(javaOpts: Seq[String] = Seq.empty): Seq[String] = { val javaOptsString = javaOpts.map(_ + " ").mkString Seq( @@ -138,13 +138,6 @@ buildAppBundleTask := { val launcherBinary = Some(assembly.value) launcherBinary.map { l => IO.copyFile( new File(l.toString), new File(paths.get("execBundlePath").get, "I2P") ) } - - val plistFile = new File("./macosx/Info.plist") - if (plistFile.exists()) { - println(s"Adding Info.plist...") - IO.copyFile(plistFile, new File(bundleBuildPath, "I2P.app/Contents/Info.plist")) - } - val zipFilePath = Some(buildDeployZipTask.value) val zipFileOrigin = new File(zipFilePath.get) diff --git a/launchers/macosx/src/main/scala/net/i2p/launchers/osx/LauncherAppMain.scala b/launchers/macosx/src/main/scala/net/i2p/launchers/osx/LauncherAppMain.scala index a0bf8c438..d22a87e64 100644 --- a/launchers/macosx/src/main/scala/net/i2p/launchers/osx/LauncherAppMain.scala +++ b/launchers/macosx/src/main/scala/net/i2p/launchers/osx/LauncherAppMain.scala @@ -87,8 +87,6 @@ object LauncherAppMain extends App { } } - //Await.result(routerProcess, 5000 millis) - } finally { System.out.println("Exit?") } diff --git a/launchers/macosx/src/main/scala/net/i2p/launchers/osx/MacOSXRouterLauncher.scala b/launchers/macosx/src/main/scala/net/i2p/launchers/osx/MacOSXRouterLauncher.scala index 1bab7b1dc..28180e1d8 100644 --- a/launchers/macosx/src/main/scala/net/i2p/launchers/osx/MacOSXRouterLauncher.scala +++ b/launchers/macosx/src/main/scala/net/i2p/launchers/osx/MacOSXRouterLauncher.scala @@ -17,50 +17,6 @@ import scala.concurrent.ExecutionContext.Implicits.global */ object MacOSXRouterLauncher extends RouterLauncher { - def pid(p: Process): Long = { - val procField = p.getClass.getDeclaredField("p") - procField.synchronized { - procField.setAccessible(true) - val proc = procField.get(p) - try { - proc match { - case unixProc - if unixProc.getClass.getName == "java.lang.UNIXProcess" => { - val pidField = unixProc.getClass.getDeclaredField("pid") - pidField.synchronized { - pidField.setAccessible(true) - try { - pidField.getLong(unixProc) - } finally { - pidField.setAccessible(false) - } - } - } - case procImpl:java.lang.Process => { - val f: Field = p.getClass().getDeclaredField("p") - val f2: Field = f.get(p).getClass.getDeclaredField("pid") - try { - f.setAccessible(true) - f2.setAccessible(true) - val pid = f2.getLong(p) - pid - } finally { - f2.setAccessible(false) - f.setAccessible(false) - } - } - // If someone wants to add support for Windows processes, - // this would be the right place to do it: - case _ => throw new RuntimeException( - "Cannot get PID of a " + proc.getClass.getName) - } - } finally { - procField.setAccessible(false) - } - } - } - - // ??? equals "throw not implemented" IIRC - it compiles at least :) override def runRouter(args: Array[String]): Future[Process] = ???