source: launchers/macosx/README.md @ 5ed701d

Last change on this file since 5ed701d was 2233f7f, checked in by meeh <meeh@…>, 23 months ago

Mac OSX Launcher:

  • Update readme about event manager
  • RouterTask? can now detect a running router by scanning processes&arguments for i2p.jar
  • The logger will log to OSX's default: ~/Library/Logs?/I2P/[whatever].log
  • Property mode set to 100644
File size: 2.7 KB
Line 
1# The Mac OS X Launcher
2
3## The Event Manager
4
5This is some Swift code which makes the application use events to signal the different compoents of the application. This seems to be the cleanest way since we're doing java subprocesses and so on. This can also be named a publish-subscribe system as well. If you're familiar with Javascript it would be a handy skill.
6
7### Event Overview
8
9| Event name | Details sent as arguments | Description |
10| ------------- | ------------- | ------------- |
11| router_start | nothing | This event get triggered when the router starts |
12| router_exception | exception message | This will be triggered in case something within the functions that start the java (router) subprocess throws an exception |
13| java_found | the location | This will be triggered once the DetectJava swift class has found java |
14| router_must_upgrade | nothing | This will be triggered if no I2P is found, or if it's failing to get the version from the jar file |
15| extract_completed | nothing | This is triggered when the deployment process is done extracting I2P to it's directory |
16| router_can_start | nothing | This event will be triggered when I2P is found and a version number has been found, router won't start before this event |
17| router_stop | error if any | Triggered when the router subprocess exits |
18| router_pid | the pid number as string | Triggered when we know the pid of the router subprocess |
19| router_version | the version string | Triggered when we have successfully extracted current I2P version |
20| extract_errored | the error message | Triggered if the process didn't exit correctly |
21| router_already_running | an error message | Triggered if any processes containing i2p.jar in name/arguments already exists upon router launch |
22
23## Misc
24
25**Note** this project is WIP, cause Meeh has yet to merge in Obj-C/Swift code for GUI stuff in OSX.
26
27However, this is a thin wrapper launching both Mac OS X trayicon and the I2P router - and make them talk together.
28
29More code will be merged in, it's just a f* mess which Meeh needs to clean up and move into repo.
30
31## Howto build
32
33You can both build the project from the Xcode UI or you can build it from command line.
34
35An example build command:
36`xcodebuild -target I2PLauncher -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk`
37
38
39## Objective-C / Swift Links
40
41* https://nshipster.com/at-compiler-directives/
42* https://developer.apple.com/documentation/swift/cocoa_design_patterns/handling_cocoa_errors_in_swift
43* https://content.pivotal.io/blog/rails-to-ios-what-the-are-these-symbols-in-my-code
44* https://mackuba.eu/2008/10/05/learn-objective-c-in-30-minutes/
45* https://en.wikipedia.org/wiki/Objective-C
46* http://cocoadevcentral.com/d/learn_objectivec/
47
Note: See TracBrowser for help on using the repository browser.