[izpack-changes] r1637 - in izpack-src/trunk: . src/dtd src/lib/com/izforge/izpack/installer

noreply at berlios.de noreply at berlios.de
Mon Nov 6 12:10:40 CET 2006


Author: bartzkau
Date: 2006-11-06 12:10:39 +0100 (Mon, 06 Nov 2006)
New Revision: 1637

Modified:
   izpack-src/trunk/Versions.txt
   izpack-src/trunk/src/dtd/installation.dtd
   izpack-src/trunk/src/lib/com/izforge/izpack/installer/InstallerFrame.java
Log:
Bug at using OS dependant panels fixed; OS dependence stuff of panels added to dtd.


Modified: izpack-src/trunk/Versions.txt
===================================================================
--- izpack-src/trunk/Versions.txt	2006-11-06 11:04:00 UTC (rev 1636)
+++ izpack-src/trunk/Versions.txt	2006-11-06 11:10:39 UTC (rev 1637)
@@ -4,6 +4,8 @@
 - Added docu: executeForPack, executeclass,logfiledir  for ProcessPanel (Fabrice Mirabile)
 - Added docu: createForUnselectedPack for UserInputPanel (Fabrice Mirabile)
 - Added DataCheckPanel (Fabrice Mirabile & Hal Vaughan)
+- Bugfix at using OS dependant panels; dtd adapted to implementation of it
+  (Klaus Bartz, thanks to Francois Guillet).
 
 
   > 3.9.0 (build 2006.09.25)

Modified: izpack-src/trunk/src/dtd/installation.dtd
===================================================================
--- izpack-src/trunk/src/dtd/installation.dtd	2006-11-06 11:04:00 UTC (rev 1636)
+++ izpack-src/trunk/src/dtd/installation.dtd	2006-11-06 11:10:39 UTC (rev 1637)
@@ -83,7 +83,8 @@
 
 <!-- The panels section (indicates the panels to use) -->
 <!ELEMENT panels (panel+)>
-    <!ELEMENT panel EMPTY>
+    <!ELEMENT panel (os*)>
+        <!ATTLIST panel os (unix|windows|mac) #IMPLIED>
         <!ATTLIST panel classname CDATA #REQUIRED>
 
 <!-- The listener section (indicates which listener where to use) -->
@@ -101,7 +102,7 @@
         <!ATTLIST pack id CDATA #IMPLIED>
         <!ATTLIST pack required (yes|no) #REQUIRED>
         <!ATTLIST pack preselected (yes|no) "yes">
-        <!ATTLIST pack os CDATA #IMPLIED>
+        <!ATTLIST pack os (unix|windows|mac) #IMPLIED>
         <!ATTLIST pack loose (true|false) "false">
         <!ATTLIST pack group CDATA #IMPLIED>
         <!ATTLIST pack installGroups CDATA #IMPLIED>

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/installer/InstallerFrame.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/installer/InstallerFrame.java	2006-11-06 11:04:00 UTC (rev 1636)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/installer/InstallerFrame.java	2006-11-06 11:10:39 UTC (rev 1637)
@@ -227,12 +227,13 @@
         // We load each of them
         int curVisPanelNumber = 0;
         int lastVis = 0;
+        int count = 0;
         for (i = 0; i < size; i++)
         {
             // We add the panel
             Panel p = (Panel) panelsOrder.get(i);
-
-            if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints)) continue;
+            if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints))
+                    continue;
             className = p.className;
             String praefix = "com.izforge.izpack.panels.";
             if (className.indexOf('.') > -1)
@@ -244,19 +245,19 @@
             panel = (IzPanel) object;
             installdata.panels.add(panel);
             if (panel.isHidden())
-                visiblePanelMapping.add(i, new Integer(-1));
+                visiblePanelMapping.add(count, new Integer(-1));
             else
             {
-                visiblePanelMapping.add(i, new Integer(curVisPanelNumber));
+                visiblePanelMapping.add(count, new Integer(curVisPanelNumber));
                 curVisPanelNumber++;
-                lastVis = i;
+                lastVis = count;
             }
-
+            count++;
             // We add the XML data panel root
             XMLElement panelRoot = new XMLElement(className);
             installdata.xmlData.addChild(panelRoot);
         }
-        visiblePanelMapping.add(i,new Integer(lastVis));
+        visiblePanelMapping.add(count,new Integer(lastVis));
     }
 
     /**




More information about the izpack-changes mailing list