forked from I2P_Developers/i2p.i2p
DTG: Add classpath to jar, add early check for support when called by CLI
for ease of command-line testing
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
<property name="javac.version" value="1.8" />
|
<property name="javac.version" value="1.8" />
|
||||||
<property name="javac.release" value="8" />
|
<property name="javac.release" value="8" />
|
||||||
<property name="require.gettext" value="true" />
|
<property name="require.gettext" value="true" />
|
||||||
|
<property name="manifest.classpath.name" value="Class-Path" />
|
||||||
|
|
||||||
<condition property="no.bundle">
|
<condition property="no.bundle">
|
||||||
<isfalse value="${require.gettext}" />
|
<isfalse value="${require.gettext}" />
|
||||||
@@ -86,6 +87,7 @@
|
|||||||
<jar basedir="${build}" excludes="messages-src/**" destfile="${dist}/${jar}">
|
<jar basedir="${build}" excludes="messages-src/**" destfile="${dist}/${jar}">
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Main-Class" value="net.i2p.desktopgui.Main"/>
|
<attribute name="Main-Class" value="net.i2p.desktopgui.Main"/>
|
||||||
|
<attribute name="${manifest.classpath.name}" value="i2p.jar router.jar" />
|
||||||
<attribute name="Implementation-Version" value="${full.version}" />
|
<attribute name="Implementation-Version" value="${full.version}" />
|
||||||
<attribute name="Built-By" value="${build.built-by}" />
|
<attribute name="Built-By" value="${build.built-by}" />
|
||||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ package net.i2p.desktopgui;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.Image;
|
import java.awt.Image;
|
||||||
|
import java.awt.SystemTray;
|
||||||
import java.awt.Toolkit;
|
import java.awt.Toolkit;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
@@ -95,6 +96,11 @@ public class Main implements RouterApp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
// early check so we can bail out when started via CLI
|
||||||
|
if (!SystemTray.isSupported()) {
|
||||||
|
System.err.println("SystemTray not supported");
|
||||||
|
return;
|
||||||
|
}
|
||||||
Main main = new Main();
|
Main main = new Main();
|
||||||
main.beginStartup(args);
|
main.beginStartup(args);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user