Hello Marc,
In my installer I create an hidden panel to check for a folder existence, in order to create your hidden panel you have to create a class that extends IzPanel, create the construtor and implement the method panelActivate() in this method you put the code for the folder verficiation.
For example my hidden panel class is the following:
package com.izforge.izpack.panels;
import java.io.File;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.regex.PatternSyntaxException;
import javax.swing.JOptionPane;
import javax.swing.text.html.HTMLDocument.Iterator;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.InstallData;
import com.izforge.izpack.installer.InstallerFrame;
import com.izforge.izpack.installer.IzPanel;
import com.izforge.izpack.rules.Condition;
import com.izforge.izpack.rules.RulesEngine;
import com.izforge.izpack.rules.VariableCondition;
import com.izforge.izpack.util.Log;
public class HiddenVerificaDestInstExistente extends IzPanel {
/**
*
*/
private static final long serialVersionUID = -958836933316524279L;
//default constructor
public HiddenVerificaDestInstExistente(InstallerFrame parent,
InstallData idata) {
super(parent, idata);
}
//Verification
public void panelActivate() {
//Folder to chek
File fcaminhoInstalacao=new File("c:\\example_folder")
//if that folder exists put a variable to true and create a variable condition of that variable else put the variable to false and create //and set the condtition to false
if(fcaminhoInstalacao.exists()){
idata.setVariable("existe", "true");
cond.setId("i2sexiste");
cond.setVariablename("existe");
cond.setValue("true");
idata.getRules().addCondition(cond);
}
else{
idata.setVariable("existe", "false");
cond.setId("i2sexiste");
cond.setVariablename("existe");
cond.setValue("true");
idata.getRules().addCondition(cond);
}
parent.skipPanel();
}
}
Now the final part in your xml specification you need to create the following var:<variable name="existe" value="false"/>, be aware that this hidden panel won't be executed in console mode.
About that hidden pack that you talk the only thing i know is that you have an attribute in the pack tag that puts the panel invisible to the user, but if you have a treepackspanel this would result in error, because treepackspanel have the following bug:
http://jira.codehaus.org/browse/IZPACK-461.
I am sorry that i couldn't help more
Best regards
Ricardo Cardoso