Changeset 70f9cb1


Ignore:
Timestamp:
May 6, 2016 3:56:54 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
62296222
Parents:
ecafcdd
Message:

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
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • LICENSE.txt

    recafcdd r70f9cb1  
    173173   Copyright (C) sponge
    174174   See licenses/COPYING-BOB.txt
     175
     176   Desktopgui
     177   Copyright (c) Mathias De Maré
     178   See licenses/LICENSE-DesktopGUI.txt
    175179
    176180   I2PSnark:
     
    292296   DWTFYWTPL
    293297
    294    Desktopgui
    295    Copyright (c) Mathias De Maré
    296    See apps/desktopgui/LICENSE
    297 
    298298   SAM C Library:
    299299   Copyright (c) 2004, Matthew P. Cashdollar <mpc@innographx.com>
  • apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java

    recafcdd r70f9cb1  
    4040import net.i2p.util.I2PSSLSocketFactory;
    4141import net.i2p.util.SystemVersion;
     42
    4243import org.eclipse.jetty.security.HashLoginService;
    4344import org.eclipse.jetty.security.ConstraintMapping;
     
    7071import org.eclipse.jetty.util.thread.ThreadPool;
    7172
     73import org.tanukisoftware.wrapper.WrapperManager;
     74
    7275/**
    7376 *  Start the router console.
     
    129132    private static final int MAX_IDLE_TIME = 90*1000;
    130133    private static final String THREAD_NAME = "RouterConsole Jetty";
     134    private final static String DAEMON_USER = "i2psvc";
    131135   
    132136    /**
     
    214218        changeState(STARTING);
    215219        checkJavaVersion();
    216         startTrayApp(_context);
     220        startTrayApp();
    217221        startConsole();
    218222    }
     
    266270    }
    267271
    268     private static void startTrayApp(I2PAppContext ctx) {
     272    private void startTrayApp() {
     273        // if no permissions, don't even try
     274        // isLaunchedAsService() always returns true on Linux
     275        if (DAEMON_USER.equals(System.getProperty("user.name")) ||
     276            (SystemVersion.isWindows() && _context.hasWrapper() && WrapperManager.isLaunchedAsService())) {
     277            // required true for jrobin to work
     278            System.setProperty("java.awt.headless", "true");
     279            return;
     280        }
    269281        try {
    270             //TODO: move away from routerconsole into a separate application.
    271             //ApplicationManager?
    272             boolean recentJava = SystemVersion.isJava6();
    273282            // default false for now
    274             boolean desktopguiEnabled = ctx.getBooleanProperty("desktopgui.enabled");
    275             if (recentJava && desktopguiEnabled) {
     283            boolean desktopguiEnabled = _context.getBooleanProperty("desktopgui.enabled");
     284            if (desktopguiEnabled) {
    276285                //Check if we are in a headless environment, set properties accordingly
    277286                System.setProperty("java.awt.headless", Boolean.toString(GraphicsEnvironment.isHeadless()));
    278                 String[] args = new String[0];
    279                 net.i2p.desktopgui.Main.beginStartup(args);   
     287                net.i2p.desktopgui.Main dtg = new net.i2p.desktopgui.Main(_context, _mgr, null);   
     288                dtg.startup();
    280289            } else {
    281290                // required true for jrobin to work
  • build.xml

    recafcdd r70f9cb1  
    12581258        </copy>
    12591259        <copy file="apps/imagegen/identicon/README.md" tofile="pkg-temp/licenses/LICENSE-Identicon.txt" />
    1260     </target>
    1261 
    1262     <target name="preplicenses-unlesspkg" unless="${with-libjetty8-java}" >
     1260        <copy file="apps/desktopgui/LICENSE" tofile="pkg-temp/licenses/LICENSE-DesktopGUI.txt" />
     1261    </target>
     1262
     1263    <target name="preplicenses-unlesspkg" unless="${with-libtomcat7-java}" >
    12631264        <copy file="apps/jetty/apache-tomcat-deployer/NOTICE" tofile="pkg-temp/licenses/NOTICE-Tomcat.txt" />
    12641265    </target>
     
    14771478        <!-- include systray changes in 0.7.5 -->
    14781479        <copy file="build/systray.jar" todir="pkg-temp/lib/" />
    1479        <!-- removed from updater in 0.9
     1480       <!-- removed from updater in 0.9, added back in 0.9.26 -->
    14801481        <copy file="build/desktopgui.jar" todir="pkg-temp/lib/" />
    1481        -->
    14821482        <copy file="build/susimail.war" todir="pkg-temp/webapps/" />
    14831483        <copy file="build/susidns.war" todir="pkg-temp/webapps/" />
    14841484        <copy file="build/imagegen.war" todir="pkg-temp/webapps/" />
    1485         <!-- as of 0.7.12; someday, we can remove these from the updater -->
     1485        <!-- as of 0.7.12; last changed in 0.9; removed from update in 0.9.26 -->
     1486      <!--
    14861487        <copy file="apps/susidns/src/lib/jstl.jar" todir="pkg-temp/lib/" />
    14871488        <copy file="apps/susidns/src/lib/standard.jar" todir="pkg-temp/lib/" />
     1489       -->
    14881490        <copy file="build/i2psnark.war" todir="pkg-temp/webapps/" />
    14891491        <copy file="history.txt" todir="pkg-temp/" />
Note: See TracChangeset for help on using the changeset viewer.