From: <otm...@us...> - 2008-10-16 22:15:37
|
Revision: 5449 http://jython.svn.sourceforge.net/jython/?rev=5449&view=rev Author: otmarhumbel Date: 2008-10-16 22:15:33 +0000 (Thu, 16 Oct 2008) Log Message: ----------- making verbose mode a bit more verbose Modified Paths: -------------- trunk/installer/src/java/org/python/util/install/Installation.java Modified: trunk/installer/src/java/org/python/util/install/Installation.java =================================================================== --- trunk/installer/src/java/org/python/util/install/Installation.java 2008-10-16 21:21:08 UTC (rev 5448) +++ trunk/installer/src/java/org/python/util/install/Installation.java 2008-10-16 22:15:33 UTC (rev 5449) @@ -93,15 +93,15 @@ int major = 0; int minor = 0; StringTokenizer tokenizer = new StringTokenizer(specificationVersion, "."); - if( tokenizer.hasMoreTokens()) { + if (tokenizer.hasMoreTokens()) { major = Integer.valueOf(tokenizer.nextToken()).intValue(); } if (tokenizer.hasMoreTokens()) { minor = Integer.valueOf(tokenizer.nextToken()).intValue(); } boolean valid = true; - if( major == 1) { - if( minor < 2) { + if (major == 1) { + if (minor < 2) { valid = false; } } @@ -266,13 +266,27 @@ } public static boolean isGuiAllowed() { + boolean verbose = isVerbose(); + if (verbose) { + ConsoleInstaller.message("checking gui availability"); + } if (Boolean.getBoolean(HEADLESS_PROPERTY_NAME)) { return false; } try { + if (verbose) { + ConsoleInstaller.message("trying to get the graphics environment"); + } GraphicsEnvironment.getLocalGraphicsEnvironment(); + if (verbose) { + ConsoleInstaller.message("got the graphics environment!"); + } return true; } catch (Throwable t) { + if (verbose) { + ConsoleInstaller.message("got the following exception:"); + t.printStackTrace(); + } return false; } } @@ -299,13 +313,21 @@ */ private static void internalMain(String[] args, Autotest autotest, Tunnel tunnel) { try { + boolean earlyVerbose = InstallerCommandLine.hasVerboseOptionInArgs(args); + if (earlyVerbose) { + ConsoleInstaller.message("reading jar info"); + } JarInfo jarInfo = new JarInfo(); InstallerCommandLine commandLine = new InstallerCommandLine(jarInfo); if (!commandLine.setArgs(args) || commandLine.hasHelpOption()) { commandLine.printHelp(); System.exit(1); } else { + _verbose = commandLine.hasVerboseOption(); if (commandLine.hasAutotestOption()) { + if (isVerbose()) { + ConsoleInstaller.message("running autotests"); + } _isAutotesting = true; InstallationDriver autotestDriver = new InstallationDriver(commandLine); autotestDriver.drive(); // ! reentrant into internalMain() @@ -313,10 +335,10 @@ ConsoleInstaller.message("\ncongratulations - autotests complete !"); System.exit(0); } - if (commandLine.hasVerboseOption()) { - _verbose = true; - } if (!useGui(commandLine)) { + if (isVerbose()) { + ConsoleInstaller.message("using the console installer"); + } ConsoleInstaller consoleInstaller = new ConsoleInstaller(commandLine, jarInfo); consoleInstaller.setTunnel(tunnel); consoleInstaller.install(); @@ -324,6 +346,9 @@ System.exit(0); } } else { + if (isVerbose()) { + ConsoleInstaller.message("using the gui installer"); + } new FrameInstaller(commandLine, jarInfo, autotest); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |