Message-ID: <1711829282.42060.1371697558125.JavaMail.email@example.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_42059_1397812545.1371697558124" ------=_Part_42059_1397812545.1371697558124 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Since IzPack 5.0
All Windows= systems block executable files that are currently in use, as device driver= s, EXE, DLL and even JAR files. Normally, a running application is to be sh= ut down before such files can be overwritten, for instance by an IzPack ins= taller. This might fit most of the use cases IzPack is used with.
There can be situations where the application cannot be shut down at th= e installation time, but has to be updated anyway. This is where this new f= eature comes into the game.
Microsoft offers a Windows API for handli=
ng such cases:=C2=A0Setup API. F=
rom the view of the pure interface it has been quiet stable over the differ=
ent Windows distributions. Although Microsoft recommends using it only for =
installing device drivers Setup API can be used for any kind of file to be =
installed. Several independent installers which are not based on Windows In=
staller make usage of it. For example, the native=C2=A0NSIS=C2=
=A0installer uses a=C2=A0
/rebootok=C2=A0flag for copying files=
which might be potentially in use.
Here is how blockable file handli= ng is integrated into IzPack:
Lets start with an example of install.x= ml:
xe=C2=A0on the target system is assumed to be potentially running an=
d therefore blocked at installation time, for instance as a system service.=
It might be not convenient to shut it down before installation. Instead, w=
e intend to replace it after the next system reboot.
For this purpose=
we mark the according file as=C2=A0
blockable. The value=C2=A0=
auto=C2=A0means that the OS recognizes automatically whether t=
he file is blocked or not, instead of forcing marking it blocked (using=C2=
force). If it is blocked it will be internally enqueued by =
Windows to be replaced after a system reboot. Otherwise the file is overwri=
tten directly due to the=C2=A0
override=3Dtrue. If we had=C2=A0=
override=3Dfalse=C2=A0and the file would be blocked during ins=
tallation time copying of the file would be skipped as expected.
ce IzPack to ask the user in case of using interactive installers whether t=
he system should be rebooted immediately. The user has the chance to confir=
m or deny the reboot action. Anyway, if there are pending file operations t=
he system has to be rebooted sooner or later to apply the changes that came=
with the installation.
e applies also on the packs elements=C2=A0
code>fileset. For using it there must be included the=C2=A0
upAPI.dll=C2=A0as can be seen above. This library is built-in into I=
Note that if there no explicit constraint for the OS =
windows=C2=A0defined on the according parent e=
none=C2=A0there is a compile=
r warning given to the user:
"blockable" will implicitely a= pply only on Windows target systems
Anyway, it is possible to mark fi=
les as blockable even for multi-platform installations, for instance in cas=
e of blockable jar files. The=C2=A0
ll be simply ignored on non-Windows platforms, resulting in a "classic=
" behaviour for copying files.
For a complete specification of t=
he according elements and attributes see the documentation of=C2=A0
t;rebootaction>=C2=A0in the Header - <info>=C2=A0and the
blockable attribute=C2=A0in one of the elements=C2=A0