diff --git a/INSTALL-headless.txt b/INSTALL-headless.txt index 03229c7964bd2ef66e7f161b96e343b8dcc9a4f7..d4b066d7356ee521ddf40d7ea6948c21835fcc0f 100644 --- a/INSTALL-headless.txt +++ b/INSTALL-headless.txt @@ -1,12 +1,17 @@ Headless I2P installation instructions -1) tar xjf i2p.tar.bz2 (you've already done this) -2) cd i2p ; vi INSTALL-headless.txt (you're doing this now) -3) sh postinstall.sh (this launches the router) -4) lynx http://localhost:7657/index.jsp (configure the router) +1) java -jar i2pinstall.exe -console (you've already done this) -If you're having trouble, swing by http://forum.i2p.net/, check the -website at http://www.i2p.net/, or get on irc://irc.freenode.net/#i2p +This will run the installer in text mode, including running the postinstall.sh +script, which will start the router and launch a browser. + +If you do not have an X server running, the browser launch will fail, and +you may use: + lynx http://localhost:7657/index.jsp +to configure the router. + +If you're having trouble, swing by http://forum.i2p2.de/, check the +website at http://www.i2p2.de/, or get on irc://irc.freenode.net/#i2p To run I2P explicitly: (*nix): sh i2prouter start diff --git a/INSTALL.txt b/INSTALL.txt index 22f631bfe28892847a15ac9ec92c00c2fb62b433..15a962df2aa38a7dcf475348843e93e0b821b993 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -6,16 +6,20 @@ and package up the appropriate installer by running: ant pkg This will produce a few key files: -* i2p.tar.bz2: the headless installation -* install.jar: the GUI installer -* i2pupdate.zip: the update package +* install.jar: the GUI and console installer +* i2pinstall.exe: the GUI and console installer wrapped for cross-platform execution +* i2pupdate.zip: the update package -From there, you can follow the headless installation instructions -with the headless installer, run the GUI installer, or deploy -the update into an existing installation. +From there, you can run the headless (console mode) installer: + java -jar i2pinstall.exe -console + +Or run the GUI installer: + java -jar i2pinstall.exe + +Or move the update file into an existing installation directory and restart. You will need to have ant installed from http://ant.apache.org/ -(1.5 or newer) +(1.7.0 or newer) Supported JVMs: Windows: Latest available from http://java.sun.com/ (1.5+ supported) diff --git a/LICENSE.txt b/LICENSE.txt index dd3b3c51792f8bdd4b9baa4455aecc152c07157c..1ce8412e6cad1e925d5376e923a156b197635579 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -116,8 +116,9 @@ Installer: Forms were created using Abeille Forms Designer (https://abeille.dev.java.net/) - Izpack: - See licenses/LICENSE-Apache1.1.txt + Izpack 4.3.0: + Copyright (c) 2001-2008 Julien Ponge + See licenses/LICENSE-Apache2.0.txt diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml index da04fc9bab0bbc2742202c6cef8b301f4241b2a8..d571e48095215b1ca3ec8f3203b497ef48737c90 100644 --- a/apps/routerconsole/java/build.xml +++ b/apps/routerconsole/java/build.xml @@ -75,8 +75,9 @@ <ant target="war" /> </target> <target name="war" depends="precompilejsp"> + <!-- Don't include the css in the war, the main build.xml will copy it to docs/themes/console/ --> <war destfile="build/routerconsole.war" webxml="../jsp/web-out.xml" - basedir="../jsp/" excludes="web.xml, *.java, *.jsp, web-fragment.xml"> + basedir="../jsp/" excludes="web.xml, *.css, *.java, *.jsp, web-fragment.xml"> </war> </target> <target name="precompilejsp" unless="precompilejsp.uptodate"> diff --git a/apps/routerconsole/java/src/net/i2p/router/web/CSSHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/CSSHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..643c8c45c35bbdf4b736e8ee4b013340a677c9e6 --- /dev/null +++ b/apps/routerconsole/java/src/net/i2p/router/web/CSSHelper.java @@ -0,0 +1,20 @@ +package net.i2p.router.web; + +/** + * Copied and modded from I2PTunnel IndexBean (GPL) + * @author zzz + */ +public class CSSHelper extends HelperBase { + public CSSHelper() {} + + public static final String PROP_THEME_NAME = "routerconsole.theme"; + private static final String BASE = "/themes/console/"; + + public String getTheme() { + String url = BASE; + String theme = _context.getProperty(PROP_THEME_NAME); + if (theme != null) + url += theme + "/"; + return url; + } +} diff --git a/apps/routerconsole/java/src/net/i2p/router/web/NoticeHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/NoticeHelper.java deleted file mode 100644 index d5ce2b0d96ebe6de763ced489480a36428397eb8..0000000000000000000000000000000000000000 --- a/apps/routerconsole/java/src/net/i2p/router/web/NoticeHelper.java +++ /dev/null @@ -1,23 +0,0 @@ -package net.i2p.router.web; - -import net.i2p.data.DataHelper; -import net.i2p.router.RouterContext; - -/** - * Simple helper to query the appropriate router for data necessary to render - * any emergency notices - */ -public class NoticeHelper extends HelperBase { - public String getSystemNotice() { - if (true) return ""; // moved to the left hand nav - if (_context.router().gracefulShutdownInProgress()) { - long remaining = _context.router().getShutdownTimeRemaining(); - if (remaining > 0) - return "Graceful shutdown in " + DataHelper.formatDuration(remaining); - else - return "Graceful shutdown imminent, please be patient as state is written to disk"; - } else { - return ""; - } - } -} diff --git a/apps/routerconsole/jsp/config.jsp b/apps/routerconsole/jsp/config.jsp index ba95c8d566b23ccdf3b309d5a35364bb7368480f..933401913f622fde6c6a9d31f58604ddf62fcba7 100644 --- a/apps/routerconsole/jsp/config.jsp +++ b/apps/routerconsole/jsp/config.jsp @@ -3,7 +3,7 @@ <html><head> <title>I2P Router Console - config networking</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/configadvanced.jsp b/apps/routerconsole/jsp/configadvanced.jsp index d3bfbeea1af05401b635162878e335f2bfc576e8..d2097c252ba1e36b2a416fd568ba38b6551ce467 100644 --- a/apps/routerconsole/jsp/configadvanced.jsp +++ b/apps/routerconsole/jsp/configadvanced.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - config advanced</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/configclients.jsp b/apps/routerconsole/jsp/configclients.jsp index 96916fff128ff6f7480d19d021262ac67d58f11b..701e39aff0074ea177f0903fba3e53b8b1a28918 100644 --- a/apps/routerconsole/jsp/configclients.jsp +++ b/apps/routerconsole/jsp/configclients.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - config clients</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> <style type='text/css'> button span.hide{ display:none; diff --git a/apps/routerconsole/jsp/configkeyring.jsp b/apps/routerconsole/jsp/configkeyring.jsp index b26f094db8a32ca7cb74a34479d6460f8b1815f7..1aa40408b2436ef47c01788681f7477f87859b68 100644 --- a/apps/routerconsole/jsp/configkeyring.jsp +++ b/apps/routerconsole/jsp/configkeyring.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - config keyring</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/configlogging.jsp b/apps/routerconsole/jsp/configlogging.jsp index 65a661551debb3b744a42cdb6cf7d0dab9bc6e89..d76df86c9567707c11998a62e388bb1fe9e582ee 100644 --- a/apps/routerconsole/jsp/configlogging.jsp +++ b/apps/routerconsole/jsp/configlogging.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - config logging</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <jsp:useBean class="net.i2p.router.web.ConfigLoggingHelper" id="logginghelper" scope="request" /> <jsp:setProperty name="logginghelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> diff --git a/apps/routerconsole/jsp/configpeer.jsp b/apps/routerconsole/jsp/configpeer.jsp index 590e39dab723e797a3f0690a0d1d9d9d9479531f..62d2e209c25e879323034f837f797c1b203bd586 100644 --- a/apps/routerconsole/jsp/configpeer.jsp +++ b/apps/routerconsole/jsp/configpeer.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - config peers</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/configservice.jsp b/apps/routerconsole/jsp/configservice.jsp index a69c112dbc11ca7d90310976567102d811b2bbe1..9c494d81996398cec15ee9cbeb0956eaf86fa575 100644 --- a/apps/routerconsole/jsp/configservice.jsp +++ b/apps/routerconsole/jsp/configservice.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - config service</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/configstats.jsp b/apps/routerconsole/jsp/configstats.jsp index 12e5f1b91f236a54bb33bc1676c28b0adf1d3ba2..e84c5ca1f338d11ea2d378af68327c9e5f6b31c0 100644 --- a/apps/routerconsole/jsp/configstats.jsp +++ b/apps/routerconsole/jsp/configstats.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - config stats</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> <script type="text/javascript"> function init() { diff --git a/apps/routerconsole/jsp/configtunnels.jsp b/apps/routerconsole/jsp/configtunnels.jsp index b2ba61475b00309237833c7db44da73ebb64ca26..d61d14d1cbd49c72b8776bdebed77c9f20d6a791 100644 --- a/apps/routerconsole/jsp/configtunnels.jsp +++ b/apps/routerconsole/jsp/configtunnels.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - config tunnels</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/configupdate.jsp b/apps/routerconsole/jsp/configupdate.jsp index 59e621963197475eafd13de01d5a7750508077f7..433cea665583a78e2f91d27ed56cdee8926216ea 100644 --- a/apps/routerconsole/jsp/configupdate.jsp +++ b/apps/routerconsole/jsp/configupdate.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - config update</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/css.jsp b/apps/routerconsole/jsp/css.jsp new file mode 100644 index 0000000000000000000000000000000000000000..1e47f34d4cf879b400819dc654b3163b81777e24 --- /dev/null +++ b/apps/routerconsole/jsp/css.jsp @@ -0,0 +1,20 @@ +<% + /* + * This should be included inside <head>...</head>, + * as it sets the stylesheet. + */ + + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control","no-cache"); + response.setDateHeader("Expires", 0); + // the above will b0rk if the servlet engine has already flushed + // the response prior to including this file, so it should be + // near the top + + if (request.getParameter("i2p.contextId") != null) { + session.setAttribute("i2p.contextId", request.getParameter("i2p.contextId")); + } +%> +<jsp:useBean class="net.i2p.router.web.CSSHelper" id="cssHelper" scope="request" /> +<jsp:setProperty name="cssHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> +<link href="<%=cssHelper.getTheme()%>console.css" rel="stylesheet" type="text/css" /> diff --git a/apps/routerconsole/jsp/graphs.jsp b/apps/routerconsole/jsp/graphs.jsp index 06807f397f3e8a6e0917b6987cf7153e18243d59..950610a7594cb2d14517ef1f61fc6a8af93536f4 100644 --- a/apps/routerconsole/jsp/graphs.jsp +++ b/apps/routerconsole/jsp/graphs.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - graphs</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/help.jsp b/apps/routerconsole/jsp/help.jsp index 68f1b62457044459482c9808dd2b2b7c7f873cc0..ae5b5a15bf09dbb4739dc700da1c84b9bb0e0513 100644 --- a/apps/routerconsole/jsp/help.jsp +++ b/apps/routerconsole/jsp/help.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - help</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/index.jsp b/apps/routerconsole/jsp/index.jsp index ce820f5b792c8dec9f2b52e325ef2c3f08a29555..87287b4128e1b0e9a249bf60c40f48bc841000ee 100644 --- a/apps/routerconsole/jsp/index.jsp +++ b/apps/routerconsole/jsp/index.jsp @@ -5,7 +5,7 @@ <html><head> <title>I2P Router Console - home</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> <link rel="shortcut icon" href="favicon.ico" /> </head><body> <% diff --git a/apps/routerconsole/jsp/jobs.jsp b/apps/routerconsole/jsp/jobs.jsp index 56701af6b452d2624f8b8218dc1b17acf4951f3a..b7de2b7179146c8e0b84be312b074fd6355618fd 100644 --- a/apps/routerconsole/jsp/jobs.jsp +++ b/apps/routerconsole/jsp/jobs.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - job queue</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/logs.jsp b/apps/routerconsole/jsp/logs.jsp index 845ad3e8ddd6fc3c42717cf0df497fde3faf139c..a336d8d4f7c1cf8f7f1a457ddd94c9289f175d3c 100644 --- a/apps/routerconsole/jsp/logs.jsp +++ b/apps/routerconsole/jsp/logs.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - logs</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/nav.jsp b/apps/routerconsole/jsp/nav.jsp index 914371c78d4bdeae085e5eb4a1340d8b75544f56..ad0021487553c2504b80bc87b94ddba6a0f3fd32 100644 --- a/apps/routerconsole/jsp/nav.jsp +++ b/apps/routerconsole/jsp/nav.jsp @@ -1,15 +1,4 @@ <%@page import="java.io.File" %> -<% response.setHeader("Pragma", "no-cache"); - response.setHeader("Cache-Control","no-cache"); - response.setDateHeader("Expires", 0); - // the above will b0rk if the servlet engine has already flushed - // the response prior to including nav.jsp, so nav should be - // near the top - - if (request.getParameter("i2p.contextId") != null) { - session.setAttribute("i2p.contextId", request.getParameter("i2p.contextId")); - }%> - <div class="logo"> <a href="index.jsp"><img src="i2plogo.png" alt="Router Console" width="187" height="35" /></a><br /> </div> @@ -35,12 +24,10 @@ <a href="graphs.jsp">Graphs</a> | <a href="oldstats.jsp">Stats</a> <!-- | <a href="oldconsole.jsp">Internals</a> --> -<% } %> +<% } +// the following is unused and a candidate for removal +%> <jsp:useBean class="net.i2p.router.web.NavHelper" id="navhelper" scope="request" /> <jsp:setProperty name="navhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:getProperty name="navhelper" property="clientAppLinks" /> </div> - -<jsp:useBean class="net.i2p.router.web.NoticeHelper" id="noticehelper" scope="request" /> -<jsp:setProperty name="noticehelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> -<b><jsp:getProperty name="noticehelper" property="systemNotice" /></b> diff --git a/apps/routerconsole/jsp/netdb.jsp b/apps/routerconsole/jsp/netdb.jsp index 392888bc6728b136135565e180695a15a32882d3..6d029d7d24f9221d90398b0e8d6ba081792db87e 100644 --- a/apps/routerconsole/jsp/netdb.jsp +++ b/apps/routerconsole/jsp/netdb.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - network database summary</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/oldconsole.jsp b/apps/routerconsole/jsp/oldconsole.jsp index 9ac26ced469611952a5b0f0d0db5d7b6d3e74e74..7aa7bbcf42d15ad8bd5175b05f66a100c7cef608 100644 --- a/apps/routerconsole/jsp/oldconsole.jsp +++ b/apps/routerconsole/jsp/oldconsole.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - internals</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/oldstats.jsp b/apps/routerconsole/jsp/oldstats.jsp index 5764eeb070ddd604743b53596133068a64cf1d56..9e150eeb42a55b46bf26b474662d1eea8f32f265 100644 --- a/apps/routerconsole/jsp/oldstats.jsp +++ b/apps/routerconsole/jsp/oldstats.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - statistics</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/peers.jsp b/apps/routerconsole/jsp/peers.jsp index d3b941a34b408fb718cb3344c8944e9400e2b5d8..778a58e727aa74db3462875db13393e4615d855d 100644 --- a/apps/routerconsole/jsp/peers.jsp +++ b/apps/routerconsole/jsp/peers.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - peer connections</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/profiles.jsp b/apps/routerconsole/jsp/profiles.jsp index 8be3b801a4e68c0200eeaf332c349c6b3ffe16a8..7dd40d6b82513f5c1bed9d128717c98730eecc86 100644 --- a/apps/routerconsole/jsp/profiles.jsp +++ b/apps/routerconsole/jsp/profiles.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - peer profiles</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/apps/routerconsole/jsp/summaryframe.jsp b/apps/routerconsole/jsp/summaryframe.jsp index 54126ef722d1715e8ffd4d639de4953c94ca9751..9532602fa4e78701bb67b736378f0d828dc0d146 100644 --- a/apps/routerconsole/jsp/summaryframe.jsp +++ b/apps/routerconsole/jsp/summaryframe.jsp @@ -50,7 +50,7 @@ } } %> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head> <body style="margin: 0;"> diff --git a/apps/routerconsole/jsp/tunnels.jsp b/apps/routerconsole/jsp/tunnels.jsp index 3bdcfab08eff1bad74774825e753fa247eb3bb0f..61fb4eb7bd93f980064d386d5ee39f93406952cc 100644 --- a/apps/routerconsole/jsp/tunnels.jsp +++ b/apps/routerconsole/jsp/tunnels.jsp @@ -4,7 +4,7 @@ <html><head> <title>I2P Router Console - tunnel summary</title> -<link rel="stylesheet" href="default.css" type="text/css" /> +<%@include file="css.jsp" %> </head><body> <%@include file="nav.jsp" %> diff --git a/build.xml b/build.xml index 919a0342e7d86bf9f7a261fd841c660f68c23004..ae6224a70d95ce57e5318592fe10ff049c371c85 100644 --- a/build.xml +++ b/build.xml @@ -203,7 +203,7 @@ </delete> </target> <!-- one release only, then back to updaterWithJettyFixes --> - <target name="pkg" depends="distclean, updaterWithJettyFixesAndGeoIP, tarball, installer" /> + <target name="pkg" depends="distclean, updaterWithJettyFixesAndGeoIP, preppkg, installer" /> <target name="pkgclean" depends="deletepkg-temp"> <delete> <fileset dir="." includes="i2p.tar.bz2 install.jar i2pupdate.zip" /> @@ -249,6 +249,7 @@ <copy file="installer/resources/eepget" todir="pkg-temp/" /> <copy file="installer/resources/i2prouter" todir="pkg-temp/" /> <copy file="installer/resources/i2prouter.bat" todir="pkg-temp/" /> + <copy file="installer/resources/fixperms.bat" todir="pkg-temp/" /> <copy file="installer/resources/i2ptunnel.config" todir="pkg-temp/" /> <!-- <copy file="installer/resources/install_i2p_service_unix" todir="pkg-temp/" /> --> <copy file="installer/resources/install_i2p_service_winnt.bat" todir="pkg-temp/" /> @@ -315,6 +316,7 @@ <copy file="installer/lib/launch4j/lib/JGoodies.Looks.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-JGoodies-Looks.txt" /> <copy file="installer/lib/launch4j/lib/XStream.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-XStream.txt" /> </target> + <!-- this is no longer required, izpack 4.3.0 supports headless installs with java -jar i2pinstall.exe -console --> <target name="tarball" depends="preppkg"> <tar compression="bzip2" destfile="i2p.tar.bz2"> <tarfileset dir="pkg-temp" includes="**/*" prefix="i2p" /> @@ -369,6 +371,9 @@ <copy file="build/addressbook.war" todir="pkg-temp/webapps/" /> <!-- New readme_*.html files - For one release only --> <copy file="readme_zh.html" todir="pkg-temp/docs/" /> + <!-- CSS now in docs/, not in the .war --> + <copy file="apps/routerconsole/jsp/default.css" tofile="pkg-temp/docs/themes/console/console.css" /> + <copy file="apps/routerconsole/jsp/default.css" tofile="pkg-temp/docs/themes/console/defCon1/console.css" /> </target> <target name="prepupdateRouter" depends="buildrouter, deletepkg-temp"> <copy file="build/i2p.jar" todir="pkg-temp/lib/" /> @@ -394,13 +399,14 @@ </target> <target name="installer" depends="preppkg"> <taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" /> - <jar destfile="./pkg-temp/lib/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class"> + <mkdir dir="pkg-temp/installer" /> + <jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class"> <manifest><attribute name="Main-Class" value="net.i2p.util.Copy" /></manifest> </jar> - <jar destfile="./pkg-temp/lib/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class"> + <jar destfile="./pkg-temp/installer/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class"> <manifest><attribute name="Main-Class" value="net.i2p.util.Delete" /></manifest> </jar> - <jar destfile="./pkg-temp/lib/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class"> + <jar destfile="./pkg-temp/installer/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class"> <manifest><attribute name="Main-Class" value="net.i2p.util.Exec" /></manifest> </jar> <izpack input="${basedir}/installer/install.xml" output="${basedir}/install.jar" installerType="standard" basedir="${basedir}" /> @@ -523,7 +529,7 @@ </copy> </target> <target name="updaterWithDesktopgui" depends="prepupdateWithDesktopgui,updater" /> - <target name="pkgWithDesktopgui" depends="distclean, updaterWithDesktopgui, installerWithDesktopgui, tarball" /> + <target name="pkgWithDesktopgui" depends="distclean, updaterWithDesktopgui, installerWithDesktopgui, preppkg" /> <target name="distWithDesktopgui" depends="pkgWithDesktopgui, javadoc" /> <target name="distcleanWithDesktopgui" depends="distclean"> <ant dir="apps/desktopgui" target="build_clean" /> diff --git a/checklist.txt b/checklist.txt index 2e6813b12597c6476fab11a8ad284d9aa740869d..17f8d9753b0b7f91c83a18136779c441853199be 100644 --- a/checklist.txt +++ b/checklist.txt @@ -45,7 +45,6 @@ Make the source tarball: Until the build script gets this ability, you need to rename some files: mv i2pinstall.exe i2pinstall-0.7.xx.exe - mv i2p.tar.bz2 i2pheadless-0.7.xx.tar.bz2 mv i2pupdate.zip i2pupdate-0.7.xx.zip you probably don't need to rename i2pupdate.sud @@ -56,7 +55,6 @@ Generate hashes: Generate PGP signatures: gpg -b i2pinstall-0.7.xx.exe - gpg -b i2pheadless-0.7.xx.tar.bz2 gpg -b i2psource-0.7.xx.tar.bz2 gpg -b i2pupdate-0.7.xx.zip gpg -b i2pupdate.sud diff --git a/installer/install.xml b/installer/install.xml index 1cbafba30349b3f470dfb3ff57b7f15deab80b92..1d3d09fed9ba11f99ac5d2984082d413928d4a62 100644 --- a/installer/install.xml +++ b/installer/install.xml @@ -9,12 +9,40 @@ <author name="I2P" email="http://forum.i2p2.de/"/> </authors> <url>http://www.i2p2.de/</url> + + <!-- use pack200 compression, saves about 33% + see http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/pack200.html + However it makes the unpacked jars much larger... + For further testing... + <pack200 /> + --> + + <!-- adding this element will make the installer attempt to launch itself with administrator permissions, + but see http://www.nabble.com/Classpath-security-issues-on-Vista-td22456230.html + which says it isn't sufficient: + + Just to let you know that I managed to identify and resolve the problem (in + case anyone else has it). The default installation directory for Vista is + under "Program Files" which is a "special" directory which can only be + written to (create sub-directories) by administrators. However, stupid + Vista downgrades an administrator to a normal user when the program is run + via the application shortcut menu. As you suggested, I added a script which + runs ICACLS which resolved the problem, i.e. + + icacls %1 /grant Users:F /T > priv.log + + The command needs to be run as a Process rather than as an executable tag in + order to pass $INSTALL_PATH as a parameter. + --> + <run-privileged condition="izpack.windowsinstall.vista|izpack.windowsinstall.7"/> </info> <guiprefs width="590" height="356" resizable="yes"> <laf name="liquid"> <os family="unix"/> </laf> + <!-- full names, not iso3 codes --> + <modifier key="langDisplayType" value="native" /> </guiprefs> <locale> @@ -24,11 +52,16 @@ <langpack iso3="cze"/> <langpack iso3="dan"/> <langpack iso3="deu"/> + <langpack iso3="ell"/> + <langpack iso3="fa"/> <langpack iso3="fin"/> <langpack iso3="fra"/> + <langpack iso3="glg"/> <langpack iso3="hun"/> + <langpack iso3="ind"/> <langpack iso3="ita"/> <langpack iso3="jpn"/> + <langpack iso3="kor"/> <langpack iso3="mys"/> <langpack iso3="ned"/> <langpack iso3="nor"/> @@ -41,6 +74,7 @@ <langpack iso3="svk"/> <langpack iso3="swe"/> <langpack iso3="tur"/> + <langpack iso3="twn"/> <langpack iso3="ukr"/> </locale> @@ -67,32 +101,51 @@ <pack name="Base" required="yes"> <description>Base installation files</description> <fileset dir="pkg-temp" includes="**/*" targetdir="$INSTALL_PATH"/> + <!-- + Do variable substitution in the wrapper.config and i2prouter files. See: + http://www.javalobby.org/forums/thread.jspa?threadID=15967&tstart=0 + and the izpack docs for some guidance. + --> + <parsable targetfile="$INSTALL_PATH/wrapper.config" type="javaprop" /> + <parsable targetfile="$INSTALL_PATH/i2prouter" type="shell" os="unix|mac" /> <!-- postinstall stuff for windows --> - <executable targetfile="$INSTALL_PATH/lib/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> + <executable targetfile="$INSTALL_PATH/installer/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\lib\wrapper\win32\I2Psvc.exe" /><arg value="$INSTALL_PATH" /></args></executable> - <executable targetfile="$INSTALL_PATH/lib/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> + <executable targetfile="$INSTALL_PATH/installer/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\lib\wrapper\win32\wrapper.dll" /><arg value="$INSTALL_PATH\lib" /></args></executable> - <executable targetfile="$INSTALL_PATH/lib/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> + <executable targetfile="$INSTALL_PATH/installer/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\lib\wrapper\win32\wrapper.jar" /><arg value="$INSTALL_PATH\lib" /></args></executable> - <executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> + <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\i2prouter" /></args></executable> - <executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> + <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\install_i2p_service_unix" /></args></executable> - <executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> + <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\install-headless.txt" /></args></executable> - <executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> + <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\osid" /></args></executable> - <executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> + <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\postinstall.sh" /></args></executable> - <executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> + <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\postinstall.bat" /></args></executable> - <executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> + <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\uninstall_i2p_service_unix" /></args></executable> - <executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> + <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\lib\wrapper" /></args></executable> + + <!-- workaround for vista permission problems - see comments above --> + <executable targetfile="$INSTALL_PATH/fixperms.bat" type="bin" stage="postinstall" keep="true" failure="warn" + condition="izpack.windowsinstall.vista|izpack.windowsinstall.7" > + <args><arg value="$INSTALL_PATH" /></args> + </executable> + <!-- else delete it --> + <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn" + condition="izpack.windowsinstall.xp|izpack.windowsinstall.2003" > + <args><arg value="$INSTALL_PATH\fixperms.bat" /></args> + </executable> + <!-- - <executable targetfile="$INSTALL_PATH/lib/exec.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> + <executable targetfile="$INSTALL_PATH/installer/exec.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH" /><arg value="$INSTALL_PATH\I2Psvc.exe" /><arg value="-c" /><arg value="$INSTALL_PATH\wrapper.config" /></args></executable> --> diff --git a/installer/lib/izpack/standalone-compiler.jar b/installer/lib/izpack/standalone-compiler.jar index becb951342bfdbce595ff58220af98668925ffc9..4911632cb4b66f5127f43d21e1dd27694d0f1c59 100644 Binary files a/installer/lib/izpack/standalone-compiler.jar and b/installer/lib/izpack/standalone-compiler.jar differ diff --git a/installer/resources/fixperms.bat b/installer/resources/fixperms.bat new file mode 100755 index 0000000000000000000000000000000000000000..75cb715abca898d7824d3651164eeec52639c6ae --- /dev/null +++ b/installer/resources/fixperms.bat @@ -0,0 +1,11 @@ +:: Fix Vista permission problems +:: From http://www.nabble.com/Classpath-security-issues-on-Vista-td22456230.html +:: +:: 'echo Y' to get past the 'are you sure' question... +:: cacls requires it on XP, icacls doesnt appear so, but can't hurt +:: F : full control +:: /c : continue on error +:: /q : quiet +:: /t : recursive +:: +echo Y|icacls %1 /grant Users:F /c /t > %1%\fixperms.log diff --git a/installer/resources/i2prouter b/installer/resources/i2prouter index 0705905fee902c0a729e434a332b65aaad4edd8d..b5c292f19e2869174b14a6eb4d49a3cd6591496f 100644 --- a/installer/resources/i2prouter +++ b/installer/resources/i2prouter @@ -8,6 +8,10 @@ # if you have changed the default location set in the # wrapper configuration file. # +# Note that (percent)INSTALL_PATH and (percent)SYSTEM_java_io_tmpdir +# should have been replaced by +# the izpack installer. If you did not run the installer, +# replace them with the appropriate path. #----------------------------------------------------------------------------- # These settings can be modified to fit the needs of your application @@ -17,15 +21,15 @@ APP_NAME="i2p" APP_LONG_NAME="I2P Service" # Wrapper -WRAPPER_CMD="./i2psvc" -WRAPPER_CONF="wrapper.config" +WRAPPER_CMD="%INSTALL_PATH/i2psvc" +WRAPPER_CONF="%INSTALL_PATH/wrapper.config" # Priority at which to run the wrapper. See "man nice" for valid priorities. # nice is only used if a priority is specified. PRIORITY= # Location of the pid file. -PIDDIR="." +PIDDIR="%SYSTEM_java_io_tmpdir" # If uncommented, causes the Wrapper to be shutdown using an anchor file. # When launched with the 'start' command, it will also ignore all INT and diff --git a/installer/resources/postinstall.sh b/installer/resources/postinstall.sh index 900e1d72a52b56a224fe2b15f4870d2d0199662e..d273d226e91b0430528860783a55387bffb8adb1 100644 --- a/installer/resources/postinstall.sh +++ b/installer/resources/postinstall.sh @@ -73,6 +73,7 @@ rm -rf ./lib/wrapper rm -f ./lib/*.dll rm -f ./*.bat rm -f ./*.exe +rm -rf ./installer ./i2prouter start exit 0 diff --git a/installer/resources/wrapper.config b/installer/resources/wrapper.config index e35484de154877d2374bb19d99d048115162c42c..b14bc828898f0b245a61ae09a25169154fa9ddda 100644 --- a/installer/resources/wrapper.config +++ b/installer/resources/wrapper.config @@ -11,6 +11,12 @@ # with the runplain.sh script on Linux. Use the 'restartable' # icon on Windows or the i2prouter script on Linux to run the wrapper. # +# NOTE - The izpack installer performs variable subsitiution on this +# file upon installation. If you did not use izpack, you must +# find and replace all instances of (dollar)INSTALL_PATH and +# (dollar)SYSTEM_java_io_tmpdir with appropriate values +# (perhaps . and /var/tmp, respectively) +# #******************************************************************** # Java Application wrapper.java.command=java @@ -23,44 +29,22 @@ wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp # Java Classpath (include wrapper.jar) Add class path elements as # needed starting from 1 -# i2p sdk, public domain/BSD/Cryptix -wrapper.java.classpath.1=lib/i2p.jar -# router, depends on i2p.jar, public domain -wrapper.java.classpath.2=lib/router.jar -# compiled jbigi libraries, contains static libGMP, lgpl -wrapper.java.classpath.3=lib/jbigi.jar -# sam bridge, public domain (depends on i2p.jar) -wrapper.java.classpath.4=lib/sam.jar -# ministreaming lib -interfaces for streaming, BSD (depends on i2p.jar) -wrapper.java.classpath.5=lib/mstreaming.jar -# full streaming lib, public domain (depends on mstreaming.jar, i2p.jar) -wrapper.java.classpath.6=lib/streaming.jar -# router console, public domain (depends on i2p.jar, router.jar) -wrapper.java.classpath.7=lib/routerconsole.jar -# i2ptunnel, GPL (depends on mstreaming.jar, i2p.jar) -wrapper.java.classpath.8=lib/i2ptunnel.jar -# jetty libraries (and dependencies), apache licensed -wrapper.java.classpath.9=lib/org.mortbay.jetty.jar -wrapper.java.classpath.10=lib/javax.servlet.jar -wrapper.java.classpath.11=lib/jasper-compiler.jar -wrapper.java.classpath.12=lib/jasper-runtime.jar -wrapper.java.classpath.13=lib/commons-logging.jar -wrapper.java.classpath.14=lib/commons-el.jar -# java service wrapper, BSD -wrapper.java.classpath.15=lib/wrapper.jar -# systray, LGPL -wrapper.java.classpath.16=lib/systray.jar -wrapper.java.classpath.17=lib/systray4j.jar -# BOB -wrapper.java.classpath.18=lib/BOB.jar -# desktopgui -wrapper.java.classpath.19=lib/appframework.jar -wrapper.java.classpath.20=lib/swing-worker.jar -wrapper.java.classpath.21=lib/desktopgui.jar +# +# Doing it this way means we can add new apps without asking people +# to update their wrapper.config. +# The downside is that we lose control over classpath order, +# This is fine for new installs (where the uninstall jars +# copy.jar, delete.jar, and exec.jar containing duplicate FileUtil +# classes, or all the classes of i2p.jar, are in a different directory). +# Be sure there are no other duplicate classes. +# +wrapper.java.classpath.1=$INSTALL_PATH/lib/*.jar +# uncomment this to use the system classpath as well (e.g. to get tools.jar) +# wrapper.java.classpath.2=%CLASSPATH% # Java Library Path (location of Wrapper.DLL or libwrapper.so) -wrapper.java.library.path.1=. -wrapper.java.library.path.2=lib +wrapper.java.library.path.1=$INSTALL_PATH +wrapper.java.library.path.2=$INSTALL_PATH/lib # Java Additional Parameters wrapper.java.additional.1=-DloggerFilenameOverride=logs/log-router-@.txt @@ -153,7 +137,11 @@ wrapper.ping.timeout=605 wrapper.use_system_time=false # pid file for the JVM -wrapper.java.pidfile=routerjvm.pid +# If you plan to have multiple wrappers running on the same machine, +# you should copy this file, change the location or file name, +# and edit the i2prouter script to change the WRAPPER_CONF setting +# to point to the new wrapper.config location. +wrapper.java.pidfile=$SYSTEM_java_io_tmpdir/routerjvm.pid # pid file for the service monitoring the JVM # # From i2prouter: @@ -163,7 +151,8 @@ wrapper.java.pidfile=routerjvm.pid # PIDFILE="$PIDDIR/$APP_NAME.pid" # # This means i2prouter looks for './i2p.pid'. -wrapper.pidfile=i2p.pid +# See comments above for wrapper.java.pidfile +wrapper.pidfile=$SYSTEM_java_io_tmpdir/i2p.pid #******************************************************************** # Wrapper NT Service Properties diff --git a/router/java/src/net/i2p/router/RouterWatchdog.java b/router/java/src/net/i2p/router/RouterWatchdog.java index 0ad5a2c410f1ca4e4e3ca275884b1e6e2147f00f..14dc01c1e65deb8735ff9b89c89d81a2ddce0d04 100644 --- a/router/java/src/net/i2p/router/RouterWatchdog.java +++ b/router/java/src/net/i2p/router/RouterWatchdog.java @@ -95,13 +95,15 @@ class RouterWatchdog implements Runnable { _log.error("Memory: " + DataHelper.formatSize(used) + '/' + DataHelper.formatSize(max)); if (_consecutiveErrors == 1) { _log.log(Log.CRIT, "Router appears hung, or there is severe network congestion. Watchdog starts barking!"); - // This might work on linux... + // This works on linux... // It won't on windows, and we can't call i2prouter.bat either, it does something // completely different... - ShellCommand sc = new ShellCommand(); - boolean success = sc.executeSilentAndWaitTimed("./i2prouter dump", 10); - if (success) - _log.log(Log.CRIT, "Threads dumped to wrapper log"); + if (System.getProperty("wrapper.version") != null && !System.getProperty("os.name").startsWith("Win")) { + ShellCommand sc = new ShellCommand(); + boolean success = sc.executeSilentAndWaitTimed("./i2prouter dump", 10); + if (success) + _log.log(Log.CRIT, "Threads dumped to wrapper log"); + } } } }