diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-01-17 20:19:24 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-01-17 20:26:04 -0600 |
commit | 2b1973c7fc4be8dd2a3e0c95ef43d3742278d0cd (patch) | |
tree | 05174d427e11a2910de2c0defdbb1bebed92ee6e | |
parent | 32fce16069d47fbf7e08414e9fd31e2a09968395 (diff) | |
download | wix-2b1973c7fc4be8dd2a3e0c95ef43d3742278d0cd.tar.gz wix-2b1973c7fc4be8dd2a3e0c95ef43d3742278d0cd.tar.bz2 wix-2b1973c7fc4be8dd2a3e0c95ef43d3742278d0cd.zip |
Remove dead code.
-rw-r--r-- | src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h | 14 | ||||
-rw-r--r-- | src/engine/apply.cpp | 4 | ||||
-rw-r--r-- | src/engine/dependency.cpp | 2 | ||||
-rw-r--r-- | src/engine/exeengine.cpp | 2 | ||||
-rw-r--r-- | src/engine/logging.cpp | 6 | ||||
-rw-r--r-- | src/engine/msiengine.cpp | 8 | ||||
-rw-r--r-- | src/engine/mspengine.cpp | 2 | ||||
-rw-r--r-- | src/engine/msuengine.cpp | 2 | ||||
-rw-r--r-- | src/engine/package.h | 12 | ||||
-rw-r--r-- | src/engine/plan.cpp | 6 | ||||
-rw-r--r-- | src/engine/plan.h | 6 | ||||
-rw-r--r-- | src/stub/stub.vcxproj | 2 |
12 files changed, 16 insertions, 50 deletions
diff --git a/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h b/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h index 98a9d77d..9642748b 100644 --- a/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h +++ b/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h | |||
@@ -36,12 +36,9 @@ enum BOOTSTRAPPER_ACTION_STATE | |||
36 | BOOTSTRAPPER_ACTION_STATE_NONE, | 36 | BOOTSTRAPPER_ACTION_STATE_NONE, |
37 | BOOTSTRAPPER_ACTION_STATE_UNINSTALL, | 37 | BOOTSTRAPPER_ACTION_STATE_UNINSTALL, |
38 | BOOTSTRAPPER_ACTION_STATE_INSTALL, | 38 | BOOTSTRAPPER_ACTION_STATE_INSTALL, |
39 | BOOTSTRAPPER_ACTION_STATE_ADMIN_INSTALL, | ||
40 | BOOTSTRAPPER_ACTION_STATE_MODIFY, | 39 | BOOTSTRAPPER_ACTION_STATE_MODIFY, |
41 | BOOTSTRAPPER_ACTION_STATE_REPAIR, | 40 | BOOTSTRAPPER_ACTION_STATE_REPAIR, |
42 | BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE, | 41 | BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE, |
43 | BOOTSTRAPPER_ACTION_STATE_MAJOR_UPGRADE, | ||
44 | BOOTSTRAPPER_ACTION_STATE_PATCH, | ||
45 | }; | 42 | }; |
46 | 43 | ||
47 | enum BOOTSTRAPPER_PACKAGE_STATE | 44 | enum BOOTSTRAPPER_PACKAGE_STATE |
@@ -73,17 +70,6 @@ enum BOOTSTRAPPER_FEATURE_STATE | |||
73 | BOOTSTRAPPER_FEATURE_STATE_SOURCE, | 70 | BOOTSTRAPPER_FEATURE_STATE_SOURCE, |
74 | }; | 71 | }; |
75 | 72 | ||
76 | enum BOOTSTRAPPER_FEATURE_ACTION | ||
77 | { | ||
78 | BOOTSTRAPPER_FEATURE_ACTION_NONE, | ||
79 | BOOTSTRAPPER_FEATURE_ACTION_ADDLOCAL, | ||
80 | BOOTSTRAPPER_FEATURE_ACTION_ADDSOURCE, | ||
81 | BOOTSTRAPPER_FEATURE_ACTION_ADDDEFAULT, | ||
82 | BOOTSTRAPPER_FEATURE_ACTION_REINSTALL, | ||
83 | BOOTSTRAPPER_FEATURE_ACTION_ADVERTISE, | ||
84 | BOOTSTRAPPER_FEATURE_ACTION_REMOVE, | ||
85 | }; | ||
86 | |||
87 | enum BOOTSTRAPPER_LOG_LEVEL | 73 | enum BOOTSTRAPPER_LOG_LEVEL |
88 | { | 74 | { |
89 | BOOTSTRAPPER_LOG_LEVEL_NONE, // turns off report (only valid for XXXSetLevel()) | 75 | BOOTSTRAPPER_LOG_LEVEL_NONE, // turns off report (only valid for XXXSetLevel()) |
diff --git a/src/engine/apply.cpp b/src/engine/apply.cpp index 833d750c..c5d27277 100644 --- a/src/engine/apply.cpp +++ b/src/engine/apply.cpp | |||
@@ -1743,8 +1743,6 @@ static HRESULT DoExecuteAction( | |||
1743 | ExitOnFailure(hr, "Failed to execute commit MSI transaction action."); | 1743 | ExitOnFailure(hr, "Failed to execute commit MSI transaction action."); |
1744 | break; | 1744 | break; |
1745 | 1745 | ||
1746 | case BURN_EXECUTE_ACTION_TYPE_SERVICE_STOP: __fallthrough; | ||
1747 | case BURN_EXECUTE_ACTION_TYPE_SERVICE_START: __fallthrough; | ||
1748 | default: | 1746 | default: |
1749 | hr = E_UNEXPECTED; | 1747 | hr = E_UNEXPECTED; |
1750 | ExitOnFailure(hr, "Invalid execute action."); | 1748 | ExitOnFailure(hr, "Invalid execute action."); |
@@ -1854,8 +1852,6 @@ static HRESULT DoRollbackActions( | |||
1854 | IgnoreRollbackError(hr, "Failed to uncache package for rollback."); | 1852 | IgnoreRollbackError(hr, "Failed to uncache package for rollback."); |
1855 | break; | 1853 | break; |
1856 | 1854 | ||
1857 | case BURN_EXECUTE_ACTION_TYPE_SERVICE_STOP: __fallthrough; | ||
1858 | case BURN_EXECUTE_ACTION_TYPE_SERVICE_START: __fallthrough; | ||
1859 | default: | 1855 | default: |
1860 | hr = E_UNEXPECTED; | 1856 | hr = E_UNEXPECTED; |
1861 | ExitOnFailure(hr, "Invalid rollback action: %d.", pRollbackAction->type); | 1857 | ExitOnFailure(hr, "Invalid rollback action: %d.", pRollbackAction->type); |
diff --git a/src/engine/dependency.cpp b/src/engine/dependency.cpp index c01449b6..af4ab0a1 100644 --- a/src/engine/dependency.cpp +++ b/src/engine/dependency.cpp | |||
@@ -922,8 +922,6 @@ static void CalculateDependencyActionStates( | |||
922 | case BOOTSTRAPPER_ACTION_STATE_MODIFY: __fallthrough; | 922 | case BOOTSTRAPPER_ACTION_STATE_MODIFY: __fallthrough; |
923 | case BOOTSTRAPPER_ACTION_STATE_REPAIR: __fallthrough; | 923 | case BOOTSTRAPPER_ACTION_STATE_REPAIR: __fallthrough; |
924 | case BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE: __fallthrough; | 924 | case BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE: __fallthrough; |
925 | case BOOTSTRAPPER_ACTION_STATE_MAJOR_UPGRADE: __fallthrough; | ||
926 | case BOOTSTRAPPER_ACTION_STATE_PATCH: | ||
927 | *pDependencyExecuteAction = BURN_DEPENDENCY_ACTION_REGISTER; | 925 | *pDependencyExecuteAction = BURN_DEPENDENCY_ACTION_REGISTER; |
928 | break; | 926 | break; |
929 | } | 927 | } |
diff --git a/src/engine/exeengine.cpp b/src/engine/exeengine.cpp index d3ec7676..fd33d926 100644 --- a/src/engine/exeengine.cpp +++ b/src/engine/exeengine.cpp | |||
@@ -223,7 +223,7 @@ extern "C" HRESULT ExeEnginePlanCalculatePackage( | |||
223 | // Calculate the rollback action if there is an execute action. | 223 | // Calculate the rollback action if there is an execute action. |
224 | if (BOOTSTRAPPER_ACTION_STATE_NONE != execute) | 224 | if (BOOTSTRAPPER_ACTION_STATE_NONE != execute) |
225 | { | 225 | { |
226 | switch (BOOTSTRAPPER_PACKAGE_STATE_UNKNOWN != pPackage->expected ? pPackage->expected : pPackage->currentState) | 226 | switch (pPackage->currentState) |
227 | { | 227 | { |
228 | case BOOTSTRAPPER_PACKAGE_STATE_PRESENT: | 228 | case BOOTSTRAPPER_PACKAGE_STATE_PRESENT: |
229 | switch (pPackage->requested) | 229 | switch (pPackage->requested) |
diff --git a/src/engine/logging.cpp b/src/engine/logging.cpp index 512b562c..49b2bcc3 100644 --- a/src/engine/logging.cpp +++ b/src/engine/logging.cpp | |||
@@ -301,18 +301,12 @@ extern "C" LPCSTR LoggingActionStateToString( | |||
301 | return "Uninstall"; | 301 | return "Uninstall"; |
302 | case BOOTSTRAPPER_ACTION_STATE_INSTALL: | 302 | case BOOTSTRAPPER_ACTION_STATE_INSTALL: |
303 | return "Install"; | 303 | return "Install"; |
304 | case BOOTSTRAPPER_ACTION_STATE_ADMIN_INSTALL: | ||
305 | return "AdminInstall"; | ||
306 | case BOOTSTRAPPER_ACTION_STATE_MODIFY: | 304 | case BOOTSTRAPPER_ACTION_STATE_MODIFY: |
307 | return "Modify"; | 305 | return "Modify"; |
308 | case BOOTSTRAPPER_ACTION_STATE_REPAIR: | 306 | case BOOTSTRAPPER_ACTION_STATE_REPAIR: |
309 | return "Repair"; | 307 | return "Repair"; |
310 | case BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE: | 308 | case BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE: |
311 | return "MinorUpgrade"; | 309 | return "MinorUpgrade"; |
312 | case BOOTSTRAPPER_ACTION_STATE_MAJOR_UPGRADE: | ||
313 | return "MajorUpgrade"; | ||
314 | case BOOTSTRAPPER_ACTION_STATE_PATCH: | ||
315 | return "Patch"; | ||
316 | default: | 310 | default: |
317 | return "Invalid"; | 311 | return "Invalid"; |
318 | } | 312 | } |
diff --git a/src/engine/msiengine.cpp b/src/engine/msiengine.cpp index c298e219..688be7af 100644 --- a/src/engine/msiengine.cpp +++ b/src/engine/msiengine.cpp | |||
@@ -856,7 +856,7 @@ extern "C" HRESULT MsiEnginePlanCalculatePackage( | |||
856 | // Calculate the rollback action if there is an execute action. | 856 | // Calculate the rollback action if there is an execute action. |
857 | if (BOOTSTRAPPER_ACTION_STATE_NONE != execute && !fInsideMsiTransaction) | 857 | if (BOOTSTRAPPER_ACTION_STATE_NONE != execute && !fInsideMsiTransaction) |
858 | { | 858 | { |
859 | switch (BOOTSTRAPPER_PACKAGE_STATE_UNKNOWN != pPackage->expected ? pPackage->expected : pPackage->currentState) | 859 | switch (pPackage->currentState) |
860 | { | 860 | { |
861 | case BOOTSTRAPPER_PACKAGE_STATE_PRESENT: __fallthrough; | 861 | case BOOTSTRAPPER_PACKAGE_STATE_PRESENT: __fallthrough; |
862 | case BOOTSTRAPPER_PACKAGE_STATE_SUPERSEDED: | 862 | case BOOTSTRAPPER_PACKAGE_STATE_SUPERSEDED: |
@@ -1322,12 +1322,6 @@ extern "C" HRESULT MsiEngineExecutePackage( | |||
1322 | // | 1322 | // |
1323 | switch (pExecuteAction->msiPackage.action) | 1323 | switch (pExecuteAction->msiPackage.action) |
1324 | { | 1324 | { |
1325 | case BOOTSTRAPPER_ACTION_STATE_ADMIN_INSTALL: | ||
1326 | hr = StrAllocConcatSecure(&sczProperties, L" ACTION=ADMIN", 0); | ||
1327 | ExitOnFailure(hr, "Failed to add ADMIN property on admin install."); | ||
1328 | __fallthrough; | ||
1329 | |||
1330 | case BOOTSTRAPPER_ACTION_STATE_MAJOR_UPGRADE: __fallthrough; | ||
1331 | case BOOTSTRAPPER_ACTION_STATE_INSTALL: | 1325 | case BOOTSTRAPPER_ACTION_STATE_INSTALL: |
1332 | hr = StrAllocConcatSecure(&sczProperties, L" REBOOT=ReallySuppress", 0); | 1326 | hr = StrAllocConcatSecure(&sczProperties, L" REBOOT=ReallySuppress", 0); |
1333 | ExitOnFailure(hr, "Failed to add reboot suppression property on install."); | 1327 | ExitOnFailure(hr, "Failed to add reboot suppression property on install."); |
diff --git a/src/engine/mspengine.cpp b/src/engine/mspengine.cpp index e14173d1..c432b78b 100644 --- a/src/engine/mspengine.cpp +++ b/src/engine/mspengine.cpp | |||
@@ -332,7 +332,7 @@ extern "C" HRESULT MspEnginePlanCalculatePackage( | |||
332 | // Calculate the rollback action if there is an execute action. | 332 | // Calculate the rollback action if there is an execute action. |
333 | if (BOOTSTRAPPER_ACTION_STATE_NONE != execute && !fInsideMsiTransaction) | 333 | if (BOOTSTRAPPER_ACTION_STATE_NONE != execute && !fInsideMsiTransaction) |
334 | { | 334 | { |
335 | switch (BOOTSTRAPPER_PACKAGE_STATE_UNKNOWN != pPackage->expected ? pPackage->expected : pPackage->currentState) | 335 | switch (pPackage->currentState) |
336 | { | 336 | { |
337 | case BOOTSTRAPPER_PACKAGE_STATE_PRESENT: | 337 | case BOOTSTRAPPER_PACKAGE_STATE_PRESENT: |
338 | switch (requested) | 338 | switch (requested) |
diff --git a/src/engine/msuengine.cpp b/src/engine/msuengine.cpp index 0c81873e..641d55b1 100644 --- a/src/engine/msuengine.cpp +++ b/src/engine/msuengine.cpp | |||
@@ -146,7 +146,7 @@ extern "C" HRESULT MsuEnginePlanCalculatePackage( | |||
146 | // Calculate the rollback action if there is an execute action. | 146 | // Calculate the rollback action if there is an execute action. |
147 | if (BOOTSTRAPPER_ACTION_STATE_NONE != execute) | 147 | if (BOOTSTRAPPER_ACTION_STATE_NONE != execute) |
148 | { | 148 | { |
149 | switch (BOOTSTRAPPER_PACKAGE_STATE_UNKNOWN != pPackage->expected ? pPackage->expected : pPackage->currentState) | 149 | switch (pPackage->currentState) |
150 | { | 150 | { |
151 | case BOOTSTRAPPER_PACKAGE_STATE_PRESENT: | 151 | case BOOTSTRAPPER_PACKAGE_STATE_PRESENT: |
152 | switch (pPackage->requested) | 152 | switch (pPackage->requested) |
diff --git a/src/engine/package.h b/src/engine/package.h index f3e817eb..ec176f8c 100644 --- a/src/engine/package.h +++ b/src/engine/package.h | |||
@@ -67,6 +67,17 @@ enum BURN_PATCH_TARGETCODE_TYPE | |||
67 | BURN_PATCH_TARGETCODE_TYPE_UPGRADE, | 67 | BURN_PATCH_TARGETCODE_TYPE_UPGRADE, |
68 | }; | 68 | }; |
69 | 69 | ||
70 | enum BOOTSTRAPPER_FEATURE_ACTION | ||
71 | { | ||
72 | BOOTSTRAPPER_FEATURE_ACTION_NONE, | ||
73 | BOOTSTRAPPER_FEATURE_ACTION_ADDLOCAL, | ||
74 | BOOTSTRAPPER_FEATURE_ACTION_ADDSOURCE, | ||
75 | BOOTSTRAPPER_FEATURE_ACTION_ADDDEFAULT, | ||
76 | BOOTSTRAPPER_FEATURE_ACTION_REINSTALL, | ||
77 | BOOTSTRAPPER_FEATURE_ACTION_ADVERTISE, | ||
78 | BOOTSTRAPPER_FEATURE_ACTION_REMOVE, | ||
79 | }; | ||
80 | |||
70 | // structs | 81 | // structs |
71 | 82 | ||
72 | typedef struct _BURN_EXE_EXIT_CODE | 83 | typedef struct _BURN_EXE_EXIT_CODE |
@@ -188,7 +199,6 @@ typedef struct _BURN_PACKAGE | |||
188 | 199 | ||
189 | BOOTSTRAPPER_PACKAGE_STATE currentState; // only valid after Detect. | 200 | BOOTSTRAPPER_PACKAGE_STATE currentState; // only valid after Detect. |
190 | BURN_CACHE_STATE cache; // only valid after Detect. | 201 | BURN_CACHE_STATE cache; // only valid after Detect. |
191 | BOOTSTRAPPER_PACKAGE_STATE expected; // only valid during Plan. | ||
192 | BOOTSTRAPPER_REQUEST_STATE defaultRequested;// only valid during Plan. | 202 | BOOTSTRAPPER_REQUEST_STATE defaultRequested;// only valid during Plan. |
193 | BOOTSTRAPPER_REQUEST_STATE requested; // only valid during Plan. | 203 | BOOTSTRAPPER_REQUEST_STATE requested; // only valid during Plan. |
194 | BOOL fAcquire; // only valid during Plan. | 204 | BOOL fAcquire; // only valid during Plan. |
diff --git a/src/engine/plan.cpp b/src/engine/plan.cpp index ccb7b3ce..0dba36c6 100644 --- a/src/engine/plan.cpp +++ b/src/engine/plan.cpp | |||
@@ -306,11 +306,6 @@ extern "C" void PlanUninitializeExecuteAction( | |||
306 | ReleaseStr(pExecuteAction->msuPackage.sczLogPath); | 306 | ReleaseStr(pExecuteAction->msuPackage.sczLogPath); |
307 | break; | 307 | break; |
308 | 308 | ||
309 | case BURN_EXECUTE_ACTION_TYPE_SERVICE_STOP: __fallthrough; | ||
310 | case BURN_EXECUTE_ACTION_TYPE_SERVICE_START: | ||
311 | ReleaseStr(pExecuteAction->service.sczServiceName); | ||
312 | break; | ||
313 | |||
314 | case BURN_EXECUTE_ACTION_TYPE_PACKAGE_DEPENDENCY: | 309 | case BURN_EXECUTE_ACTION_TYPE_PACKAGE_DEPENDENCY: |
315 | ReleaseStr(pExecuteAction->packageDependency.sczBundleProviderKey); | 310 | ReleaseStr(pExecuteAction->packageDependency.sczBundleProviderKey); |
316 | break; | 311 | break; |
@@ -1958,7 +1953,6 @@ static void ResetPlannedPackageState( | |||
1958 | ) | 1953 | ) |
1959 | { | 1954 | { |
1960 | // Reset package state that is a result of planning. | 1955 | // Reset package state that is a result of planning. |
1961 | pPackage->expected = BOOTSTRAPPER_PACKAGE_STATE_UNKNOWN; | ||
1962 | pPackage->defaultRequested = BOOTSTRAPPER_REQUEST_STATE_NONE; | 1956 | pPackage->defaultRequested = BOOTSTRAPPER_REQUEST_STATE_NONE; |
1963 | pPackage->requested = BOOTSTRAPPER_REQUEST_STATE_NONE; | 1957 | pPackage->requested = BOOTSTRAPPER_REQUEST_STATE_NONE; |
1964 | pPackage->fAcquire = FALSE; | 1958 | pPackage->fAcquire = FALSE; |
diff --git a/src/engine/plan.h b/src/engine/plan.h index e9f3a341..9d7debe1 100644 --- a/src/engine/plan.h +++ b/src/engine/plan.h | |||
@@ -61,8 +61,6 @@ enum BURN_EXECUTE_ACTION_TYPE | |||
61 | BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE, | 61 | BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE, |
62 | BURN_EXECUTE_ACTION_TYPE_MSP_TARGET, | 62 | BURN_EXECUTE_ACTION_TYPE_MSP_TARGET, |
63 | BURN_EXECUTE_ACTION_TYPE_MSU_PACKAGE, | 63 | BURN_EXECUTE_ACTION_TYPE_MSU_PACKAGE, |
64 | BURN_EXECUTE_ACTION_TYPE_SERVICE_STOP, | ||
65 | BURN_EXECUTE_ACTION_TYPE_SERVICE_START, | ||
66 | BURN_EXECUTE_ACTION_TYPE_PACKAGE_PROVIDER, | 64 | BURN_EXECUTE_ACTION_TYPE_PACKAGE_PROVIDER, |
67 | BURN_EXECUTE_ACTION_TYPE_PACKAGE_DEPENDENCY, | 65 | BURN_EXECUTE_ACTION_TYPE_PACKAGE_DEPENDENCY, |
68 | BURN_EXECUTE_ACTION_TYPE_ROLLBACK_BOUNDARY, | 66 | BURN_EXECUTE_ACTION_TYPE_ROLLBACK_BOUNDARY, |
@@ -285,10 +283,6 @@ typedef struct _BURN_EXECUTE_ACTION | |||
285 | } msuPackage; | 283 | } msuPackage; |
286 | struct | 284 | struct |
287 | { | 285 | { |
288 | LPWSTR sczServiceName; | ||
289 | } service; | ||
290 | struct | ||
291 | { | ||
292 | BOOL fKeep; | 286 | BOOL fKeep; |
293 | } registration; | 287 | } registration; |
294 | struct | 288 | struct |
diff --git a/src/stub/stub.vcxproj b/src/stub/stub.vcxproj index aa2f964e..082b80e5 100644 --- a/src/stub/stub.vcxproj +++ b/src/stub/stub.vcxproj | |||
@@ -55,7 +55,7 @@ | |||
55 | 55 | ||
56 | <PropertyGroup> | 56 | <PropertyGroup> |
57 | <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\engine\inc</ProjectAdditionalIncludeDirectories> | 57 | <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\engine\inc</ProjectAdditionalIncludeDirectories> |
58 | <ProjectAdditionalLinkLibraries>cabinet.lib;crypt32.lib;gdiplus.lib;msi.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;wintrust.lib;wuguid.lib;engine.lib;engine.res</ProjectAdditionalLinkLibraries> | 58 | <ProjectAdditionalLinkLibraries>cabinet.lib;crypt32.lib;msi.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;wintrust.lib;wuguid.lib;engine.lib;engine.res</ProjectAdditionalLinkLibraries> |
59 | </PropertyGroup> | 59 | </PropertyGroup> |
60 | 60 | ||
61 | <ItemDefinitionGroup> | 61 | <ItemDefinitionGroup> |