[izpack-devel] Bug in InstallerFrame.java, v3.9.0

Bartz, Klaus Klaus.Bartz at coi.de
Mon Nov 6 12:21:13 CET 2006

Hi François,
just checked in the bugfix into trunk.
All access operations to visiblePanelMapping
has to use count instead of i else an installation
with hidden panels will be failed with out of bounds
(of course my installations have hidden panels...).

Additional I have addapted installation.dtd to this
feature. Before it, a validation with an os tag for
panels have to failed, think.

@Fabrice: Hi Fabrice,
fixing this bug I have searched for a docu for this
feature. I have nothing found. At adding of this feature
to cvs before two years only the docu for Packs and OS
where updated, but not for Panels and OS.
Can you look also and if needed add a short docu?



>-----Original Message-----
>From: izpack-devel-bounces at lists.berlios.de
>[mailto:izpack-devel-bounces at lists.berlios.de]On Behalf Of Bartz, Klaus
>Sent: Monday, November 06, 2006 9:13 AM
>To: izpack-devel at lists.berlios.de
>Subject: Re: [izpack-devel] Bug in InstallerFrame.java, v3.9.0
>Hi François,
>thank you for your bug report and fix.
>Normally we need the result of a diff -u. I have
>just made it for me and I am looking what you done.
>In the moment I am not certain wether it alter the visible
>panel counting or not. If so I have to ponder for an other
>I will test it and fix the bug you have reported as soon as
>>-----Original Message-----
>>From: izpack-devel-bounces at lists.berlios.de
>>[mailto:izpack-devel-bounces at lists.berlios.de]On Behalf Of François
>>Sent: Monday, November 06, 2006 7:30 AM
>>To: izpack-devel at lists.berlios.de
>>Subject: [izpack-devel] Bug in InstallerFrame.java, v3.9.0
>>Hi all,
>>I was asked by Julien to report this bug to the izpack-devel mailing
>>While making an installer for both Windows and Linux using 
>>IzPack, I had
>>to resort to OS Specific panels. But having a windows only panel when
>>installing under Linux raised an exception (and vice versa). The point
>>is that OS dependant panels are incorrectly ignored in
>>InstallerFrame.loadPanels(). The error is pretty easy to 
>reproduce so I
>>won't reprint the full error exception trace. I badly need those OS
>>dependant panels (that's one of the major points of a cross-platform
>>installer), so I made a quick fix in the source code. Here is the
>>modified source code for InstallerFrame.loadPanels(). It's a
>>straightforward quick hack which may be a bit crude, but it 
>>allows me to
>>finish the installer for the Art of Illusion project
>>The full InstallerFrame.java code is attached.
>>    private void loadPanels() throws Exception
>>    {
>>        // Initialisation
>>        java.util.List panelsOrder = installdata.panelsOrder;
>>        int i;
>>        int size = panelsOrder.size();
>>        String className;
>>        Class objectClass;
>>        Constructor constructor;
>>        Object object;
>>        IzPanel panel;
>>        Class[] paramsClasses = new Class[2];
>>        paramsClasses[0] =
>>        paramsClasses[1] =
>>        Object[] params = { this, installdata};
>>        // 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 
>>                    continue;
>>            className = p.className;
>>            String praefix = "com.izforge.izpack.panels.";
>>            if (className.indexOf('.') > -1)
>>            // Full qualified class name
>>                praefix = "";
>>            objectClass = Class.forName(praefix + className);
>>            constructor =
>>            object = constructor.newInstance(params);
>>            panel = (IzPanel) object;
>>            installdata.panels.add(panel);
>>            if (panel.isHidden())
>>                visiblePanelMapping.add(i, new Integer(-1));
>>            else
>>            {
>>                visiblePanelMapping.add(count, new
>>                curVisPanelNumber++;
>>                lastVis = count;
>>            }
>>            count++;
>>            // We add the XML data panel root
>>            XMLElement panelRoot = new XMLElement(className);
>>            installdata.xmlData.addChild(panelRoot);
>>        }
>>        visiblePanelMapping.add(count,new Integer(lastVis));
>>    }
>izpack-devel mailing list
>izpack-devel at lists.berlios.de

More information about the izpack-devel mailing list