[izpack-devel] Enhancements and fix to ShortcutPanel...

Markus Schlegel markus.schlegel at pulinco.com
Mon Jan 8 20:46:38 CET 2007


Hi all
 
Attached a patch (against the current trunk) for ShortcutPanel that does
the following:
 
1. Supports "installGroup"-Attribute for the <programGroup> Element of
the shortcutSpec.xml.
InstallGroups are used with Packs already. I have now implemented
support for the Shortcut:
Former, only one ProgramGroup could be defined in the shortcutSpec. With
my change, you can define a different ProgramGroup for each
InstallGroup.
This allows to deliver a group of applications (sharing the same
codebase) in one installer, where the user chooses the application to
install by selecting an InstallGroup. Each Application's Shortcuts can
then be installed into its own ProgramGroup.

Example of shortcutSpec.xml:
<shortcuts>
  <skipIfNotSupported />
  <programGroup installGroup="Client" defaultName="Vendor\Client 6.1"
location="applications"/>
  <programGroup installGroup="Server" defaultName="Vendor\Server 6.1"
location="applications"/>
  <programGroup installGroup="Admin"  defaultName="Vendor\Server
Administrator 6.1" location="applications"/>
  <shortcut
     name="Client"
     programGroup="yes"
     desktop="no"
     applications="no"
     startMenu="no"
     startup="no"
     target="$INSTALL_PATH\client.exe"
     commandLine=""
     description="Client Application"
     iconFile="$INSTALL_PATH\client.exe"
     iconIndex="0"
     initialState="normal">
     <createForPack name="Client Base"/>
   </shortcut>
  <shortcut
     name="Server Administrator"
     programGroup="yes"
     desktop="no"
     applications="no"
     startMenu="no"
     startup="no"
     target="$INSTALL_PATH\Server Administrator.exe"
     commandLine=""
     description="Server Administrator"
     iconFile="$INSTALL_PATH\Server Administrator.exe"
     iconIndex="0"
     initialState="normal">
   
     <createForPack name="Admin Base"/>
   </shortcut>
....

2. Late creation of shortcuts. Up to now, ShortcutPanel immediately
creates the shortcuts when the user presses "next". 
This is ok, if the ShortcutPanel is placed after the InstallationPanel.
But it's not ok if it is placed before.
Normally (in most other installers) it's common to place that panel
before any installation takes place (ask all questions first, then run
the installation). While it's possible to create the Shortcuts before
the files are installed, it takes a long time to do so (we create 4
Shortcuts and it takes 5-8 seconds). The reason for this is, that the
Shortcut creation checks for file existence, which in turn has
relatively long timeouts for non existent files.

I have now implemented a "hook" in ShortcutPanel that enables an
InstallerListener (see "LateShortcutInstallListener.java") to create the
Shortcuts lately. This solution requires a minimum impact into the code.

3. Fix a bug (this one was on the bugtracking system on Berlios too ;-),
where each Shortcut-Subgroup influenced the remaining Shortcut creation,
because the class member was altered during the loop...

Regards
 
Markus Schlegel
Dipl. Ing. Wirtschaftsinformatik HTL,
Senior Software Engineer
__________________________________________
pulinco
Webergutstrasse 4
CH-3052 Zollikofen, Switzerland

Phone: +41 31 910 44 44
Fax:     +41 31 910 44 49
Email: mailto:markus.schlegel at pulinco.com
<blocked::mailto:markus.schlegel at pulinco.com> 
Web:     http://www.pulinco.com <blocked::http://www.pulinco.com/> 

*** pulinco - sustainable added value as an objective ***

>> CONTROL YOUR BUSINESS WITH TopEase(r) <<

*** email DISCLAIMER **************************************
The information contained in this email and any of its attachments
is intended solely for the addressee and may contain confidential,
proprietary or legally privileged material. Access to this email by
anyone else than the addressee is unauthorized. If you are not the
intended recipient, any form of disclosure, reproduction, distribution
or other use of, or any action taken or refrained from in reliance
on it, is prohibited and may be unlawful. Please notify the sender
immediately and destroy the email and its attachments from any
computer.
*************************************************************
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: LateShortcutInstallListener.txt
Url: https://lists.berlios.de/pipermail/izpack-devel/attachments/20070108/dd858059/attachment.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ShortcutPanel_patch_trunk.txt
Url: https://lists.berlios.de/pipermail/izpack-devel/attachments/20070108/dd858059/attachment-0001.txt 


More information about the izpack-devel mailing list