Commit Graph

66 Commits

Author SHA1 Message Date
meeh 8e988c39e9 OSX Launcher: Updated build instructions in readme 2018-10-11 17:03:11 +00:00
meeh e3ab9f8e91 OSX Launcher: Swift GUI code updates, most related to the new launch method. 2018-10-11 17:02:42 +00:00
meeh 96d31995e1 OSX Launcher: cleanup and restructuring the main swift file 2018-10-11 17:01:21 +00:00
meeh 3988a8645d OSX Launcher: major updates to the glue between 'backend' and GUI. Implemented the use of the new LaunchAgent classes 2018-10-11 16:59:59 +00:00
meeh b25dec12d1 OSX Launcher: some changes to the Swift<->Objective-C bridge 2018-10-11 16:58:20 +00:00
meeh f57f8c6083 Some more xcode metadata files 2018-10-11 16:56:26 +00:00
meeh 2862be564e XCode metadata files update 2018-10-11 16:55:36 +00:00
meeh 45b4f426a8 OSX Launcher: Big rewrite of swift code where it now has the capability of creating services.
The router management has been much easier with this approach as it uses launchd to do the dirty work.
This code also uses java_home as a wrapper instead of locating the java binary by itself. This also contribute to the improvements.
2018-10-11 16:55:07 +00:00
meeh 51cbd8ef87 Dropping unused swift class 2018-10-11 16:49:51 +00:00
meeh 8b2c3de795 OSX Launcher: Cleaning up DetectJava.swift 2018-10-11 16:49:19 +00:00
meeh 969bc2dee3 OSX Launcher: String extensions update 2018-10-11 16:48:10 +00:00
meeh 7dbf568212 OSX Launcher: Refactor deployment code to own file, + code cleanups. 2018-10-11 11:55:05 +00:00
meeh 7e9d1939b1 OSX Launcher: Storyboard update 2018-10-11 11:51:55 +00:00
meeh 48877079ca OSX Launcher: Log all events for debugging 2018-10-11 11:50:00 +00:00
meeh d6fc0adb56 Mac OSX Launcher: Removed dmgconfig.py, added public domain to sharedqueue.h and updated xcode for the dmgconfig.py removal. 2018-09-30 13:42:32 +00:00
meeh 5041883d5a Mac OSX Launcher: Update readme regarding Oracle's downlad url. 2018-09-30 11:37:12 +00:00
meeh 5ed701dff3 Mac OSX Launcher: updates in logging, remove timestamp from Objc's MLog 2018-09-30 11:34:20 +00:00
meeh 410f9df4e4 Mac OSX Launcher: The launcher will now write the pid of the router to a file like the old wrapper did. 2018-09-30 11:29:21 +00:00
meeh b5497ef72e Mac OSX Launcher: Cancel stream that can cause high cpu load on router stop. 2018-09-30 11:02:28 +00:00
meeh 2233f7f47b 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
2018-09-30 09:40:43 +00:00
meeh 36b758f2c0 Mac OSX Launcher: Removing unused/change-in-plans files 2018-09-30 09:37:51 +00:00
meeh ae0d420f5f Mac OSX Launcher:
* Added script to check for latest java via xcode
  * Updated xcode project metadata files
  * Update dmg create script
  * Make xcode write version.h under build
  * Added template for version.h
2018-09-30 09:35:28 +00:00
meeh b40b987c0f Mac OSX Launcher:
* Fixed issue with >> and compilers in C++ in subprocess.hpp
  * Added queue for logger
  * Misc
2018-09-30 09:32:49 +00:00
meeh e8d371ed9b Mac OSX Launcher: C api of the logger to become available for Swift/Objective-C 2018-09-30 09:31:29 +00:00
meeh 5a0017a8fe Mac OSX Launcher: Adding a logger library I wrote a good while ago, refactored it to work with the launcher. 2018-09-30 09:30:39 +00:00
meeh 22a0f396e6 Mac OS X Launcher:
* Enabled Apple's "Hardened Runtime", however unsecure memory had to be allowed to spawn java etc.
  * Updated docs about Event Manager code
  * Make the launcher handle cases where extract is incomplete or invalid
  * Bugfixes as always
2018-09-26 20:42:58 +00:00
meeh 7a72049e28 Mac OS X Launcher:
* Bugfixes as always
  * Added Sparkle (native updater, https://sparkle-project.org/ )
  * The launcher will now extract and overwrite older versions if found
  * Rewrite of the java extraction part (to enable overwrite)
  * Move more functionality to use EventManager as it works quite well
  * Added check for updates menu item
2018-09-23 03:33:29 +00:00
meeh 3b38f5a161 Mac OS X Launcher:
* In general bugfixes
  * Introduced event manager for better control flow
  * Splitted RouterStatusView to own file
  * Added shell script to setup and produce dmg file
2018-09-22 22:13:40 +00:00
meeh 70fa2dae0a Mac OS X Launcher: Let version detection etc happen even a router is already started. 2018-09-20 03:27:37 +00:00
meeh 85ebb2f847 Mac OS X Launcher: Removed unused header file. 2018-09-20 03:22:41 +00:00
meeh e8decff5cd Mac OS X Launcher: more cleanup and some bugfixes. 2018-09-20 03:20:39 +00:00
meeh 3c0a8cf4ab Mac OSX Launcher: A lot of bugfixes, refactoring and cleanup. 2018-09-20 02:38:44 +00:00
meeh eb81cadac0 OSX Launcher: Removing script for old build system 2018-09-19 19:12:26 +00:00
meeh e046418f8f Cleaning up the code base, remove dead code and failed attempts. 2018-09-19 17:00:17 +00:00
meeh 9b958e4427 Moving replace function to strutil.hpp 2018-09-19 16:03:39 +00:00
meeh 281c5f579f Bugfixes, improvements, more error handling and stability to the osx launcher. 2018-09-19 00:37:16 +00:00
meeh f76874ac19 Adding XCode workspace & Xcode project, and some files missing from last commit.
Please note that Xcode project embedds the packing script (meaning it runs "ant" - zip files, and moves it to bundle)
2018-09-18 15:39:32 +00:00
meeh 7615b9236b 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
2018-09-18 15:36:38 +00:00
meeh 1bddf5527a Commiting XCode's image/resources library alone since it's massive with blobs. 2018-09-18 15:20:21 +00:00
meeh beede9505e Preparing for XCode project. Removing now obsolete files. 2018-09-18 15:19:23 +00:00
meeh 8bebda2e35 Remove duplicated file. 2018-08-18 15:47:35 +00:00
meeh f9fbc76dd0 Code changes:
* Port check to see if i2p is already running.
* All buttons in the menu should work now.
* Rewrote some C++ to Objective-C, which fits better with the integration.
* Misc cleanup.
* Made the launch of router repeatable.
2018-07-24 16:26:40 +00:00
meeh 2ee1a212c8 Added BufferedOutputStream to BaseExtractor for better performance. 2018-07-24 16:23:08 +00:00
meeh fe41dec699 Adding OSX graphics. 2018-07-24 16:21:53 +00:00
meeh a92993e05b Added some more header files, and fixed much of the build system. 2018-07-13 10:10:04 +00:00
meeh 8c78d4f83e A functional programming "library" (some headers with some magic love found in scala) 2018-07-13 10:09:08 +00:00
meeh c8490a3140 Starting to get stable and usable. Basically everything is based on callbacks. 2018-07-13 09:11:46 +00:00
meeh 6d0f80fa1e Fixed a load of issues related to my "sync" approach, and Mac OSX's "async" API. 2018-07-13 06:30:16 +00:00
meeh 21b3864dfd Moved some logic to C++, which will extract i2p if it's not already,
and then secondly fire up the router in a second java process when 
extraction is completed. Gonna use "optional" type in C++ to make
global variables a bit less painful to use.
2018-07-08 13:16:07 +00:00
meeh 27a0d4e51e Removing some Scala classes for the Mac OSX laucher,
since the C++ code replaces it's functionallity.
2018-07-08 13:12:51 +00:00