StefM
Posts: 3
Joined: Thu Jun 13, 2013 4:36 pm

Patch not building properly

I am currently trying to build an installer that will add/update/delete some files. The application itself is about 2GB and I would like to have a patch that is much smaller in size that will only contain these changed files. I thought that the patch .MSP would be the ideal solution, however deleting and adding files bring about errors on the build and the patch doesn't work. When I try to create a major update then I cannot use this .msp patcher and I would have to repack the whole application again. For an application that we plan on updating monthly, this is not ideal. It uses up our bandwidth and the update process is slow for the users. Is there any way to have a Major update installer that will not uninstall the old v1.0 of the application, or is there a way to properly create a .msp patch with the ability to add/change/remove files?
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Patch not building properly

Hi and welcome to Advanced Installer forums.

I'm not sure why you encounter this behavior. Creating a patch should be the right solution for you. Can you please send us a screenshot with the error?

Also, did you follow our Authoring a Windows Installer patch tutorial which describes the steps to create a patch?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
StefM
Posts: 3
Joined: Thu Jun 13, 2013 4:36 pm

Re: Patch not building properly

Eusebiu wrote:Hi and welcome to Advanced Installer forums.

I'm not sure why you encounter this behavior. Creating a patch should be the right solution for you. Can you please send us a screenshot with the error?

Also, did you follow our Authoring a Windows Installer patch tutorial which describes the steps to create a patch?

Best regards,
Eusebiu
Thanks for the quick reply.

Here is the log from building the patch:

Code: Select all

Checking builds status... done.
Build required.
Building package: C:\Users\Stefan\Desktop\advanced installer test\MC Patcher-SetupFiles\MC Patcher.msp 
Running MSI patch compatibility tests... 
Warning: Sequence changed. Sequence of file "Filetoupdate.txt" changed in upgraded "C:\Users\Stefan\Desktop\advanced installer test\MC_Patch_testv2-SetupFiles\MC_Patch_test.msi".
Warning: Sequence changed. Sequence of file "Filetokeep.txt" changed in upgraded "C:\Users\Stefan\Desktop\advanced installer test\MC_Patch_testv2-SetupFiles\MC_Patch_test.msi".

Analyzing the MSI files found that the resulting patch might not apply correctly. The target or upgraded MSI broke some of the patch rules. For more details, please see the Patch help page.
done.
Creating PCP database... done.
Creating MSP... 
***** Log starting: 2013-06-15 23:22:03 *****

  INFO: Using Pcp Path: C:\Users\Stefan\Desktop\advanced installer test\MC Patcher-SetupFiles\MC Patcher.pcp.
  INFO: Using Temporary Directory: C:\Users\Stefan\AppData\Local\Temp\~pcw_tmp.tmp.
  INFO: Passed all of the main control parameter validation to PatchWiz, now calling the next 5 phases.
  INFO: Phase I:	Entered validation and processing phase.
  INFO: 		Validation of Pcp.
  INFO: 		MinimumRequiredMsiVersion is 200.
  INFO: 		SEQUENCE_DATA_GENERATION_DISABLED is 1.
  INFO: 		ListOfPatchGUIDsToReplace is .
  INFO: 		ListOfTargetProductCodes is *.
  INFO: 		MsiFileToUseToCreatePatchTables is .
  INFO: 		PatchGUID is {C7B702E6-B559-47C5-AB43-B21129C4CF4B}.
  INFO: 		PatchOutputPath is C:\Users\Stefan\Desktop\advanced installer test\MC Patcher-SetupFiles\MC Patcher.msp.
  INFO: 		PatchSourceList is PatchSourceList.
  INFO: 		PATCH_CACHE_DIR is .
  INFO: 		AllowDualPatch is 0.
  INFO: 		AllowProductCodeMismatches is 1.
  INFO: 		AllowProductVersionMajorMismatches is 1.
  INFO: 		ApiPatchingSymbolFlags is 0.
  INFO: 		DontRemoveTempFolderWhenFinished is 0.
  INFO: 		IncludeWholeFilesOnly is 0.
  INFO: 		PATCH_CACHE_ENABLED is 0.
  INFO: 		OptimizePatchSizeForLargeFiles is 0.
  INFO: 		TrustMsi is 0.
  INFO: 		AllowLaxValidationFlags is 0.
  SCHEMA: Table: ExternalFiles has mismatched schema (or missing column) for: Order
  SCHEMA: Table: ExternalFiles has mismatched schema (or missing column) for: RetainOffsets
  INFO: Phase III:	Entering Prepare Files.
INFO Comparing Files: C:\Users\Stefan\Desktop\advanced installer test\images\MC_Patch_t_1\advanced installer test\File to update.txt C:\Users\Stefan\Desktop\advanced installer test\images\MC_Patch_t\advanced installer test\File to update.txt...
INFO Comparing bytes...
INFO Comparing Files: C:\Users\Stefan\Desktop\advanced installer test\images\MC_Patch_t_1\advanced installer test\a new one.txt C:\Users\Stefan\Desktop\advanced installer test\images\MC_Patch_t\advanced installer test\a new one.txt...
INFO Comparing bytes...
INFO Comparing Files: C:\Users\Stefan\Desktop\advanced installer test\images\MC_Patch_t_1\advanced installer test\File to keep.txt C:\Users\Stefan\Desktop\advanced installer test\images\MC_Patch_t\advanced installer test\File to keep.txt...
INFO Comparing bytes...
  INFO: Phase IV:	Entering Generate Payload.
  INFO: Phase V:	Entering Generate MSP.
  INFO: 		 Generating Patch Metadata.
  INFO: Temporary folder is about to be cleaned out and deleted: C:\Users\Stefan\AppData\Local\Temp\~pcw_tmp.tmp
  INFO: Patch created successfully.
done.
Writing Summary Information... done.

Total build time: 2 sec.
Build finished successfully.
I have created a new v1.0.0 and v1.1.0 and with the change choose Patch instead of Major Upgrade.

Here are the differences in the files, I have not touched any other settings:

Image

I followed the patch instructions exactly as they were written, and I have checked the reference image folder and there are the correct files there, however the build seems to be failing. If it is important, I got the msimsp.exe file as requested from the patcher from the Windows 3.5 SDK

When using the patcher .msp I manage to patch the game and update any files, however the files that are meant to be deleted, are still in the install folder.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Patch not building properly

Hi,

Sorry, because I misunderstood your problem. Unfortunately, a patch does not remove files. Although, you can achieve this using our "File Removal" operation available in the Files and Folders page. This problem is also discussed in the Remove some files using patch thread.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
StefM
Posts: 3
Joined: Thu Jun 13, 2013 4:36 pm

Re: Patch not building properly

Ok thanks for the reply, I also thought that this may work.

However what should the Conditions be set as? There is the option to press Patch, however I am not sure of the syntax here. Should the remove on: be set as Component Install or both install and uninstall.

I think it would be greatly helpful if this section could be clarified in the patch building how-to.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Patch not building properly

Hello,

I apologize for my delayed reply.

You should set the "Condition" field of your file removal like this:

Code: Select all

PATCH
Also, the file removal operation should be scheduled on "Component install".

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

Return to “Building Installers”