R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Building Patches and Patch Hierarchy

Hi Forum!

After some time struggling with patches I am quite confused now.

Here is my situation: Based of an installation with our main installer, I want to patch it later to a newer version. Hence I need to test this now. The main goal is, to deliver small patches to the client, which are installable without UAC prompt (for that I already found out what is LUA patching and howto enable it ...).

First I created an AI project, containing 3 different build types (Client, Server and a special Viewer output type). Except the Viewer, all output types are 32-/64-bit mixed packages. The Viewer is 32-Bit only and can be skipped for this task. Then I found out, that I can't use merge modules or synchronized folders for the installer, because they would confuse the file sequence numbers and avoid proper patching (nice to get this known at this point, it costs me some time to work around that). After reading through some manuals and guides from both AI and MS web sites, I still a little bit confused by the patch and howto author and do patching in general. Needless to say, that later all packages later needs to be created automatically by the build server.

Lets assume, that I start from version 11.0.1 of the product (this is the target version). This gets installed with one of the installer of the main project mentioned above. Then I want to patch this program to version 11.0.2 (this is the upgraded version). Hence I create a new patch project, add under "Images" a new family with some name, then the new upgraded image 11.0.2 and then the target image 11.0.1. This seems to be correct and I am able to update with the resulting patch 11.0.2.msp one of the build outputs of the main project.

My questions are starting with some rarely documented options of the patch project. What e.g. means:
  • * Patch Details --> Patches to replace: Do I have to replace every previous patch?
    * Images -> Family: For what are families are useful?
    * Images -> Family -> Media Property Name, Disk, ID, File Sequence Start: Do I have to touch this? What is this useful for?
    * Images -> Upgraded -> Patch Package: What is this for?
    * Patch Sequence: For what is this being used?
    * Media -> Patch Source List: What is this for?
Furthermore another open question is, how do I handle the upcoming update to 11.0.3, 11.0.4, 11.0.5, ... ? Do I need to add the new upgraded image for each version again with the same target images including all previous versions? How can I automate this?

Is it possible to add additional install conditions?

And finally: Do I need to create an individual patch package for each of the 4 major msi packages, I get with above mentioned main installer (server+client, x86+x64)?

I have seen in Orca, that each patch has also its own Patch Code (like the package code for msi packages). Can I reuse the same project file for all upcoming patches and just update it to the latest version, or is this not a recommended way to use it?

I know, these are a lot of questions, thanks for helping anyway!

Regards,

RM
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Building Patches and Patch Hierarchy

Hello,
* Patch Details --> Patches to replace: Do I have to replace every previous patch?
No, there is no need to do that. You can use the above section only if you want to remove specific patches when the current patch is updated.
* Images -> Family: For what are families are useful?
A patch family it is used to identify multiple patches which can apply to the same product. You can take a look on "Multiple Patching Example (Windows)" article which should be useful for you.
* Images -> Family -> Media Property Name, Disk, ID, File Sequence Start: Do I have to touch this? What is this useful for?
In the "Media Property Name" field you can use a custom property name (e.g MY_PROP) which can be used to condition a custom action to run only when the patch is applied (i.e. when the MY_PROP property is set).
The "Disk Id" and "File Sequence Start" fields will be set in the "DiskId" and "LastSequence" colums from "Media" table. They are set by default by Advanced Installer so you don't need to edit them.
* Images -> Upgraded -> Patch Package: What is this for?
In this field you can add a modified copy of your upgraded package. It is useful when you want to include in your patch some extra minor information. For example, you want to create a patch to include a property which is not in your upgraded package and which you don't want to include in the upgraded package. For this you can create a copy of your upgraded package (containing the extra property) and add the built package in the above field. In this way the created patch will include the extra property (defined in the copy of your upgraded project package) without modifying the original upgraded project.
* Patch Sequence: For what is this being used?
You can take a look on "PatchSequence Table" article.
* Media -> Patch Source List: What is this for?
This contains a list of sources which will be used to locate the .msp file of the patch when the locally cached copy is unavailable.
Furthermore another open question is, how do I handle the upcoming update to 11.0.3, 11.0.4, 11.0.5, ... ? Do I need to add the new upgraded image for each version again with the same target images including all previous versions? How can I automate this?
Yes, you can add a new upgraded image for each of your upgraded version (which can be applied to more target versions). Also, you can use our patch commands line support.
Is it possible to add additional install conditions?
I'm afraid I don't fully understand what you mean. Can you please give us more details about this (maybe exemplify)?
And finally: Do I need to create an individual patch package for each of the 4 major msi packages, I get with above mentioned main installer (server+client, x86+x64)?
Yes, you should create a separate patch project for each of your MSI packages.
I have seen in Orca, that each patch has also its own Patch Code (like the package code for msi packages). Can I reuse the same project file for all upcoming patches and just update it to the latest version, or is this not a recommended way to use it?
Yes, you should be able to achieve this. A different patch code will be generated every time you build the patch project.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”