source: launchers/macosx/src/main/scala/net/i2p/launchers/osx/SystemTrayManager.scala @ 5f81a8de

Last change on this file since 5f81a8de was 5f81a8de, checked in by meeh <meeh@…>, 2 years ago

Mac OS X Launcher - reborn - ALPHA!

TLDR;
Howto? ant osxLauncher
Privacy Notes? If you don't got SBT, a bash script will trigger

download of SBT for you with task osxLauncher.

Results? open ./launchers/output
"Binary" App Bundle name: I2P.app
Runtime base directory? ~/Library/I2P
Runtime config directory? untouched.

After talk on IRC with zzz, I rewrote the logic since we could
start with a simple deploy, for a faster alpha version ready :)

SBT will build a zip file from the content of pkg-temp, which
CompleteDeployment?.scala will again unzip in runtime. Right now
it's quite basic, but the plan is to add version detection, so
it's capable of upgrading a already deployed I2P base directory.

OSXDeployment.scala is renamed to PartialDeployment?.scala for usage
in the browser bundle launcher, since it's going to be a subset of
the files found in pkg-temp.

A Info.plist is added to the launchers/macosx which is added to the
application bundle under building. Note that this differ from the one
in Start i2p router.app that's been here for years now.

  • Property mode set to 100644
File size: 452 bytes
Line 
1package net.i2p.launchers.osx
2
3/**
4  *
5  *
6  * @author Meeh
7  * @since 0.9.35
8  */
9class SystemTrayManager {
10
11  object RouterState {
12    var isRunning: Boolean = false
13    var startupTime: Long = 0L
14  }
15
16  def isRunning = RouterState.isRunning
17
18  def setRunning(runs: Boolean): Unit = {
19    if (runs) setStartupTime()
20    RouterState.isRunning = runs
21  }
22
23  def setStartupTime() = {
24    RouterState.startupTime = System.currentTimeMillis / 1000
25  }
26
27}
Note: See TracBrowser for help on using the repository browser.