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

Bartz, Klaus Klaus.Bartz at coi.de
Mon Nov 6 09:12:51 CET 2006


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
solution.
I will test it and fix the bug you have reported as soon as
possible.

Cheers

Klaus

>-----Original Message-----
>From: izpack-devel-bounces at lists.berlios.de
>[mailto:izpack-devel-bounces at lists.berlios.de]On Behalf Of François
>Guillet
>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
>list.
>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
>(http://www.artofillusion.org).
>
>The full InstallerFrame.java code is attached.
>
>François.
>
>
>    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] =
>Class.forName("com.izforge.izpack.installer.InstallerFrame");
>        paramsClasses[1] =
>Class.forName("com.izforge.izpack.installer.InstallData");
>        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 (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints))
>                    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 =
>objectClass.getDeclaredConstructor(paramsClasses);
>            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
>Integer(curVisPanelNumber));
>                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));
>    }
>


More information about the izpack-devel mailing list