Index: C:/workspace/jython22/installer/src/java/org/python/util/install/driver/InstallationDriver.java =================================================================== --- C:/workspace/jython22/installer/src/java/org/python/util/install/driver/InstallationDriver.java (revision 3438) +++ C:/workspace/jython22/installer/src/java/org/python/util/install/driver/InstallationDriver.java (working copy) @@ -244,7 +244,30 @@ test3.addAnswer("n"); // no readme test3.setVerifier(new StandaloneVerifier()); consoleTests.add(test3); - + + // test for bug 1783960 + ConsoleAutotest test4 = new ConsoleAutotest(getOriginalCommandLine()); + test4.setCommandLineArgs(arguments); + test4.addAnswer("e"); // language + test4.addAnswer("n"); // no read of license + test4.addAnswer("y"); // accept license + test4.addAnswer("2"); // type: standard + test4.addAnswer("n"); // no includes + test4.addAnswer("y"); // exclude + test4.addAnswer("n"); // no further excludes + test4.addAnswer(test4.getTargetDir().getAbsolutePath()); // target directory + if (test4.hasJavaHomeDeviation()) { + test4.addAnswer(test4.getJavaHome().getAbsolutePath()); // different jre + } else { + test4.addAnswer("=="); // current jre + } + test4.addAnswer(""); // simple enter for java version + test4.addAnswer(""); // simple enter for os version + test4.addAnswer("y"); // confirm copying + test4.addAnswer("n"); // no readme + test4.setVerifier(new NormalVerifier()); + consoleTests.add(test4); + // build array int size = consoleTests.size(); _consoleTests = new ConsoleAutotest[size]; Index: C:/workspace/jython22/installer/src/java/org/python/util/install/AbstractWizard.java =================================================================== --- C:/workspace/jython22/installer/src/java/org/python/util/install/AbstractWizard.java (revision 3438) +++ C:/workspace/jython22/installer/src/java/org/python/util/install/AbstractWizard.java (working copy) @@ -364,14 +364,16 @@ _header.setVisible(visible); } - public void show() { - fireStartedEvent(); - if (_pages.size() > 0) { - _activePage = (AbstractWizardPage) _pages.get(0); - showActivePage(); - } - super.show(); - } + public void setVisible(boolean visible) { + if (visible) { + fireStartedEvent(); + if (_pages.size() > 0) { + _activePage = (AbstractWizardPage) _pages.get(0); + showActivePage(); + } + } + super.setVisible(visible); + } private void showActivePage() { if (_activePage == null) Index: C:/workspace/jython22/installer/src/java/org/python/util/install/FrameInstaller.java =================================================================== --- C:/workspace/jython22/installer/src/java/org/python/util/install/FrameInstaller.java (revision 3438) +++ C:/workspace/jython22/installer/src/java/org/python/util/install/FrameInstaller.java (working copy) @@ -49,7 +49,7 @@ } }); wizard.addWizardListener(new SimpleWizardListener()); - wizard.show(); + wizard.setVisible(true); } protected static void setProperty(String key, String value) { Index: C:/workspace/jython22/installer/src/java/org/python/util/install/ConsoleInstaller.java =================================================================== --- C:/workspace/jython22/installer/src/java/org/python/util/install/ConsoleInstaller.java (revision 3438) +++ C:/workspace/jython22/installer/src/java/org/python/util/install/ConsoleInstaller.java (working copy) @@ -186,12 +186,7 @@ message(" " + Installation.STANDARD + ". " + getText(C_STANDARD)); message(" " + Installation.MINIMUM + ". " + getText(C_MINIMUM)); message(" " + Installation.STANDALONE + ". " + getText(C_STANDALONE)); - List answers = new ArrayList(4); - answers.add(Installation.ALL); - answers.add(Installation.STANDARD); - answers.add(Installation.MINIMUM); - answers.add(Installation.STANDALONE); - String answer = question(getText(C_SELECT_INSTALL_TYPE), answers); + String answer = question(getText(C_SELECT_INSTALL_TYPE), getTypeAnswers()); if (Installation.ALL.equals(answer)) { installationType.setAll(); } else if (Installation.STANDARD.equals(answer)) { @@ -206,14 +201,8 @@ if (!installationType.isAll()) { answer = question(getText(C_INCLUDE), getYNAnswers()); if (yes.equals(answer)) { - answers = new ArrayList(5); - answers.add(InstallerCommandLine.INEXCLUDE_LIBRARY_MODULES); - answers.add(InstallerCommandLine.INEXCLUDE_DEMOS_AND_EXAMPLES); - answers.add(InstallerCommandLine.INEXCLUDE_DOCUMENTATION); - answers.add(InstallerCommandLine.INEXCLUDE_SOURCES); - answers.add(no); do { - answer = question(getText(C_INEXCLUDE_PARTS, no), answers); + answer = question(getText(C_INEXCLUDE_PARTS, no), getInExcludeAnswers()); if (InstallerCommandLine.INEXCLUDE_LIBRARY_MODULES.equals(answer)) { installationType.addLibraryModules(); } else if (InstallerCommandLine.INEXCLUDE_DEMOS_AND_EXAMPLES.equals(answer)) { @@ -234,7 +223,7 @@ answer = question(getText(C_EXCLUDE), getYNAnswers()); if (yes.equals(answer)) { do { - answer = question(getText(C_INEXCLUDE_PARTS, no), answers); + answer = question(getText(C_INEXCLUDE_PARTS, no), getInExcludeAnswers()); if (InstallerCommandLine.INEXCLUDE_LIBRARY_MODULES.equals(answer)) { installationType.removeLibraryModules(); } else if (InstallerCommandLine.INEXCLUDE_DEMOS_AND_EXAMPLES.equals(answer)) { @@ -490,6 +479,15 @@ } } + private List getTypeAnswers() { + List answers = new ArrayList(4); + answers.add(Installation.ALL); + answers.add(Installation.STANDARD); + answers.add(Installation.MINIMUM); + answers.add(Installation.STANDALONE); + return answers; + } + private List getYNAnswers() { List answers = new ArrayList(2); answers.add(getText(C_YES)); @@ -497,6 +495,16 @@ return answers; } + private List getInExcludeAnswers() { + List answers = new ArrayList(5); + answers.add(InstallerCommandLine.INEXCLUDE_LIBRARY_MODULES); + answers.add(InstallerCommandLine.INEXCLUDE_DEMOS_AND_EXAMPLES); + answers.add(InstallerCommandLine.INEXCLUDE_DOCUMENTATION); + answers.add(InstallerCommandLine.INEXCLUDE_SOURCES); + answers.add(getText(C_NO)); + return answers; + } + private void progressMessage(int percentage) { message(" " + percentage + " %"); }