/*
* IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
- *
+ *
* http://izpack.org/
* http://izpack.codehaus.org/
- *
+ *
* Copyright 2004 Tino Schwarze
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
private String logfiledir = null;
protected AutomatedInstallData idata;
-
+
private Map<Boolean,List<ButtonConfig>> buttonConfigs = new Hashtable<Boolean, List<ButtonConfig>>();
/**
e.printStackTrace();
return false;
}
-
+
IXMLParser parser = new XMLParser();
IXMLElement spec;
try
this.jobs.add(new ProcessingJob(job_name, ef_list));
}
}
-
+
buttonConfigs.put(Boolean.FALSE, new ArrayList<ButtonConfig>());
buttonConfigs.put(Boolean.TRUE, new ArrayList<ButtonConfig>());
-
+
for (IXMLElement ef : spec.getChildrenNamed("onFail")) {
String conditionid = ef.hasAttribute("condition") ? ef.getAttribute("condition") : ef.hasAttribute("conditionid") ? ef.getAttribute("conditionid") : null;
boolean unlockPrev = ef.hasAttribute("previous") ? Boolean.parseBoolean(ef.getAttribute("previous")) : false;
boolean unlockNext = true;
boolean unlockPrev = false;
-
+
// get the ButtonConfigs matching the this.result
for (ButtonConfig bc : buttonConfigs.get(Boolean.valueOf(this.result)))
{
continue;
}
}
-
+
unlockNext = bc.isUnlockNext();
unlockPrev = bc.isUnlockPrev();
break;
}
-
+
this.handler.finishProcessing(unlockPrev, unlockNext);
if (logfile != null)
{
if (exitStatus != 0)
{
- if (this.handler.askQuestion("Process execution failed",
- "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO,
- AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO)
- {
- return false;
- }
+ String message = AutomatedInstallData.getInstance().langpack.getString("FinishPanel.fail");
+ this.handler.emitError("error", message);
+ return false;
}
}
catch (InterruptedException ie)
* in the list if that pack is actually selected for installation. <br><br> <b>Note:</b><br>
* If the list of selected packs is empty then <code>true</code> is always returned. The same
* is true if the <code>packs</code> list is empty.
- *
+ *
* @param packs a <code>Vector</code> of <code>String</code>s. Each of the strings denotes
* a pack for which the schortcut should be created if the pack is actually installed.
- *
+ *
* @return <code>true</code> if the shortcut is required for at least on pack in the list,
* otherwise returns <code>false</code>.
*/
/*--------------------------------------------------------------------------*/
/*
* @design
- *
+ *
* The information about the installed packs comes from InstallData.selectedPacks. This assumes
* that this panel is presented to the user AFTER the PacksPanel.
- *
+ *
* /*--------------------------------------------------------------------------
*/
private final String conditionid;
private final boolean unlockPrev;
private final boolean unlockNext;
-
+
/**
* @param conditionid
* @param unlockPrev
{
return unlockPrev;
}
-
+
/**
* @return the unlockNext
*/
return unlockNext;
}
-
+
/**
* @return the conditionid
*/