I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 84d86834 authored by mathiasdm's avatar mathiasdm
Browse files

Added desktopgui to installation, updater and startup.

parent 53714810
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,31 @@ HIGH PRIORITY: ...@@ -15,7 +15,31 @@ HIGH PRIORITY:
* One possibility: * One possibility:
Adding some kind of 'ApplicationManager' that allows starting applications. Adding some kind of 'ApplicationManager' that allows starting applications.
Extra remark: ApplicationManager should also allow stopping certain applications from launching. Extra remark: ApplicationManager should also allow stopping certain applications from launching.
Suggestion:
* ApplicationManager reads/writes clients.config
* ApplicationManager itself: independent from clients.config?
* Upon reboot, ApplicationManager could add a new application to clients.config _if_ the 'application.manager.version' is not there, or is smaller than the current version.
* ApplicationManager can be the clients.config backend for routerconsole, so routerconsole is not the dependency.
* API:
- addConfig(args, name, ...)
- removeConfig(int)
- removeConfig(ConfigFilter)
ConfigFilter() {
boolean filterArgs(String args);
boolean filterMain(String main);
...
}
- editConfig(args, name, ..., ConfigFilter)
- editConfig(args, name, ..., int)
- editConfigArgs(args, ConfigFilter)
- editConfigArgs(args, int)
- ...
* For now: added in the routerconsole startup (like the old SysTray. - DONE
Possible migration path: startup ApplicationManager in routerconsole the first time.
- Check bug: restart is happening instead of shutdown!
- Check build order (for example: first desktopgui, only later routerconsole)
- Fix tabs versus spaces ;-) - Fix tabs versus spaces ;-)
- Add check for Java version 6 in RouterConsoleRunner!
UNKNOWN: UNKNOWN:
- API to allow applications to add themselves to the menu? - API to allow applications to add themselves to the menu?
* registerApplication(); -- should return a positive number on success, -1 on failure * registerApplication(); -- should return a positive number on success, -1 on failure
......
#: src/net/i2p/desktopgui/TrayManager.java:73 #: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Launch I2P Browser"
msgstr "Start I2P Browser"
#: src/net/i2p/desktopgui/TrayManager.java:99
msgid "Browser not found"
msgstr "Browser niet gevonden"
#: src/net/i2p/desktopgui/TrayManager.java:100
msgid "The default browser for your system was not found."
msgstr "De standaard webbrowser voor je systeem werd niet gevonden."
#: src/net/i2p/desktopgui/TrayManager.java:111
msgid "Start I2P" msgid "Start I2P"
msgstr "I2P starten" msgstr "I2P starten"
#: src/net/i2p/desktopgui/TrayManager.java:126 #: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!" msgid "I2P is starting!"
msgstr "I2P is aan het starten!" msgstr "I2P is aan het starten!"
#: src/net/i2p/desktopgui/TrayManager.java:126 #: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting" msgid "Starting"
msgstr "Bezig met starten" msgstr "Bezig met starten"
#: src/net/i2p/desktopgui/TrayManager.java:140 #: src/net/i2p/desktopgui/InternalTrayManager.java:25
msgid "Launch I2P Browser"
msgstr "Start I2P Browser"
#: src/net/i2p/desktopgui/InternalTrayManager.java:49
msgid "Restart I2P" msgid "Restart I2P"
msgstr "I2P herstarten" msgstr "I2P herstarten"
#: src/net/i2p/desktopgui/TrayManager.java:161 #: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Stop I2P" msgid "Stop I2P"
msgstr "I2P stoppen" msgstr "I2P stoppen"
#~ msgid "Browser not found"
#~ msgstr "Browser niet gevonden"
#~ msgid "The default browser for your system was not found."
#~ msgstr "De standaard webbrowser voor je systeem werd niet gevonden."
...@@ -28,7 +28,7 @@ public class Main { ...@@ -28,7 +28,7 @@ public class Main {
* Start the tray icon code (loads tray icon in the tray area). * Start the tray icon code (loads tray icon in the tray area).
* @throws Exception * @throws Exception
*/ */
private void startUp() throws Exception { public void startUp() throws Exception {
trayManager = TrayManager.getInstance(); trayManager = TrayManager.getInstance();
trayManager.startManager(); trayManager.startManager();
...@@ -45,11 +45,15 @@ public class Main { ...@@ -45,11 +45,15 @@ public class Main {
}); });
} }
} }
public static void main(String[] args) {
beginStartup(args);
}
/** /**
* Main method launching the application. * Main method launching the application.
*/ */
public static void main(String[] args) { public static void beginStartup(String[] args) {
System.setProperty("java.awt.headless", "false"); System.setProperty("java.awt.headless", "false");
try { try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<pathelement location="../../jetty/jettylib/javax.servlet.jar" /> <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
<pathelement location="../../systray/java/build/obj" /> <pathelement location="../../systray/java/build/obj" />
<pathelement location="../../systray/java/lib/systray4j.jar" /> <pathelement location="../../systray/java/lib/systray4j.jar" />
<pathelement location="../../desktopgui/build" />
<pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> <!-- we dont care if we're not on win32 --> <pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> <!-- we dont care if we're not on win32 -->
<pathelement location="../../jrobin/jrobin-1.4.0.jar" /> <pathelement location="../../jrobin/jrobin-1.4.0.jar" />
</classpath> </classpath>
...@@ -54,6 +55,7 @@ ...@@ -54,6 +55,7 @@
<pathelement location="../../jetty/jettylib/javax.servlet.jar" /> <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
<pathelement location="../../systray/java/build/systray.jar" /> <pathelement location="../../systray/java/build/systray.jar" />
<pathelement location="../../systray/java/lib/systray4j.jar" /> <pathelement location="../../systray/java/lib/systray4j.jar" />
<pathelement location="../../desktopgui/dist/desktopgui.jar" />
<pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> <!-- we dont care if we're not on win32 --> <pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> <!-- we dont care if we're not on win32 -->
<pathelement location="../../jrobin/jrobin-1.4.0.jar" /> <pathelement location="../../jrobin/jrobin-1.4.0.jar" />
</classpath> </classpath>
...@@ -161,6 +163,7 @@ ...@@ -161,6 +163,7 @@
<pathelement location="../../jetty/jettylib/ant.jar" /> <pathelement location="../../jetty/jettylib/ant.jar" />
<pathelement location="../../systray/java/build/obj" /> <pathelement location="../../systray/java/build/obj" />
<pathelement location="../../systray/java/lib/systray4j.jar" /> <pathelement location="../../systray/java/lib/systray4j.jar" />
<pathelement location="../../desktopgui/dist/desktopgui.jar" />
<pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> <pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" />
<pathelement location="build/routerconsole.jar" /> <pathelement location="build/routerconsole.jar" />
<pathelement location="build/" /> <pathelement location="build/" />
...@@ -191,6 +194,7 @@ ...@@ -191,6 +194,7 @@
<pathelement location="../../jetty/jettylib/org.mortbay.jetty.jar" /> <pathelement location="../../jetty/jettylib/org.mortbay.jetty.jar" />
<pathelement location="../../systray/java/build/obj" /> <pathelement location="../../systray/java/build/obj" />
<pathelement location="../../systray/java/lib/systray4j.jar" /> <pathelement location="../../systray/java/lib/systray4j.jar" />
<pathelement location="../../desktopgui/dist/desktopgui.jar" />
<pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> <pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" />
<pathelement location="build/routerconsole.jar" /> <pathelement location="build/routerconsole.jar" />
<pathelement location="build" /> <pathelement location="build" />
...@@ -220,7 +224,7 @@ ...@@ -220,7 +224,7 @@
<mkdir dir="./build" /> <mkdir dir="./build" />
<mkdir dir="./build/javadoc" /> <mkdir dir="./build/javadoc" />
<javadoc <javadoc
sourcepath="./src:../../../core/java/src:../../../router/java/src:../../systray/java/src" destdir="./build/javadoc" sourcepath="./src:../../../core/java/src:../../../router/java/src:../../systray/java/src:../../desktopgui/src" destdir="./build/javadoc"
packagenames="*" packagenames="*"
use="true" use="true"
splitindex="true" splitindex="true"
......
...@@ -88,30 +88,6 @@ public class ConfigServiceHandler extends FormHandler { ...@@ -88,30 +88,6 @@ public class ConfigServiceHandler extends FormHandler {
addFormError("Warning: unable to contact the service manager - " + t.getMessage()); addFormError("Warning: unable to contact the service manager - " + t.getMessage());
} }
addFormNotice("Threads dumped to wrapper.log"); addFormNotice("Threads dumped to wrapper.log");
} else if (_("Show systray icon").equals(_action)) {
try {
SysTray tray = SysTray.getInstance();
if (tray != null) {
tray.show();
addFormNotice(_("System tray icon enabled."));
} else {
addFormNotice(_("System tray icon feature not supported on this platform. Sorry!"));
}
} catch (Throwable t) {
addFormError(_("Warning: unable to contact the systray manager") + " - " + t.getMessage());
}
} else if (_("Hide systray icon").equals(_action)) {
try {
SysTray tray = SysTray.getInstance();
if (tray != null) {
tray.hide();
addFormNotice(_("System tray icon disabled."));
} else {
addFormNotice(_("System tray icon feature not supported on this platform. Sorry!"));
}
} catch (Throwable t) {
addFormError(_("Warning: unable to contact the systray manager") + " - " + t.getMessage());
}
} else if (_("View console on startup").equals(_action)) { } else if (_("View console on startup").equals(_action)) {
browseOnStartup(true); browseOnStartup(true);
addFormNotice(_("Console is to be shown on startup")); addFormNotice(_("Console is to be shown on startup"));
......
...@@ -10,7 +10,7 @@ import java.util.Properties; ...@@ -10,7 +10,7 @@ import java.util.Properties;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import net.i2p.I2PAppContext; import net.i2p.I2PAppContext;
import net.i2p.apps.systray.SysTray; import net.i2p.desktopgui.Main;
import net.i2p.data.Base32; import net.i2p.data.Base32;
import net.i2p.data.DataHelper; import net.i2p.data.DataHelper;
import net.i2p.router.RouterContext; import net.i2p.router.RouterContext;
...@@ -301,7 +301,10 @@ public class RouterConsoleRunner { ...@@ -301,7 +301,10 @@ public class RouterConsoleRunner {
} }
try { try {
SysTray tray = SysTray.getInstance(); //TODO: move away from routerconsole into a separate application.
//ApplicationManager?
String[] args = new String[0];
net.i2p.desktopgui.Main.beginStartup(args);
} catch (Throwable t) { } catch (Throwable t) {
t.printStackTrace(); t.printStackTrace();
} }
......
...@@ -42,14 +42,7 @@ ...@@ -42,14 +42,7 @@
<% } %></div> <% } %></div>
<% if ( (System.getProperty("os.name") != null) && (System.getProperty("os.name").startsWith("Win")) ) { %> <% if ( (System.getProperty("os.name") != null) && (System.getProperty("os.name").startsWith("Win")) ) { %>
<h3><%=intl._("Systray integration")%></h3> <h3><%=intl._("Run on startup")%></h3>
<p><%=intl._("On the windows platform, there is a small application to sit in the system tray, allowing you to view the router's status")%>
<%=intl._("(later on, I2P client applications will be able to integrate their own functionality into the system tray as well).")%>
<%=intl._("If you are on windows, you can either enable or disable that icon here.")%></p>
<hr><div class="formaction">
<input type="submit" name="action" value="<%=intl._("Show systray icon")%>" >
<input type="submit" name="action" value="<%=intl._("Hide systray icon")%>" >
</div><h3><%=intl._("Run on startup")%></h3>
<p><%=intl._("You can control whether I2P is run on startup or not by selecting one of the following options - I2P will install (or remove) a service accordingly.")%> <p><%=intl._("You can control whether I2P is run on startup or not by selecting one of the following options - I2P will install (or remove) a service accordingly.")%>
<%=intl._("If you prefer the command line, you can also run the ")%> <code>install_i2p_service_winnt.bat</code> (<%=intl._("or")%> <%=intl._("If you prefer the command line, you can also run the ")%> <code>install_i2p_service_winnt.bat</code> (<%=intl._("or")%>
<code>uninstall_i2p_service_winnt.bat</code>).</p> <code>uninstall_i2p_service_winnt.bat</code>).</p>
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<target name="builddep" depends="builddepSmall, buildBOB, buildSAM, buildSusiMail, buildSusiDNS, buildI2PSnark" /> <target name="builddep" depends="builddepSmall, buildBOB, buildSAM, buildSusiMail, buildSusiDNS, buildI2PSnark" />
<target name="builddepSmall" depends="buildrouter, buildSystray, buildRouterConsole, buildStreaming, buildI2PTunnel, buildAddressbook" /> <target name="builddepSmall" depends="buildrouter, buildSystray, buildDesktopGui, buildRouterConsole, buildStreaming, buildI2PTunnel, buildAddressbook" />
<!-- start of buildX, one for each sub-build.xml. <!-- start of buildX, one for each sub-build.xml.
Do not put ant tasks in the sub-build.xmls anymore, Do not put ant tasks in the sub-build.xmls anymore,
...@@ -97,7 +97,11 @@ ...@@ -97,7 +97,11 @@
<ant dir="apps/i2ptunnel/java/" target="build" /> <ant dir="apps/i2ptunnel/java/" target="build" />
</target> </target>
<target name="buildRouterConsole" depends="buildrouter, buildSystray, buildJetty" > <target name="buildDesktopGui" depends="buildCore, buildrouter" >
<ant dir="apps/desktopgui" target="jar" />
</target>
<target name="buildRouterConsole" depends="buildrouter, buildSystray, buildDesktopGui, buildJetty" >
<ant dir="apps/routerconsole/java/" target="jar" /> <ant dir="apps/routerconsole/java/" target="jar" />
</target> </target>
...@@ -165,7 +169,7 @@ ...@@ -165,7 +169,7 @@
<jar destfile="./build/launchi2p.jar"> <jar destfile="./build/launchi2p.jar">
<manifest> <manifest>
<attribute name="Main-Class" value="net.i2p.router.RouterLaunch" /> <attribute name="Main-Class" value="net.i2p.router.RouterLaunch" />
<attribute name="Class-Path" value="lib/i2p.jar lib/router.jar lib/jbigi.jar lib/BOB.jar lib/sam.jar lib/mstreaming.jar lib/streaming.jar lib/routerconsole.jar lib/i2ptunnel.jar lib/org.mortbay.jetty.jar lib/javax.servlet.jar lib/jasper-compiler.jar lib/jasper-runtime.jar lib/commons-logging.jar lib/commons-el.jar lib/wrapper.jar lib/systray.jar lib/systray4j.jar" /> <attribute name="Class-Path" value="lib/i2p.jar lib/router.jar lib/jbigi.jar lib/BOB.jar lib/sam.jar lib/mstreaming.jar lib/streaming.jar lib/routerconsole.jar lib/i2ptunnel.jar lib/org.mortbay.jetty.jar lib/javax.servlet.jar lib/jasper-compiler.jar lib/jasper-runtime.jar lib/commons-logging.jar lib/commons-el.jar lib/wrapper.jar lib/systray.jar lib/systray4j.jar lib/desktopgui.jar" />
</manifest> </manifest>
</jar> </jar>
<!-- now the standalone launcher exe --> <!-- now the standalone launcher exe -->
...@@ -192,6 +196,7 @@ ...@@ -192,6 +196,7 @@
<copy file="apps/i2ptunnel/java/build/i2ptunnel.jar" todir="build/" /> <copy file="apps/i2ptunnel/java/build/i2ptunnel.jar" todir="build/" />
<copy file="apps/i2ptunnel/java/build/i2ptunnel.war" todir="build/" /> <copy file="apps/i2ptunnel/java/build/i2ptunnel.war" todir="build/" />
<copy file="apps/systray/java/build/systray.jar" todir="build/" /> <copy file="apps/systray/java/build/systray.jar" todir="build/" />
<copy file="apps/desktopgui/dist/desktopgui.jar" todir="build/" />
<copy file="installer/lib/jbigi/jbigi.jar" todir="build" /> <copy file="installer/lib/jbigi/jbigi.jar" todir="build" />
<copy file="apps/addressbook/dist/addressbook.war" todir="build/" /> <copy file="apps/addressbook/dist/addressbook.war" todir="build/" />
</target> </target>
...@@ -201,6 +206,7 @@ ...@@ -201,6 +206,7 @@
<ant dir="apps/i2psnark/java/" target="poupdate" /> <ant dir="apps/i2psnark/java/" target="poupdate" />
<ant dir="apps/i2ptunnel/java/" target="poupdate" /> <ant dir="apps/i2ptunnel/java/" target="poupdate" />
<ant dir="apps/susidns/src/" target="poupdate" /> <ant dir="apps/susidns/src/" target="poupdate" />
<ant dir="apps/desktopgui" target="poupdate" />
</target> </target>
<target name="javadoc"> <target name="javadoc">
<ant dir="apps/jetty" target="ensureJettylib" /> <ant dir="apps/jetty" target="ensureJettylib" />
...@@ -246,6 +252,7 @@ ...@@ -246,6 +252,7 @@
<group title="SusiDNS Application" packages="i2p.susi.dns" /> <group title="SusiDNS Application" packages="i2p.susi.dns" />
<group title="SusiMail Application" packages="i2p.susi.webmail:i2p.susi.webmail.*:i2p.susi.debug:i2p.susi.util" /> <group title="SusiMail Application" packages="i2p.susi.webmail:i2p.susi.webmail.*:i2p.susi.debug:i2p.susi.util" />
<group title="Systray Application" packages="net.i2p.apps.systray" /> <group title="Systray Application" packages="net.i2p.apps.systray" />
<group title="Desktopgui Application" packages="net.i2p.desktopgui.*" />
<sourcepath> <sourcepath>
<pathelement location="core/java/src" /> <pathelement location="core/java/src" />
<!--<pathelement location="core/java/test" />--> <!--<pathelement location="core/java/test" />-->
...@@ -255,6 +262,7 @@ ...@@ -255,6 +262,7 @@
<pathelement location="apps/streaming/java/src" /> <pathelement location="apps/streaming/java/src" />
<pathelement location="apps/i2ptunnel/java/src" /> <pathelement location="apps/i2ptunnel/java/src" />
<pathelement location="apps/systray/java/src" /> <pathelement location="apps/systray/java/src" />
<pathelement location="apps/desktopgui/src" />
<pathelement location="apps/routerconsole/java/src" /> <pathelement location="apps/routerconsole/java/src" />
<pathelement location="apps/addressbook/java/src" /> <pathelement location="apps/addressbook/java/src" />
<pathelement location="apps/i2psnark/java/src" /> <pathelement location="apps/i2psnark/java/src" />
...@@ -301,6 +309,7 @@ ...@@ -301,6 +309,7 @@
<ant dir="apps/i2ptunnel/java/" target="distclean" /> <ant dir="apps/i2ptunnel/java/" target="distclean" />
<ant dir="apps/sam/java/" target="distclean" /> <ant dir="apps/sam/java/" target="distclean" />
<ant dir="apps/BOB" target="clean" /> <ant dir="apps/BOB" target="clean" />
<ant dir="apps/desktopgui" target="clean" />
<ant dir="apps/routerconsole/java/" target="distclean" /> <ant dir="apps/routerconsole/java/" target="distclean" />
<ant dir="apps/addressbook/" target="distclean" /> <ant dir="apps/addressbook/" target="distclean" />
<ant dir="apps/susimail/" target="distclean" /> <ant dir="apps/susimail/" target="distclean" />
...@@ -432,6 +441,7 @@ ...@@ -432,6 +441,7 @@
<copy file="build/streaming.jar" todir="pkg-temp/lib/" /> <copy file="build/streaming.jar" todir="pkg-temp/lib/" />
<copy file="build/org.mortbay.jetty.jar" todir="pkg-temp/lib/" /> <copy file="build/org.mortbay.jetty.jar" todir="pkg-temp/lib/" />
<copy file="build/router.jar" todir="pkg-temp/lib/" /> <copy file="build/router.jar" todir="pkg-temp/lib/" />
<copy file="build/desktopgui.jar" todir="pkg-temp/lib/" />
<copy file="build/routerconsole.jar" todir="pkg-temp/lib/" /> <copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
<!-- pulled out of routerconsole.jar in 0.7.12; name without version so we can overwrite if we upgrade --> <!-- pulled out of routerconsole.jar in 0.7.12; name without version so we can overwrite if we upgrade -->
<copy file="apps/jrobin/jrobin-1.4.0.jar" tofile="pkg-temp/lib/jrobin.jar" /> <copy file="apps/jrobin/jrobin-1.4.0.jar" tofile="pkg-temp/lib/jrobin.jar" />
...@@ -602,6 +612,7 @@ ...@@ -602,6 +612,7 @@
<copy file="build/i2psnark.jar" todir="pkg-temp/lib" /> <copy file="build/i2psnark.jar" todir="pkg-temp/lib" />
<!-- include systray changes in 0.7.5 --> <!-- include systray changes in 0.7.5 -->
<copy file="build/systray.jar" todir="pkg-temp/lib/" /> <copy file="build/systray.jar" todir="pkg-temp/lib/" />
<copy file="build/desktopgui.jar" todir="pkg-temp/lib/" />
<copy file="build/susimail.war" todir="pkg-temp/webapps/" /> <copy file="build/susimail.war" todir="pkg-temp/webapps/" />
<copy file="build/susidns.war" todir="pkg-temp/webapps/" /> <copy file="build/susidns.war" todir="pkg-temp/webapps/" />
<!-- as of 0.7.12; someday, we can remove these from the updater --> <!-- as of 0.7.12; someday, we can remove these from the updater -->
...@@ -733,10 +744,6 @@ ...@@ -733,10 +744,6 @@
<ant dir="core/java/" target="fullclovertest" /> <ant dir="core/java/" target="fullclovertest" />
<ant dir="router/java/" target="fullclovertest" /> <ant dir="router/java/" target="fullclovertest" />
</target> </target>
<target name="desktopgui" depends="builddepSmall">
<ant dir="apps/desktopgui" target="jar" />
<copy file="apps/desktopgui/dist/desktopgui.jar" todir="." />
</target>
<target name="syndie" > <target name="syndie" >
<ant dir="apps/syndie/java/" target="standalone" /> <ant dir="apps/syndie/java/" target="standalone" />
<copy file="apps/syndie/java/syndie-standalone.zip" todir="." /> <copy file="apps/syndie/java/syndie-standalone.zip" todir="." />
...@@ -780,6 +787,7 @@ ...@@ -780,6 +787,7 @@
<arg value="build/jbigi.jar"/> <arg value="build/jbigi.jar"/>
<arg value="build/mstreaming.jar"/> <arg value="build/mstreaming.jar"/>
<arg value="build/router.jar/"/> <arg value="build/router.jar/"/>
<arg value="build/desktopgui.jar"/>
<arg value="build/routerconsole.jar"/> <arg value="build/routerconsole.jar"/>
<arg value="build/routerconsole.war"/> <arg value="build/routerconsole.war"/>
<arg value="build/sam.jar"/> <arg value="build/sam.jar"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment