jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • IzPack
  • IZPACK-399

Variable substitution does not work for fileset and res elements

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 4.3.0
  • Fix Version/s: None
  • Component/s: Compiler
  • Labels:
    None
  • Environment:
    gentoo linux

Description

<fileset dir="$qtdir/plugins/imageformats" [...] />
does not work, but <file src="$qtdir/lib/libQtCore.so.4" [...] /> does.

<res id="LicencePanel.licence" src="$trunk/LICENSE" [...] />
does not work either.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Christoph Panwinkler added a comment - 26/Jan/10 8:11 AM - edited

also on Windows 7 with variables declared in install.xml

e.g.
<variables>
...
<variable name="JAVA_VERSION" value="1.6.0_17" />
...
</variables>

<pack name="Java Runtime" parent="Core" required="yes">
<fileset dir="jdk-${JAVA_VERSION}" targetdir="${INSTALL_PATH}\jdk">
....
</fileset>
</pack>

Show
Christoph Panwinkler added a comment - 26/Jan/10 8:11 AM - edited also on Windows 7 with variables declared in install.xml e.g. <variables> ... <variable name="JAVA_VERSION" value="1.6.0_17" /> ... </variables> <pack name="Java Runtime" parent="Core" required="yes"> <fileset dir="jdk-${JAVA_VERSION}" targetdir="${INSTALL_PATH}\jdk"> .... </fileset> </pack>
Hide
Permalink
Russell Bolles added a comment - 10/Feb/11 4:18 PM

I found the problem in the source code. Not sure if I'm ready to become a contributor so I'm hoping someone who has their development environment set up will commit this change.

com.izforge.izpack.compiler.CompilerConfig.java
private void addPacksSingle(IXMLElement data) throws CompilerException

Add the marked lines (sorry about the formatting loss):

// We get the fileset list
iter = el.getChildrenNamed("fileset").iterator();
while (iter.hasNext())
{
IXMLElement f = iter.next();
String dir_attr = requireAttribute(f, "dir");

File dir = new File(dir_attr);

if (!dir.isAbsolute())

{ dir = new File(basedir, dir_attr); }

//ADDITION*****************************************************
if (!dir.exists())

{ dir = new File(varsubst.substitute(dir.getAbsolutePath(), null)); // next existance checking appears in pack.addFile }

//ADDITION*****************************************************

if (!dir.isDirectory()) // also tests '.exists()'

{ parseError(f, "Invalid directory 'dir': " + dir_attr); }
Show
Russell Bolles added a comment - 10/Feb/11 4:18 PM I found the problem in the source code. Not sure if I'm ready to become a contributor so I'm hoping someone who has their development environment set up will commit this change. com.izforge.izpack.compiler.CompilerConfig.java private void addPacksSingle(IXMLElement data) throws CompilerException Add the marked lines (sorry about the formatting loss): // We get the fileset list iter = el.getChildrenNamed("fileset").iterator(); while (iter.hasNext()) { IXMLElement f = iter.next(); String dir_attr = requireAttribute(f, "dir"); File dir = new File(dir_attr); if (!dir.isAbsolute()) { dir = new File(basedir, dir_attr); } //ADDITION***************************************************** if (!dir.exists()) { dir = new File(varsubst.substitute(dir.getAbsolutePath(), null)); // next existance checking appears in pack.addFile } //ADDITION***************************************************** if (!dir.isDirectory()) // also tests '.exists()' { parseError(f, "Invalid directory 'dir': " + dir_attr); }

People

  • Assignee:
    Unassigned
    Reporter:
    Sebastian Held
Vote (3)
Watch (4)

Dates

  • Created:
    23/May/09 6:34 AM
    Updated:
    07/Sep/11 3:10 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.