Solved

Some questions regarding IZPack

Posted on 2006-07-12
3
842 Views
Last Modified: 2012-08-13
Hi guys,

From the IZPack documentation:

The Packs Element <packs>
This is a crucial section as it is used to specify the files that need to be installed. The <packs> section consists of several <pack> tags.
The <pack> takes the following attributes :
    * name: the pack name
    * required: takes yes or no and specifies whether the pack is optional or not.
    * os: optional attribute that lets you make the pack targeted to a specific operating system, for instance unix, mac and so on.
    * preselected: optional attribute that lets you choose whether the pack is by default selected for installation or not. Possible values are yes and no. A pack which is not preselected needs to be explicitly selected by the user during installation to get installed.
    * loose: can be used so that the files are not located in the installer Jar. The possible values are true or false, the default beeing false. The author of this feature needed to put his application on a CD so that the users could run it directly from this media. However, he also wanted to offer them the possibility to install the software localy. Enabling this feature will make IzPack take the files on disk instead of from the installer. Please make sure that your relative files paths are correct !
    * id: this attribute is used to give a unique id to the pack to be used for internationalization.

I'm interested in using the 'loose' attribute. We have an app that uses MSDE. So I've created an installer that will install our app and then install MSDE. In my xml file I've specified this pack:

<pack name="MSDE 2000" required="no">
      <description>The MS SQL Server app</description>
      <file src="server" targetdir="$INSTALL_PATH" loose="true"/>
      <executable targetfile="$INSTALL_PATH/server/setup.exe" stage="postinstall"/>
</pack>

But this file is still compiled into the jar file. Am I doing something wrong, or did I misunderstand this?

Then the other question is how do I specify the default installation folder?
0
Comment
Question by:riaancornelius
3 Comments
 
LVL 9

Author Comment

by:riaancornelius
Comment Utility
First part was wrong. Loose should be specified for the pack, not the file. Like this:

<pack name="MSDE 2000" required="no" loose="true">
     <description>The MS SQL Server app</description>
     <file src="server" targetdir="$INSTALL_PATH"/>
     <executable targetfile="$INSTALL_PATH/server/setup.exe" stage="postinstall"/>
</pack>

And as to how you specify the default installation path:
In your resources add a resource like this:
<res id="TargetPanel.dir.windows" src="defaultPath.txt"/>

and then add a text file called "defaultPath.txt" in your installation with a single line specifying the path. like:
c:\Program Files\MyCompany\Your app name
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
Comment Utility
Closed, 500 points refunded.
Netminder
Site Admin
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now