Use the "Unattended Installations Using Properties" with some problems

757 views
Skip to first unread message

crazyli...@gmail.com

unread,
May 17, 2017, 3:58:56 AM5/17/17
to izpack-user
Hi,

       When i execute the  command line :
java -jar myinstaller.jar -options-template myinstaller.properties

 with my project the  properties file template  is  "installer.properties".

that is to say only one property name is generated.  why?     And if i want to use more , how can i do ?

and  try this as follows:
java -jar <installer_jar_file> -defaults-file <defaults_file> [-auto]

I provide some  key-value pairs to override the built-in defaults in the <defaults_file> , but it seems that only the key-value  "INSTALL_PATH"  works ! 

Maybe i have try something wrong , can you give some examples of  defaults_file about  the key-value pairs.  For example, I want to create a desktop shortcut when installing , how can i do with <defaults_file>


     Thank you very much ! 

      Yang



René Krell

unread,
May 17, 2017, 5:27:53 AM5/17/17
to izpack-user
Hi,

since I'm absolutely sure the -defaults-file option works very well (me and other well-known people use it almost every day) it would be nice of you to provide a particular example with source code.

Thanks,
René



Dne středa 17. května 2017 9:58:56 UTC+2 crazyliyang128 napsal(a):
Message has been deleted

crazyli...@gmail.com

unread,
May 18, 2017, 3:13:46 AM5/18/17
to izpack-user
Hi René,

   thank u  for your precious time to help me ,this is a part of my install.xml 
<variables>
<variable name="DesktopShortcutCheckboxEnabled" value="true" />
</variables>
<panels>
<panel classname="CheckedHelloPanel" />
<panel classname="LicencePanel" />
<panel classname="TargetPanel" />
<panel classname="PacksPanel" />
<panel classname="InstallPanel" />
<panel classname="ShortcutPanel" />
<!-- <panel classname="SimpleFinishPanel" /> -->
<panel classname="FinishPanel" />
</panels>
I have run  the installation once on my machine and save the automatic installation data in auto-install.xml.  then i use the auto-install.xml for other automatic installation, it works very well  !
and this  is my auto-install.xml 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<AutomatedInstallation langpack="eng">
<com.izforge.izpack.panels.checkedhello.CheckedHelloPanel id="CheckedHelloPanel_0"/>
<com.izforge.izpack.panels.licence.LicencePanel id="LicencePanel_1"/>
<com.izforge.izpack.panels.target.TargetPanel id="TargetPanel_2">
<installpath>E:\myapp-path1</installpath>
</com.izforge.izpack.panels.target.TargetPanel>
<com.izforge.izpack.panels.packs.PacksPanel id="PacksPanel_3">
<pack index="0" name="Myapp Core" selected="true"/>
<pack index="1" name="User Manual" selected="true"/>
</com.izforge.izpack.panels.packs.PacksPanel>
<com.izforge.izpack.panels.install.InstallPanel id="InstallPanel_4"/>
<com.izforge.izpack.panels.shortcut.ShortcutPanel id="ShortcutPanel_5">
<createMenuShortcuts>true</createMenuShortcuts>
<createDesktopShortcuts>true</createDesktopShortcuts>
<createStartupShortcuts>true</createStartupShortcuts>
<shortcutType>all</shortcutType>
</com.izforge.izpack.panels.shortcut.ShortcutPanel>
<com.izforge.izpack.panels.finish.FinishPanel id="FinishPanel_6"/>
</AutomatedInstallation>

Now i want to use Mixed Installation Mode Using Variable Defaults , i expect to select the packs to be installed , and I want to create a desktop shortcut when automatic installing; how can i edit the <defaults_file> ? 
It seems that  i have try something wrong, this is my defaults_file :

#IzPack 5.1.0
INSTALL_PATH=E:\\myapp-path1
DesktopShortcutCheckboxEnabled=true
createDesktopShortcuts=true
createMenuShortcuts=true
APP_NAME=myapp_yang
InstallerFrame.logfilePath=E:\\myapp-path1

it's very nice of you to help me 

thanks.
Yang



René Krell

unread,
May 18, 2017, 4:16:48 AM5/18/17
to izpack-user
Hi Yang,

that's it - the "mixed mode" isn't any equivalent to the auto-install.xml.
The defaults files just override IzPack variables, nothing else at the moment, since the values in auto-install.xml are explicit identifiers as part of each panel implementation. The meaning is completely different.

BTW, you must not mix both installation modes, but decide which one to use.

There is one inconvenience regarding the PacksPanel - at the moment just all packs selected by default are installed in mixed mode. You cannot choose single packs, because they are not based on variables. This got to be still implemented (some special PacksPanel variables to decide the selection upon).

René


Dne čtvrtek 18. května 2017 9:13:46 UTC+2 crazyliyang128 napsal(a):
Message has been deleted

crazyli...@gmail.com

unread,
May 18, 2017, 5:11:03 AM5/18/17
to izpack-user
Hi René:

I think I have a new understanding of Izpack, thank you . In my current understanding, defaults files just override IzPack variables, and the variables are only those as follows? 
$INSTALL_PATH:
$INSTALL_DRIVE:
$APPLICATIONS_DEFAULT_ROOT:
$JAVA_HOME:
$CLASS_PATH:
$USER_HOME:
$USER_NAME:
$APP_NAME:
$APP_URL:
$APP_VER:
$ISO2_LANG:
$ISO3_LANG: .
$IP_ADDRESS: .
$HOST_NAME:
$FILE_SEPARATOR:
$TargetPanel.dir:
$DesktopShortcutCheckboxEnabled
$InstallerFrame.logfilePath:

If I define variables in install.xml , could they be override by defaults files ?

<variables>
<variable name="DesktopShortcutCheckboxEnabled" value="true" />
<variable name="CreateDesktopShortcuts" value="true" />
<variable name="CreateMenuShortcuts>true" value="true" />
</variables>

 I use the "Mixed Installation Mode Using Variable Defaults"  installation modes; 

thanks 
Yang


René Krell

unread,
May 18, 2017, 7:46:21 AM5/18/17
to izpack-user
Not exactly. Izpack variables to be overridden in the defaullts file is preferably all what you define in
- the <variables> section
- the <dynamicvariables> section
- as user input variables in UserInputSpec.xml for each field.
- INSTALL_PATH as special variable set by TargetPanel.

Override other built-in variables hasn't been tested and their values might change when reaching parts of the implementations setting them.

René


Dne čtvrtek 18. května 2017 11:11:03 UTC+2 Yang Li napsal(a):

René Krell

unread,
May 18, 2017, 7:48:45 AM5/18/17
to izpack-user
BTW, a good practise is having as much as possible convenient default values for variables built-in to your installer and avoid to set them necessarily from outside in a defaults file. This way your defaults file may be very handy and easy to maintain between the versions of your installer.

René


Dne čtvrtek 18. května 2017 13:46:21 UTC+2 René Krell napsal(a):

Yang Li

unread,
May 18, 2017, 9:44:48 PM5/18/17
to izpack-user
Hi  René:

   Thank you for your help, I will try much more with it . . .
   Izpack is really a great project ,when I finished the things at hands. I will try to learn and study the source code, even though it would be a big challenge .
   

   Thanks again for your !

   Best wishes.
   Yang

Reply all
Reply to author
Forward
0 new messages