There are a number of ways to version a product.  While necessary for patching 
to work correctly, there's no one method that is best for all circumstances.

There are two common patching strategies:  patching all diffs; and patching 
only selected diffs.  Referencing the Component through a ComponentRef is an 
example of the latter.

The Media@Id is arbitrarily set.  It just needs to be larger than the last Id 
used in either the target or upgrade MSI.  So, in this case, it could have been 
very significantly smaller than 5000 (probably 10 or 100 would have worked 
fine).

The PatchFamily@Version has more to do with superceding patches and patch 
ordering.  I've also seen authoring where this has gone up for each patch from 
1 to 2 to 3 and so forth.

For a slightly different technique, take a look at:

http://borgsdemons.com/blog/2014/07/11/yet-more-improve-wix-way-patch-project-with-burn-bootstrapper/
 

--
John Merryweather Cooper
Senior Software Engineer | Enterprise Service Applications | Continuing 
Development
Jack Henry & Associates, Inc.® | Lenexa, KS  66214 | Ext:  431050 
|jocoo...@jackhenry.com



-----Original Message-----
From: R. Brunhuber [mailto:w...@rbrunhuber.de] 
Sent: Monday, October 13, 2014 8:34 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Is the documentation about patching using purely wix 
correct and some questions?

Hello,

today tried to create patches according to the documentation on [1] and some 
points don't look correct or aren't clear to me:

1. The Product.wxs on the page has no variable defined to take the Version 
passed on the commandline. So instead of:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
    <Product Id="48C49ACE-90CF-4161-9C6E-9162115A54DD"
        Name="WiX Patch Example Product"
        Language="1033"
        Version="1.0.0"
        Manufacturer="Dynamo Corporation"
        UpgradeCode="48C49ACE-90CF-4161-9C6E-9162115A54DD">
...

I expected to see something like this:

<?ifndef Version?>
        <?define Version="1.0.0"?>
<?endif?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
    <Product Id="48C49ACE-90CF-4161-9C6E-9162115A54DD"
        Name="WiX Patch Example Product"
        Language="1033"
        Version="$(var.Version)"
        Manufacturer="Dynamo Corporation"
        UpgradeCode="48C49ACE-90CF-4161-9C6E-9162115A54DD">

If I look in the properties table of both the 1.0/product.msi and the 
1.1/product.msi I see Version=1.0.0 while using the first snippet. If I use the 
latter mark-up the version changes (to 1.0 or 1.1).
If I use the patch created from the msis with the former markup the version int 
ARP stays on 1.0.0 after the installation of the patch, with the latter markup 
it changes to 1.1.

2. The Patch.wxs has a <ComponentRef Id="SampleComponent"/> referencing the 
component of the original 1.0 msi. Is this really necessary, because it does 
not seem to matter in any way:
If it exists the file gets patched, if it does not exist the file gets patched 
also. Even if I extend the Product.wxs by a second component and file both get 
patched no matter if both, one or none of the original components are 
referenced.

3. The Media/@Id is 5000. Why is the id this high? If I use the MediaTemplate 
in my original msi can this really create up to 4999 media? I've read on a 
blog, that the Media/@Id on subsequent patches has to be higher than the than 
the Media/@Id + number of patched files in the first patches. Is this correct? 
What is the upper bound for Media/@Id? Can I just add 100 or even 1000 per 
patch?

4. The version in the PatchFamily/@Version in the example is 1.0.0.0 although 
the patch is intended to update version 1.0 to 1.1. Will the version always be 
1.0.0.0 if it is the first patch to update a "baseversion" to a patched version 
or does it align with the version of the msi to patch or the version of the 
patch (and thus would be incorrect in the example)?

As we all know patching with msi (and/or WiX) is not easy, so I'd love to see 
the documentation on this matter to be as clear as possible. I'd even volunteer 
to update the documentation with your input.

Thanks in advance.

Robert


[1] http://wixtoolset.org/documentation/manual/v3/patching/wix_patching.html

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
NOTICE: This electronic mail message and any files transmitted with it are 
intended
exclusively for the individual or entity to which it is addressed. The message, 
together with any attachment, may contain confidential and/or privileged 
information.
Any unauthorized review, use, printing, saving, copying, disclosure or 
distribution 
is strictly prohibited. If you have received this message in error, please 
immediately advise the sender by reply email and delete all copies.


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to