forked from I2P_Developers/i2p.i2p
Mac OS X Launcher: more cleanup and some bugfixes.
This commit is contained in:
@@ -2,19 +2,13 @@
|
||||
|
||||
#include <dispatch/dispatch.h>
|
||||
#include <memory.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <Cocoa/Cocoa.h>
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include "include/subprocess.hpp"
|
||||
|
||||
using namespace subprocess;
|
||||
class JavaRunner;
|
||||
|
||||
typedef std::function<void(void)> fp_t;
|
||||
typedef std::function<void(JavaRunner *ptr)> fp_proc_t;
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
const std::vector<NSString*> defaultStartupFlags {
|
||||
@"-Xmx512M",
|
||||
@@ -32,31 +26,6 @@ const std::vector<std::string> defaultFlagsForExtractorJob {
|
||||
"-Djava.awt.headless=true"
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* class JavaRunner
|
||||
*
|
||||
**/
|
||||
class JavaRunner
|
||||
{
|
||||
public:
|
||||
// copy fn
|
||||
JavaRunner(std::string& javaBin, std::string& arguments, std::string& i2pBaseDir, const fp_proc_t& executingFn, const fp_t& cb);
|
||||
~JavaRunner() = default;
|
||||
|
||||
void requestRouterShutdown();
|
||||
|
||||
std::future<int> execute();
|
||||
std::shared_ptr<subprocess::Popen> javaProcess;
|
||||
std::string javaBinaryPath;
|
||||
std::string javaRouterArgs;
|
||||
std::string execLine;
|
||||
std::string _i2pBaseDir;
|
||||
private:
|
||||
const fp_proc_t& executingFn;
|
||||
const fp_t& exitCallbackFn;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user