Solved

Some questions regarding IZPack

Posted on 2006-07-12
3
848 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
ID: 17120023
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
ID: 17157364
Closed, 500 points refunded.
Netminder
Site Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error with Java/Cache JDBC Classpath 2 31
Java / Linux and Regular Expressions 11 71
jar file executable 12 43
couple of eclipse 5 25
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

895 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

13 Experts available now in Live!

Get 1:1 Help Now