Ignore:
Timestamp:
Sep 20, 2018 2:38:44 AM (2 years ago)
Author:
meeh <meeh@…>
Branches:
master
Children:
e8decff5
Parents:
eb81cada
Message:

Mac OSX Launcher: A lot of bugfixes, refactoring and cleanup.

File:
1 edited

Legend:

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

    reb81cada r3c0a8cf  
    1111@objc class DetectJava : NSObject {
    1212 
    13   var hasJRE : Bool = false
    14   var userWantJRE : Bool = false
    15   var userAcceptOracleEULA : Bool = false
     13  static var hasJRE : Bool = false
     14  static var userWantJRE : Bool = false
     15  static var userAcceptOracleEULA : Bool = false
    1616 
    1717 
     
    3030    //Called after the change
    3131    didSet{
    32       hasJRE = true
    33       print("DetectJava.javaHome did change from "+oldValue+" to "+self.javaHome)
     32      DetectJava.hasJRE = true
     33      self.javaHome = self.javaHome.replace(target: "\n", withString: "").replace(target: "Internet Plug-Ins", withString: "Internet\\ Plug-Ins")
     34      print("DetectJava.javaHome did change to "+self.javaHome)
    3435    }
    3536  };
     
    5152   **/
    5253  @objc func findIt() {
     54    if (DetectJava.hasJRE) {
     55      return
     56    }
    5357    print("Start with checking environment variable")
    5458    self.checkJavaEnvironmentVariable()
    5559    if !(self.javaHome.isEmpty) {
    5660      RouterProcessStatus.knownJavaBinPath = Optional.some(self.javaHome)
    57       hasJRE = true
     61      DetectJava.hasJRE = true
    5862      return
    5963    }
     
    6266    if !(self.javaHome.isEmpty) {
    6367      RouterProcessStatus.knownJavaBinPath = Optional.some(self.javaHome)
    64       hasJRE = true
     68      DetectJava.hasJRE = true
    6569      return
    6670    }
     
    6973    if !(self.javaHome.isEmpty) {
    7074      RouterProcessStatus.knownJavaBinPath = Optional.some(self.javaHome)
    71       hasJRE = true
     75      DetectJava.hasJRE = true
    7276      return
    7377    }
Note: See TracChangeset for help on using the changeset viewer.