Patch projects.
Posted: Mon Feb 23, 2009 5:37 am
I used the patch white paper as the template for creating my patch sample and I created four text files on my desktop called A.txt through D.txt. In my project I first added files A and B. I built the project using Web Deploy and selected the output folder and copied the two files TextFiles.exe and text files.7zip into a new folder on my desktop called Version 1. I then added file C.txt to my project. Again, I built the project using Web Deploy and copied the new TextFiles.exe and text files.7zip to a new folder on my desktop called Version 2. I then did the same for D.txt and copied the files to Version 3.
I ran each of the TextFiles.exe in turn and the usual uninstall occurred first and then the normal installation followed. I verified that my Program Files folder contained (Version 1) A and B, (Version 2) A, B, and C, and (Version 3) A, B, C, and D. So each setup program installed the right files. I then uninstalled everything and reinstalled only Version 1 to install the original files A and B only. I then turned my attention to doing the patches and it is here that I’m doing something wrong or missing something.
On the Patches node I added the .exe files for Version 1 and Version 2. This should collectively only install A, B, and C (?). I built the patch and selected the Browse button and ran the executable. What it did was create all files A through D even though the executables I added to the patch only contained A and B, and A through C respectively. In other words it also picked up file D which by now is in the project files but not in the patch executables. Clearly I’m doing something wrong but I’d like some help. I have a suspicion I should be doing things in a different sequence to what I’m doing.
One thing I suspect I might need to do is first build version 1 using files A and B. Then install version 1 as normal. I then introduce file C and build Version 2. I then add version 2 as the first patch to the list. I then build the patch and save the files it produces. Finally I add file D and build Version 3. I then add version 3 to the patch list and build it again. I then save the output files it produces. Does that sound plausible?
What I’m hoping to achieve is that when I run Version 1 it installs A and B. When I run the first patch (Version 2) that should install only file C as nothing has changed in files A and B. Finally, when I run the patch for Version 3 that would create file D only as neither A through C have changed. Then, if I edit A, C, and D as Version 4 and add that to the patch list, build and save the files then installing it will install the changed files for A, C and D but nothing will change for file B.
My apologies for such a long post and I hope it sort of makes sense as to what I think patching should achieve. I’d appreciate any help or clarity if I’ve misunderstood what I think it should all be doing.
I ran each of the TextFiles.exe in turn and the usual uninstall occurred first and then the normal installation followed. I verified that my Program Files folder contained (Version 1) A and B, (Version 2) A, B, and C, and (Version 3) A, B, C, and D. So each setup program installed the right files. I then uninstalled everything and reinstalled only Version 1 to install the original files A and B only. I then turned my attention to doing the patches and it is here that I’m doing something wrong or missing something.
On the Patches node I added the .exe files for Version 1 and Version 2. This should collectively only install A, B, and C (?). I built the patch and selected the Browse button and ran the executable. What it did was create all files A through D even though the executables I added to the patch only contained A and B, and A through C respectively. In other words it also picked up file D which by now is in the project files but not in the patch executables. Clearly I’m doing something wrong but I’d like some help. I have a suspicion I should be doing things in a different sequence to what I’m doing.
One thing I suspect I might need to do is first build version 1 using files A and B. Then install version 1 as normal. I then introduce file C and build Version 2. I then add version 2 as the first patch to the list. I then build the patch and save the files it produces. Finally I add file D and build Version 3. I then add version 3 to the patch list and build it again. I then save the output files it produces. Does that sound plausible?
What I’m hoping to achieve is that when I run Version 1 it installs A and B. When I run the first patch (Version 2) that should install only file C as nothing has changed in files A and B. Finally, when I run the patch for Version 3 that would create file D only as neither A through C have changed. Then, if I edit A, C, and D as Version 4 and add that to the patch list, build and save the files then installing it will install the changed files for A, C and D but nothing will change for file B.
My apologies for such a long post and I hope it sort of makes sense as to what I think patching should achieve. I’d appreciate any help or clarity if I’ve misunderstood what I think it should all be doing.