aboutsummaryrefslogtreecommitdiff
path: root/src/engine/package.h
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-02-02 18:09:58 -0600
committerSean Hall <r.sean.hall@gmail.com>2021-02-04 22:16:10 -0600
commitfd8c2b0899bfbce07386af245c04eb21dc01cbdf (patch)
tree33d928124b0028729916189ddb9f239a9574c75d /src/engine/package.h
parent39725a1a6d1c72a6748bd3c306af32bcae6dbf8f (diff)
downloadwix-fd8c2b0899bfbce07386af245c04eb21dc01cbdf.tar.gz
wix-fd8c2b0899bfbce07386af245c04eb21dc01cbdf.tar.bz2
wix-fd8c2b0899bfbce07386af245c04eb21dc01cbdf.zip
Update the logic for determining when the bundle should be registered.
The basic rule is that if a non-permanent package is present at the end of the chain, then the bundle should be registered. If no non-permanent packages are present at the end of the chain, then the bundle should not be registered. This required tracking what actually happened with each package during Apply. Include cache status in registration calculation. Include dependency ref-counting when determining whether the bundle should be registered.
Diffstat (limited to 'src/engine/package.h')
-rw-r--r--src/engine/package.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/engine/package.h b/src/engine/package.h
index 8f801e85..d3225fbc 100644
--- a/src/engine/package.h
+++ b/src/engine/package.h
@@ -78,6 +78,14 @@ enum BOOTSTRAPPER_FEATURE_ACTION
78 BOOTSTRAPPER_FEATURE_ACTION_REMOVE, 78 BOOTSTRAPPER_FEATURE_ACTION_REMOVE,
79}; 79};
80 80
81enum BURN_PACKAGE_REGISTRATION_STATE
82{
83 BURN_PACKAGE_REGISTRATION_STATE_UNKNOWN,
84 BURN_PACKAGE_REGISTRATION_STATE_IGNORED,
85 BURN_PACKAGE_REGISTRATION_STATE_ABSENT,
86 BURN_PACKAGE_REGISTRATION_STATE_PRESENT,
87};
88
81// structs 89// structs
82 90
83typedef struct _BURN_EXE_EXIT_CODE 91typedef struct _BURN_EXE_EXIT_CODE
@@ -106,6 +114,9 @@ typedef struct _BURN_MSPTARGETPRODUCT
106 BOOTSTRAPPER_PACKAGE_STATE patchPackageState; // only valid after Detect. 114 BOOTSTRAPPER_PACKAGE_STATE patchPackageState; // only valid after Detect.
107 BOOTSTRAPPER_ACTION_STATE execute; // only valid during Plan. 115 BOOTSTRAPPER_ACTION_STATE execute; // only valid during Plan.
108 BOOTSTRAPPER_ACTION_STATE rollback; // only valid during Plan. 116 BOOTSTRAPPER_ACTION_STATE rollback; // only valid during Plan.
117
118 BURN_PACKAGE_REGISTRATION_STATE registrationState; // initialized during Detect, updated during Apply.
119 BURN_PACKAGE_REGISTRATION_STATE transactionRegistrationState;// only valid during Apply inside an MSI transaction.
109} BURN_MSPTARGETPRODUCT; 120} BURN_MSPTARGETPRODUCT;
110 121
111typedef struct _BURN_MSIPROPERTY 122typedef struct _BURN_MSIPROPERTY
@@ -190,6 +201,7 @@ typedef struct _BURN_PACKAGE
190 BOOL fPerMachine; 201 BOOL fPerMachine;
191 BOOL fUninstallable; 202 BOOL fUninstallable;
192 BOOL fVital; 203 BOOL fVital;
204 BOOL fCanAffectRegistration;
193 205
194 BURN_CACHE_TYPE cacheType; 206 BURN_CACHE_TYPE cacheType;
195 LPWSTR sczCacheId; 207 LPWSTR sczCacheId;
@@ -216,6 +228,12 @@ typedef struct _BURN_PACKAGE
216 BOOL fDependencyManagerWasHere; // only valid during Plan. 228 BOOL fDependencyManagerWasHere; // only valid during Plan.
217 HRESULT hrCacheResult; // only valid during Apply. 229 HRESULT hrCacheResult; // only valid during Apply.
218 230
231 BURN_PACKAGE_REGISTRATION_STATE cacheRegistrationState; // initialized during Detect, updated during Apply.
232 BURN_PACKAGE_REGISTRATION_STATE installRegistrationState; // initialized during Detect, updated during Apply.
233 BURN_PACKAGE_REGISTRATION_STATE expectedCacheRegistrationState; // only valid after Plan.
234 BURN_PACKAGE_REGISTRATION_STATE expectedInstallRegistrationState;// only valid after Plan.
235 BURN_PACKAGE_REGISTRATION_STATE transactionRegistrationState; // only valid during Apply inside an MSI transaction.
236
219 BURN_PACKAGE_PAYLOAD* rgPayloads; 237 BURN_PACKAGE_PAYLOAD* rgPayloads;
220 DWORD cPayloads; 238 DWORD cPayloads;
221 239