diff options
Diffstat (limited to 'src/ca')
-rw-r--r-- | src/ca/caDecor.h | 13 | ||||
-rw-r--r-- | src/ca/precomp.h | 2 | ||||
-rw-r--r-- | src/ca/scadb.cpp | 6 | ||||
-rw-r--r-- | src/ca/scasqlstr.cpp | 4 | ||||
-rw-r--r-- | src/ca/sqlca.vcxproj | 26 |
5 files changed, 45 insertions, 6 deletions
diff --git a/src/ca/caDecor.h b/src/ca/caDecor.h new file mode 100644 index 00000000..da274650 --- /dev/null +++ b/src/ca/caDecor.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #pragma once | ||
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
3 | |||
4 | |||
5 | #if defined(_M_ARM64) | ||
6 | #define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64" | ||
7 | #elif defined(_M_AMD64) | ||
8 | #define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64" | ||
9 | #elif defined(_M_ARM) | ||
10 | #define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM" | ||
11 | #else | ||
12 | #define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86" | ||
13 | #endif | ||
diff --git a/src/ca/precomp.h b/src/ca/precomp.h index 08454d3a..266d543c 100644 --- a/src/ca/precomp.h +++ b/src/ca/precomp.h | |||
@@ -24,3 +24,5 @@ | |||
24 | #include "sca.h" | 24 | #include "sca.h" |
25 | #include "scacost.h" | 25 | #include "scacost.h" |
26 | #include "scasqlstr.h" | 26 | #include "scasqlstr.h" |
27 | |||
28 | #include "caDecor.h" | ||
diff --git a/src/ca/scadb.cpp b/src/ca/scadb.cpp index 9f9efca2..68f7b10b 100644 --- a/src/ca/scadb.cpp +++ b/src/ca/scadb.cpp | |||
@@ -385,7 +385,7 @@ static HRESULT SchedCreateDatabase( | |||
385 | hr = SqlDatabaseExists(psd->wzServer, psd->wzInstance, psd->wzDatabase, psd->fUseIntegratedAuth, psd->scau.wzName, psd->scau.wzPassword, NULL); | 385 | hr = SqlDatabaseExists(psd->wzServer, psd->wzInstance, psd->wzDatabase, psd->fUseIntegratedAuth, psd->scau.wzName, psd->scau.wzPassword, NULL); |
386 | if (S_FALSE == hr) | 386 | if (S_FALSE == hr) |
387 | { | 387 | { |
388 | hr = WcaDoDeferredAction(L"RollbackCreateDatabase", pwzCustomActionData, COST_SQL_CREATEDB); | 388 | hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"RollbackCreateDatabase"), pwzCustomActionData, COST_SQL_CREATEDB); |
389 | ExitOnFailure(hr, "Failed to schedule RollbackCreateDatabase action"); | 389 | ExitOnFailure(hr, "Failed to schedule RollbackCreateDatabase action"); |
390 | } | 390 | } |
391 | 391 | ||
@@ -444,7 +444,7 @@ static HRESULT SchedCreateDatabase( | |||
444 | } | 444 | } |
445 | 445 | ||
446 | // schedule the CreateDatabase action | 446 | // schedule the CreateDatabase action |
447 | hr = WcaDoDeferredAction(L"CreateDatabase", pwzCustomActionData, COST_SQL_CREATEDB); | 447 | hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"CreateDatabase"), pwzCustomActionData, COST_SQL_CREATEDB); |
448 | ExitOnFailure(hr, "Failed to schedule CreateDatabase action"); | 448 | ExitOnFailure(hr, "Failed to schedule CreateDatabase action"); |
449 | 449 | ||
450 | LExit: | 450 | LExit: |
@@ -491,7 +491,7 @@ HRESULT SchedDropDatabase( | |||
491 | hr = WcaWriteStringToCaData(wzPassword, &pwzCustomActionData); | 491 | hr = WcaWriteStringToCaData(wzPassword, &pwzCustomActionData); |
492 | ExitOnFailure(hr, "Failed to add user password to CustomActionData"); | 492 | ExitOnFailure(hr, "Failed to add user password to CustomActionData"); |
493 | 493 | ||
494 | hr = WcaDoDeferredAction(L"DropDatabase", pwzCustomActionData, COST_SQL_DROPDB); | 494 | hr = WcaDoDeferredAction(CUSTOM_ACTION_DECORATION(L"DropDatabase"), pwzCustomActionData, COST_SQL_DROPDB); |
495 | ExitOnFailure(hr, "Failed to schedule DropDatabase action"); | 495 | ExitOnFailure(hr, "Failed to schedule DropDatabase action"); |
496 | 496 | ||
497 | LExit: | 497 | LExit: |
diff --git a/src/ca/scasqlstr.cpp b/src/ca/scasqlstr.cpp index 3108e307..6ac526a6 100644 --- a/src/ca/scasqlstr.cpp +++ b/src/ca/scasqlstr.cpp | |||
@@ -654,7 +654,7 @@ static HRESULT ExecuteStrings( | |||
654 | { | 654 | { |
655 | Assert(pwzCustomActionData && *pwzCustomActionData && uiCost); | 655 | Assert(pwzCustomActionData && *pwzCustomActionData && uiCost); |
656 | 656 | ||
657 | hr = WcaDoDeferredAction(1 == iOldRollback ? L"RollbackExecuteSqlStrings" : L"ExecuteSqlStrings", pwzCustomActionData, uiCost); | 657 | hr = WcaDoDeferredAction(1 == iOldRollback ? CUSTOM_ACTION_DECORATION(L"RollbackExecuteSqlStrings") : CUSTOM_ACTION_DECORATION(L"ExecuteSqlStrings"), pwzCustomActionData, uiCost); |
658 | ExitOnFailure(hr, "failed to schedule ExecuteSqlStrings action, rollback: %d", iOldRollback); | 658 | ExitOnFailure(hr, "failed to schedule ExecuteSqlStrings action, rollback: %d", iOldRollback); |
659 | iOldRollback = iRollback; | 659 | iOldRollback = iRollback; |
660 | 660 | ||
@@ -714,7 +714,7 @@ static HRESULT ExecuteStrings( | |||
714 | if (pwzCustomActionData && *pwzCustomActionData) | 714 | if (pwzCustomActionData && *pwzCustomActionData) |
715 | { | 715 | { |
716 | Assert(pwzCustomActionData && *pwzCustomActionData && uiCost); | 716 | Assert(pwzCustomActionData && *pwzCustomActionData && uiCost); |
717 | hr = WcaDoDeferredAction(1 == iRollback ? L"RollbackExecuteSqlStrings" : L"ExecuteSqlStrings", pwzCustomActionData, uiCost); | 717 | hr = WcaDoDeferredAction(1 == iRollback ? CUSTOM_ACTION_DECORATION(L"RollbackExecuteSqlStrings") : CUSTOM_ACTION_DECORATION(L"ExecuteSqlStrings"), pwzCustomActionData, uiCost); |
718 | ExitOnFailure(hr, "Failed to schedule ExecuteSqlStrings action"); | 718 | ExitOnFailure(hr, "Failed to schedule ExecuteSqlStrings action"); |
719 | 719 | ||
720 | *pwzCustomActionData = L'\0'; | 720 | *pwzCustomActionData = L'\0'; |
diff --git a/src/ca/sqlca.vcxproj b/src/ca/sqlca.vcxproj index 3c8c1a6c..e1c5beea 100644 --- a/src/ca/sqlca.vcxproj +++ b/src/ca/sqlca.vcxproj | |||
@@ -14,13 +14,37 @@ | |||
14 | <Configuration>Release</Configuration> | 14 | <Configuration>Release</Configuration> |
15 | <Platform>Win32</Platform> | 15 | <Platform>Win32</Platform> |
16 | </ProjectConfiguration> | 16 | </ProjectConfiguration> |
17 | <ProjectConfiguration Include="Debug|x64"> | ||
18 | <Configuration>Debug</Configuration> | ||
19 | <Platform>x64</Platform> | ||
20 | </ProjectConfiguration> | ||
21 | <ProjectConfiguration Include="Release|x64"> | ||
22 | <Configuration>Release</Configuration> | ||
23 | <Platform>x64</Platform> | ||
24 | </ProjectConfiguration> | ||
25 | <ProjectConfiguration Include="Debug|ARM"> | ||
26 | <Configuration>Debug</Configuration> | ||
27 | <Platform>ARM</Platform> | ||
28 | </ProjectConfiguration> | ||
29 | <ProjectConfiguration Include="Release|ARM"> | ||
30 | <Configuration>Release</Configuration> | ||
31 | <Platform>ARM</Platform> | ||
32 | </ProjectConfiguration> | ||
33 | <ProjectConfiguration Include="Debug|ARM64"> | ||
34 | <Configuration>Debug</Configuration> | ||
35 | <Platform>ARM64</Platform> | ||
36 | </ProjectConfiguration> | ||
37 | <ProjectConfiguration Include="Release|ARM64"> | ||
38 | <Configuration>Release</Configuration> | ||
39 | <Platform>ARM64</Platform> | ||
40 | </ProjectConfiguration> | ||
17 | </ItemGroup> | 41 | </ItemGroup> |
18 | 42 | ||
19 | <PropertyGroup Label="Globals"> | 43 | <PropertyGroup Label="Globals"> |
20 | <ProjectGuid>{4DCA6E4B-A1F1-4450-BC2D-94AC20F31935}</ProjectGuid> | 44 | <ProjectGuid>{4DCA6E4B-A1F1-4450-BC2D-94AC20F31935}</ProjectGuid> |
21 | <ConfigurationType>DynamicLibrary</ConfigurationType> | 45 | <ConfigurationType>DynamicLibrary</ConfigurationType> |
22 | <TargetName>sqlca</TargetName> | 46 | <TargetName>sqlca</TargetName> |
23 | <PlatformToolset>v141</PlatformToolset> | 47 | <PlatformToolset>v142</PlatformToolset> |
24 | <CharacterSet>Unicode</CharacterSet> | 48 | <CharacterSet>Unicode</CharacterSet> |
25 | <ProjectModuleDefinitionFile>sqlca.def</ProjectModuleDefinitionFile> | 49 | <ProjectModuleDefinitionFile>sqlca.def</ProjectModuleDefinitionFile> |
26 | <Description>WiX Toolset Sql CustomAction</Description> | 50 | <Description>WiX Toolset Sql CustomAction</Description> |