--- src/lib/com/izforge/izpack/compiler/CompilerConfig.java	(revision 2722)
+++ src/lib/com/izforge/izpack/compiler/CompilerConfig.java	(working copy)
@@ -670,6 +670,7 @@
             pack.setParent(parent);
             pack.setCondition(conditionid);
             pack.setHidden(hidden);
+            pack.setVariables(compiler.getVariables());
 
             // unverified
             // if the pack belongs to an excludeGroup it's not preselected by default
--- src/lib/com/izforge/izpack/compiler/PackInfo.java	(revision 2722)
+++ src/lib/com/izforge/izpack/compiler/PackInfo.java	(working copy)
@@ -23,6 +23,7 @@
 
 import com.izforge.izpack.*;
 import com.izforge.izpack.util.OsConstraint;
+import com.izforge.izpack.util.VariableSubstitutor;
 
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -88,6 +89,8 @@
      */
     private List updateChecks = new ArrayList();
 
+    private VariableSubstitutor varsubst = null;
+
     /**
      * Constructor with required info.
      *
@@ -251,7 +254,11 @@
     {
         if (!file.exists())
         {
-            throw new FileNotFoundException(file.toString());
+            if (varsubst == null ||
+                    !(file = new File(varsubst.substitute(file.getAbsolutePath(), null))).exists())
+            {
+                throw new FileNotFoundException(file.toString());
+            }
         }
 
         PackFile packFile = new PackFile(baseDir, file, targetfile, osList, override, additionals);
@@ -386,4 +393,9 @@
     {
         pack.addValidator(validatorClassName);
     }
+
+    public void setVariables(Properties variables)
+    {
+        this.varsubst = new VariableSubstitutor(variables); 
+    }
 }

