Ignore:
Timestamp:
Sep 19, 2018 12:37:16 AM (2 years ago)
Author:
meeh <meeh@…>
Branches:
master
Children:
46ac0087, 9b958e4
Parents:
01a05f7
Message:

Bugfixes, improvements, more error handling and stability to the osx launcher.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • launchers/macosx/I2PLauncher/routermgmt/RouterProcessStatus.swift

    r01a05f7 r281c5f57  
    1010import AppKit
    1111
    12 class RouterProcessStatus : NSObject {
     12@objc class RouterProcessStatus : NSObject {
    1313 
    1414  /**
     
    1818   **/
    1919 
    20   func setRouterStatus(_ isRunning: Bool = false) {
     20  @objc func setRouterStatus(_ isRunning: Bool = false) {
    2121    RouterProcessStatus.isRouterRunning = isRunning
    2222  }
    2323 
    24   func setRouterRanByUs(_ ranByUs: Bool = false) {
     24  @objc func setRouterRanByUs(_ ranByUs: Bool = false) {
    2525    RouterProcessStatus.isRouterChildProcess = ranByUs
    2626  }
    2727 
    28   func getRouterIsRunning() -> Bool? {
    29     return RouterProcessStatus.isRouterRunning
     28  @objc func getRouterIsRunning() -> Bool {
     29    if (RouterProcessStatus.isRouterRunning == Optional.none) {
     30      return false;
     31    } else {
     32      let running: Bool = RouterProcessStatus.isRouterRunning
     33      return running
     34    }
     35  }
     36 
     37  @objc func getJavaHome() -> String {
     38    return RouterProcessStatus.knownJavaBinPath!
     39  }
     40 
     41  @objc func setJavaHome(_ home: String) {
     42    NSLog("Setting known java to %s", home)
     43    RouterProcessStatus.knownJavaBinPath = home
    3044  }
    3145}
     
    8498  }
    8599  static func descriptionOfLastError() -> String {
    86     return String(cString: UnsafePointer(strerror(errno))) ?? "Error: \(errno)"
     100    return String(cString: UnsafePointer(strerror(errno)))
    87101  }
    88102}
Note: See TracChangeset for help on using the changeset viewer.