[izpack-changes] r1914 - in izpack-src/trunk: bin/langpacks/installer src/lib/com/izforge/izpack/panels
noreply at berlios.de
noreply at berlios.de
Thu Nov 22 16:02:57 CET 2007
Author: dreil
Date: 2007-11-22 16:02:51 +0100 (Thu, 22 Nov 2007)
New Revision: 1914
Modified:
izpack-src/trunk/bin/langpacks/installer/deu.xml
izpack-src/trunk/bin/langpacks/installer/eng.xml
izpack-src/trunk/src/lib/com/izforge/izpack/panels/PathInputPanel.java
Log:
added modify installation mode.
Modified: izpack-src/trunk/bin/langpacks/installer/deu.xml
===================================================================
--- izpack-src/trunk/bin/langpacks/installer/deu.xml 2007-11-21 20:06:23 UTC (rev 1913)
+++ izpack-src/trunk/bin/langpacks/installer/deu.xml 2007-11-22 15:02:51 UTC (rev 1914)
@@ -74,6 +74,7 @@
<str id="InstallationTypePanel.modify" txt="Installation anpassen" />
<str id="PathInputPanel.required" txt="Das gewählte Verzeichnis muss existieren."/>
+ <str id="PathInputPanel.required.forModificationInstallation" txt="Das gewählte Verzeichnis muss existieren."/>
<str id="PathInputPanel.notValid" txt="Das gewählte Verzeichnis enthält nicht das benötigte Produkt."/>
<str id="TargetPanel.info" txt="Wählen Sie den Installationspfad:"/>
Modified: izpack-src/trunk/bin/langpacks/installer/eng.xml
===================================================================
--- izpack-src/trunk/bin/langpacks/installer/eng.xml 2007-11-21 20:06:23 UTC (rev 1913)
+++ izpack-src/trunk/bin/langpacks/installer/eng.xml 2007-11-22 15:02:51 UTC (rev 1914)
@@ -75,6 +75,7 @@
<str id="InfoPanel.info" txt="Please read the following information: "/>
<str id="PathInputPanel.required" txt="The chosen directory should exist."/>
+ <str id="PathInputPanel.required.forModificationInstallation" txt="The chosen directory should exist."/>
<str id="PathInputPanel.notValid" txt="The chosen directory does not contain the required product."/>
<str id="TargetPanel.info" txt="Select the installation path: "/>
Modified: izpack-src/trunk/src/lib/com/izforge/izpack/panels/PathInputPanel.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/panels/PathInputPanel.java 2007-11-21 20:06:23 UTC (rev 1913)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/panels/PathInputPanel.java 2007-11-22 15:02:51 UTC (rev 1914)
@@ -30,6 +30,7 @@
import java.io.InputStreamReader;
import com.izforge.izpack.gui.IzPanelLayout;
+import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.InstallData;
import com.izforge.izpack.installer.InstallerFrame;
import com.izforge.izpack.installer.IzPanel;
@@ -138,7 +139,20 @@
{
String chosenPath = pathSelectionPanel.getPath();
boolean ok = true;
-
+
+ boolean modifyinstallation = Boolean.valueOf(idata.getVariable(InstallData.MODIFY_INSTALLATION)).booleanValue();
+ if (modifyinstallation) {
+ // installation directory has to exist in a modification installation
+ mustExist = true;
+
+ File installationinformation = new File(pathSelectionPanel.getPath() + File.separator + AutomatedInstallData.INSTALLATION_INFORMATION);
+ if (!installationinformation.exists()) {
+ emitError(parent.langpack.getString("installer.error"), parent.langpack.getString("PathInputPanel.required.forModificationInstallation"));
+
+ return false;
+ }
+ }
+
// We put a warning if the specified target is nameless
if (chosenPath.length() == 0)
{
@@ -194,7 +208,7 @@
+ chosenPath);
}
- }
+ }
return ok;
}
More information about the izpack-changes
mailing list