Split the Makefile up into a bunch of categorized sub-files.
This commit is contained in:
@ -17,15 +17,17 @@ import static net.i2p.update.UpdateType.*;
|
||||
|
||||
/**
|
||||
* Launches a router from %PROGRAMFILES%/I2P using configuration data in
|
||||
* %LOCALAPPDATA%/I2P.. Uses Java 9 APIs.
|
||||
|
||||
* %LOCALAPPDATA%/I2P.. Uses Java 9 APIs.
|
||||
*
|
||||
* Sets the following properties:
|
||||
* i2p.dir.base - this points to the (read-only) resources inside the bundle
|
||||
* i2p.dir.config this points to the (read-write) config directory in local appdata
|
||||
* i2p.dir.config this points to the (read-write) config directory in local
|
||||
* appdata
|
||||
* router.pid - the pid of the java process.
|
||||
*/
|
||||
public class WinLauncher {
|
||||
private static WindowsUpdatePostProcessor wupp = new WindowsUpdatePostProcessor();
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
File programs = wupp.selectProgramFile();
|
||||
if (!programs.exists())
|
||||
@ -46,7 +48,8 @@ public class WinLauncher {
|
||||
System.setProperty("i2p.dir.base", programs.getAbsolutePath());
|
||||
System.setProperty("i2p.dir.config", home.getAbsolutePath());
|
||||
System.setProperty("router.pid", String.valueOf(ProcessHandle.current().pid()));
|
||||
System.out.println("\t"+System.getProperty("i2p.dir.base") +"\n\t"+System.getProperty("i2p.dir.config")+"\n\t"+ System.getProperty("router.pid"));
|
||||
System.out.println("\t" + System.getProperty("i2p.dir.base") + "\n\t" + System.getProperty("i2p.dir.config")
|
||||
+ "\n\t" + System.getProperty("router.pid"));
|
||||
|
||||
wupp.i2pRouter = new Router(System.getProperties());
|
||||
System.out.println("Router is configured");
|
||||
@ -63,7 +66,7 @@ public class WinLauncher {
|
||||
|
||||
// first wait for the RouterContext to appear
|
||||
RouterContext ctx;
|
||||
while ((ctx = (RouterContext) wupp.i2pRouter.getContext().getCurrentContext()) == null) {
|
||||
while ((ctx = (RouterContext) RouterContext.getCurrentContext()) == null) {
|
||||
sleep(1000);
|
||||
}
|
||||
|
||||
@ -88,7 +91,7 @@ public class WinLauncher {
|
||||
}
|
||||
}
|
||||
|
||||
private static File selectHome() { //throws Exception {
|
||||
private static File selectHome() { // throws Exception {
|
||||
if (SystemVersion.isWindows()) {
|
||||
File home = new File(System.getProperty("user.home"));
|
||||
File appData = new File(home, "AppData");
|
||||
|
Reference in New Issue
Block a user