Solved

Some questions regarding IZPack

Posted on 2006-07-12
3
850 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
micro services vs rest web services 16 103
servlet  URL Rewriting 1 36
Unhandled exception type Exception 18 28
Java: anonymous class 4 16
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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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 theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

813 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

11 Experts available now in Live!

Get 1:1 Help Now