forked from I2P_Developers/i2p.i2p
Build:
- Add DTG to updater - Fix and bundle DTG license info - Remove jstl.jar and standard.jar from updater, last changed in 0.9 - Fix bundling of Tomcat license info Console: - Change to new DTG constructor - Don't attempt to start systray or DTG when running as a service
This commit is contained in:
@ -173,6 +173,10 @@ Applications:
|
||||
Copyright (C) sponge
|
||||
See licenses/COPYING-BOB.txt
|
||||
|
||||
Desktopgui
|
||||
Copyright (c) Mathias De Maré
|
||||
See licenses/LICENSE-DesktopGUI.txt
|
||||
|
||||
I2PSnark:
|
||||
Copyright (C) 2003 Mark J. Wielaard
|
||||
GPLv2 (or any later version)
|
||||
@ -291,10 +295,6 @@ distributions. See the source package for the additional license information.
|
||||
Copyright (C) sponge
|
||||
DWTFYWTPL
|
||||
|
||||
Desktopgui
|
||||
Copyright (c) Mathias De Maré
|
||||
See apps/desktopgui/LICENSE
|
||||
|
||||
SAM C Library:
|
||||
Copyright (c) 2004, Matthew P. Cashdollar <mpc@innographx.com>
|
||||
See apps/sam/c/doc/license.txt
|
||||
|
@ -39,6 +39,7 @@ import net.i2p.util.PortMapper;
|
||||
import net.i2p.util.SecureDirectory;
|
||||
import net.i2p.util.I2PSSLSocketFactory;
|
||||
import net.i2p.util.SystemVersion;
|
||||
|
||||
import org.eclipse.jetty.security.HashLoginService;
|
||||
import org.eclipse.jetty.security.ConstraintMapping;
|
||||
import org.eclipse.jetty.security.ConstraintSecurityHandler;
|
||||
@ -69,6 +70,8 @@ import org.eclipse.jetty.util.thread.ExecutorThreadPool;
|
||||
import org.eclipse.jetty.util.thread.QueuedThreadPool;
|
||||
import org.eclipse.jetty.util.thread.ThreadPool;
|
||||
|
||||
import org.tanukisoftware.wrapper.WrapperManager;
|
||||
|
||||
/**
|
||||
* Start the router console.
|
||||
*/
|
||||
@ -128,6 +131,7 @@ public class RouterConsoleRunner implements RouterApp {
|
||||
private static final int MAX_THREADS = 24;
|
||||
private static final int MAX_IDLE_TIME = 90*1000;
|
||||
private static final String THREAD_NAME = "RouterConsole Jetty";
|
||||
private final static String DAEMON_USER = "i2psvc";
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
@ -213,7 +217,7 @@ public class RouterConsoleRunner implements RouterApp {
|
||||
public synchronized void startup() {
|
||||
changeState(STARTING);
|
||||
checkJavaVersion();
|
||||
startTrayApp(_context);
|
||||
startTrayApp();
|
||||
startConsole();
|
||||
}
|
||||
|
||||
@ -265,18 +269,23 @@ public class RouterConsoleRunner implements RouterApp {
|
||||
return _server;
|
||||
}
|
||||
|
||||
private static void startTrayApp(I2PAppContext ctx) {
|
||||
private void startTrayApp() {
|
||||
// if no permissions, don't even try
|
||||
// isLaunchedAsService() always returns true on Linux
|
||||
if (DAEMON_USER.equals(System.getProperty("user.name")) ||
|
||||
(SystemVersion.isWindows() && _context.hasWrapper() && WrapperManager.isLaunchedAsService())) {
|
||||
// required true for jrobin to work
|
||||
System.setProperty("java.awt.headless", "true");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
//TODO: move away from routerconsole into a separate application.
|
||||
//ApplicationManager?
|
||||
boolean recentJava = SystemVersion.isJava6();
|
||||
// default false for now
|
||||
boolean desktopguiEnabled = ctx.getBooleanProperty("desktopgui.enabled");
|
||||
if (recentJava && desktopguiEnabled) {
|
||||
boolean desktopguiEnabled = _context.getBooleanProperty("desktopgui.enabled");
|
||||
if (desktopguiEnabled) {
|
||||
//Check if we are in a headless environment, set properties accordingly
|
||||
System.setProperty("java.awt.headless", Boolean.toString(GraphicsEnvironment.isHeadless()));
|
||||
String[] args = new String[0];
|
||||
net.i2p.desktopgui.Main.beginStartup(args);
|
||||
net.i2p.desktopgui.Main dtg = new net.i2p.desktopgui.Main(_context, _mgr, null);
|
||||
dtg.startup();
|
||||
} else {
|
||||
// required true for jrobin to work
|
||||
System.setProperty("java.awt.headless", "true");
|
||||
|
10
build.xml
10
build.xml
@ -1257,9 +1257,10 @@
|
||||
<fileset dir="licenses/" />
|
||||
</copy>
|
||||
<copy file="apps/imagegen/identicon/README.md" tofile="pkg-temp/licenses/LICENSE-Identicon.txt" />
|
||||
<copy file="apps/desktopgui/LICENSE" tofile="pkg-temp/licenses/LICENSE-DesktopGUI.txt" />
|
||||
</target>
|
||||
|
||||
<target name="preplicenses-unlesspkg" unless="${with-libjetty8-java}" >
|
||||
<target name="preplicenses-unlesspkg" unless="${with-libtomcat7-java}" >
|
||||
<copy file="apps/jetty/apache-tomcat-deployer/NOTICE" tofile="pkg-temp/licenses/NOTICE-Tomcat.txt" />
|
||||
</target>
|
||||
|
||||
@ -1476,15 +1477,16 @@
|
||||
<copy file="build/i2psnark.jar" todir="pkg-temp/lib" />
|
||||
<!-- include systray changes in 0.7.5 -->
|
||||
<copy file="build/systray.jar" todir="pkg-temp/lib/" />
|
||||
<!-- removed from updater in 0.9
|
||||
<!-- removed from updater in 0.9, added back in 0.9.26 -->
|
||||
<copy file="build/desktopgui.jar" todir="pkg-temp/lib/" />
|
||||
-->
|
||||
<copy file="build/susimail.war" todir="pkg-temp/webapps/" />
|
||||
<copy file="build/susidns.war" todir="pkg-temp/webapps/" />
|
||||
<copy file="build/imagegen.war" todir="pkg-temp/webapps/" />
|
||||
<!-- as of 0.7.12; someday, we can remove these from the updater -->
|
||||
<!-- as of 0.7.12; last changed in 0.9; removed from update in 0.9.26 -->
|
||||
<!--
|
||||
<copy file="apps/susidns/src/lib/jstl.jar" todir="pkg-temp/lib/" />
|
||||
<copy file="apps/susidns/src/lib/standard.jar" todir="pkg-temp/lib/" />
|
||||
-->
|
||||
<copy file="build/i2psnark.war" todir="pkg-temp/webapps/" />
|
||||
<copy file="history.txt" todir="pkg-temp/" />
|
||||
<!-- the following overwrites history.txt on unix to shrink the update file -->
|
||||
|
Reference in New Issue
Block a user