Patch seems to have a bug - or is it me?

Got a problem you cannot solve? Try here.
JohnO
Posts: 127
Joined: Tue Jun 18, 2013 9:52 am

Patch seems to have a bug - or is it me?

Postby JohnO » Wed Jul 31, 2013 10:18 am

I followed the steps in Patching pdf, in order to experiment with creating a simple patch for my application. It's a Web-deployed app with selectable features.
What I did was to copy one of the reference files (in the location that IA gets its files from) - so it was named "<file-name> - Copy.xyz".
Then I went through the build process for the patch, and it created a small exe file in a Patch sub-folder in the directory it normally generates to. I copied this to my web server, downloaded it, and opened it.

All seemed to be going well, until I got an error dialog saying that it could not find the path specified, and gave the path for the file that is being added. Of course it could not find that file, as it isn't supposed to exist - the whole point of the patch is to add it.

Can you help?

It would be very helpful if the Patching pdf file could go one step further, to show the result of pressing the Browse button, and describe what should be done with the resulting patch file. AND, that a new installer has also been created with the changes in it. It wasn't until a bit later, when the penny dropped - of course, a patch has to create a new installer for people who haven't installed the app yet. I made the mistake of trying to install this file, but stopped because it seemed to be a new install, but I remained puzzled until my brain became engaged!

My next step is to investigate the update mechanism. Can you tell me in advance, would this mechanism be able to detect the presence of a patch?

Regards, John

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Patch seems to have a bug - or is it me?

Postby FrancescoT » Wed Jul 31, 2013 11:08 am

Dear John,

Please take a look at the following topic where a ready to use sample is available;
http://www.installaware.com/forum/viewtopic.php?f=2&t=9343

My next step is to investigate the update mechanism. Can you tell me in advance, would this mechanism be able to detect the presence of a patch

Do you mean if the IA WEB UPDATE functionality can delivery patch update?
If true, yes of course. The IA documentation includes a detailed description on how Web Update works.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

JohnO
Posts: 127
Joined: Tue Jun 18, 2013 9:52 am

Re: Patch seems to have a bug - or is it me?

Postby JohnO » Wed Jul 31, 2013 3:27 pm

Francesco
I read the forum link. I think I had managed to come to the same conclusions after my initial attempts. For a patch, nothing about the project's version info should change - it is an incremental change to that version. The most common changes I would expect to be in the contents of the folders that form the source of the files referenced in the Files view.

That is where I made a simple change: we have a lot of reference models in xml files, that provide examples for new users of our product. I made a copy of one of these files, so that one folder now had 3 files, where it used to have 2. So, my patch ought to consist of just one file, that is destined to be added to that folder in the installed product.

I have also been through an initial attempt to create a manual update, using the patch as the change. Applying the patch via the update mechanism, didn't throw up any errors and completed normally. Unfortunately, the new file was not found in the folder where it should have been placed - only the two original files were present.

I tried applying the patch directly via the web server, and this produced the same 'file not found' error.

I think I know what the problem is - the extra file was not included in the exe file created for the patch. The error message is misleading - it's clear to me that it means "I can't find the file that I want to create in this target folder" (what it actually says is "I can't find the file in the target folder" - so that needs correcting).

The question is: why isn't the extra file, included in the exe file for the patch - all that is there is the reference to its target.

I have un-installed and installed the app several times; rebuilt the installer and the patch. Nothing changes.

Regards, John

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Patch seems to have a bug - or is it me?

Postby FrancescoT » Thu Aug 01, 2013 4:53 am

Dear John,

I suppose the problem you are having, it could be caused "probably" by the file "type" handled by your patch.

The Windows Installer Engine prefers files where version attributes are available and in some circumstances when these are not available, the Windows Installer Engine may have difficulty to handle file differences correctly.

In addition, a patch build produces a setup package that contains only the binary differences between the two projects.
Also consider, that the MSI engine keeps track of each project file using a unique internal identifier.

If you add a folder which contains several files or even sub-folders, the MSI may have problems to produce a unique internal identifier correctly.
In other words, the MSI engine prefers that each file that have to be installed, it is treated individually (this is the recommended way).

This problem doesn't exist with standard package installation but patch builds are different.
For example with patches, the MSI engine may have difficulty to correctly identify files that are installed by folder ( using wildcard (*.*) ... expecially if these do not include the version attribute).

Starting from IA 11 it is possible to force the MSI database stability and integrity using the "Power Tweaks" settings.

I may suggest you to try with the following steps in order to apply "Power Tweaks" settings to your projects.
Very probably this can solve the issue you seem to have.

1- Select Power Tweaks view from "Deployment" node (... available when selecting "Design" tab in IA IDE).

2- Once Power Tweaks view is displayed, select Automatic Settings tab, check "Use my preference emphasizing" control, then move the slider towards to Integrity.

3- Confirm the settings with "apply" button.

4- Rebuild your project


The Integrity settings assure the maximum portability integrity with your setup packages.
This is very useful with patch project, in order to skip possible MSI engine file fault during patch generation and execution.

The above settings must be applied with any project involved with your patch (base and patch projects).

For more detailed information, please refer to "Power Tweaks" in InstallAAware documentation.

Please remember also that ... patch build must be used for minimal modifications only.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

JohnO
Posts: 127
Joined: Tue Jun 18, 2013 9:52 am

Re: Patch seems to have a bug - or is it me?

Postby JohnO » Thu Aug 01, 2013 3:36 pm

Francesco
Thank you very much for a detailed reply, as ever. I will follow your suggestions and see what happens.
I understand your point about a patch being minimal - which is how I would expect to use it in real life. Which is why I thought the addition of an xml reference file would represent such a condition. I guess, I could try changing one of the two files in that folder first, just to see how that behaves. Our files don't have any version info - just XML content, edited in Wordpad, Notepad++ or saved by Java code in the app. In fact, I've always wondered how files get version info, as I have never noticed any in a file's Properties.

As it happens, if we'd had a decent installer like IA for our current version, a patch where 11 ref files were changed slightly would have allowed us to get a new customer's education working much sooner.

Regards, John


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 32 guests