Last change
on this file since 7615b92 was
7615b92,
checked in by meeh <meeh@…>, 2 years ago
|
Adding all new code, removed a lot obsolete code and fixed import paths etc.
Mac OS X launcher:
- UI built on Swift
- Why?
- Apple seems to on purpose make it harder to get into Objective-C these days
- Swift is compiled to native code, but has easiness of Javascript in programming
- Perfect for the OS X UI, many guides & tutorials as well
- "Backend" in Objective-C++ / C++14
- Why?
- Originally written in Objective-C / C++14 with C++17 backports
- Only for backend because of the time the development takes
*
Short summary of features:
- Java
- It can detect java from:
- JAVA_HOME environment variable
- "Internet Plug-Ins" Apple stuff
- By the /usr/libexec/java_home binary helper
- It can unpack a new version of I2P
- Unpacks to ~/Library/I2P
- Can check currently unpacked version in ~/Library/I2P via i2p.jar's "net.i2p.CoreVersion?"
- User Interface (a popover, see https://youtu.be/k8L3lQ5rUq0 for example of this concept)
- Router control tab view
- It can start the router
- It can stop the router
- It can detect already running router, then avoid fireing up one
- It can show basic information about the router state & version
- Log view tab (not yet done)
- While left-click triggers popover, right-click draws a minimal context menu
|
-
Property mode set to
100644
|
File size:
655 bytes
|
Line | |
---|
1 | // |
---|
2 | // I2PSubprocess.swift |
---|
3 | // I2PLauncher |
---|
4 | // |
---|
5 | // Created by Mikal Villa on 18/09/2018. |
---|
6 | // Copyright © 2018 The I2P Project. All rights reserved. |
---|
7 | // |
---|
8 | |
---|
9 | import Foundation |
---|
10 | |
---|
11 | protocol I2PSubprocess { |
---|
12 | var subprocessPath: String? { get set } |
---|
13 | var arguments: String? { get set } |
---|
14 | var timeWhenStarted: Date? { get set } |
---|
15 | |
---|
16 | func findJava(); |
---|
17 | |
---|
18 | } |
---|
19 | |
---|
20 | extension I2PSubprocess { |
---|
21 | func toString() -> String { |
---|
22 | let jp = self.subprocessPath! |
---|
23 | let args = self.arguments! |
---|
24 | |
---|
25 | var presentation:String = "I2PSubprocess[ cmd=" |
---|
26 | presentation += jp |
---|
27 | presentation += " , args=" |
---|
28 | presentation += args |
---|
29 | presentation += "]" |
---|
30 | return presentation |
---|
31 | } |
---|
32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.