diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/engine/engine.cpp | 29 | ||||
| -rw-r--r-- | src/engine/engine.mc | 2 | ||||
| -rw-r--r-- | src/engine/engine.vcxproj | 8 | ||||
| -rw-r--r-- | src/engine/variable.cpp | 23 | ||||
| -rw-r--r-- | src/stub/WixToolset.Burn.nuspec | 4 | ||||
| -rw-r--r-- | src/stub/stub.vcxproj | 8 | ||||
| -rw-r--r-- | src/test/BurnUnitTest/BurnUnitTest.vcxproj | 8 |
7 files changed, 72 insertions, 10 deletions
diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index ae5b690c..3dbfb365 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp | |||
| @@ -93,6 +93,7 @@ extern "C" HRESULT EngineRun( | |||
| 93 | BOOL fRegInitialized = FALSE; | 93 | BOOL fRegInitialized = FALSE; |
| 94 | BOOL fWiuInitialized = FALSE; | 94 | BOOL fWiuInitialized = FALSE; |
| 95 | BOOL fXmlInitialized = FALSE; | 95 | BOOL fXmlInitialized = FALSE; |
| 96 | SYSTEM_INFO si = { }; | ||
| 96 | OSVERSIONINFOEXW ovix = { }; | 97 | OSVERSIONINFOEXW ovix = { }; |
| 97 | LPWSTR sczExePath = NULL; | 98 | LPWSTR sczExePath = NULL; |
| 98 | BOOL fRunNormal = FALSE; | 99 | BOOL fRunNormal = FALSE; |
| @@ -155,8 +156,34 @@ extern "C" HRESULT EngineRun( | |||
| 155 | ExitWithLastError(hr, "Failed to get OS info."); | 156 | ExitWithLastError(hr, "Failed to get OS info."); |
| 156 | } | 157 | } |
| 157 | 158 | ||
| 159 | #if defined(_M_ARM64) | ||
| 160 | LPCSTR szBurnPlatform = "ARM64"; | ||
| 161 | #elif defined(_M_AMD64) | ||
| 162 | LPCSTR szBurnPlatform = "x64"; | ||
| 163 | #else | ||
| 164 | LPCSTR szBurnPlatform = "x86"; | ||
| 165 | #endif | ||
| 166 | |||
| 167 | LPCSTR szMachinePlatform = "unknown architecture"; | ||
| 168 | ::GetNativeSystemInfo(&si); | ||
| 169 | switch (si.wProcessorArchitecture) | ||
| 170 | { | ||
| 171 | case PROCESSOR_ARCHITECTURE_AMD64: | ||
| 172 | szMachinePlatform = "x64"; | ||
| 173 | break; | ||
| 174 | case PROCESSOR_ARCHITECTURE_ARM: | ||
| 175 | szMachinePlatform = "ARM"; | ||
| 176 | break; | ||
| 177 | case PROCESSOR_ARCHITECTURE_ARM64: | ||
| 178 | szMachinePlatform = "ARM64"; | ||
| 179 | break; | ||
| 180 | case PROCESSOR_ARCHITECTURE_INTEL: | ||
| 181 | szMachinePlatform = "x86"; | ||
| 182 | break; | ||
| 183 | } | ||
| 184 | |||
| 158 | PathForCurrentProcess(&sczExePath, NULL); // Ignore failure. | 185 | PathForCurrentProcess(&sczExePath, NULL); // Ignore failure. |
| 159 | LogId(REPORT_STANDARD, MSG_BURN_INFO, szVerMajorMinorBuild, ovix.dwMajorVersion, ovix.dwMinorVersion, ovix.dwBuildNumber, ovix.wServicePackMajor, sczExePath); | 186 | LogId(REPORT_STANDARD, MSG_BURN_INFO, szVerMajorMinorBuild, ovix.dwMajorVersion, ovix.dwMinorVersion, ovix.dwBuildNumber, ovix.wServicePackMajor, sczExePath, szBurnPlatform, szMachinePlatform); |
| 160 | ReleaseNullStr(sczExePath); | 187 | ReleaseNullStr(sczExePath); |
| 161 | 188 | ||
| 162 | // initialize core | 189 | // initialize core |
diff --git a/src/engine/engine.mc b/src/engine/engine.mc index b36a9527..8e36e84e 100644 --- a/src/engine/engine.mc +++ b/src/engine/engine.mc | |||
| @@ -33,7 +33,7 @@ MessageId=1 | |||
| 33 | Severity=Success | 33 | Severity=Success |
| 34 | SymbolicName=MSG_BURN_INFO | 34 | SymbolicName=MSG_BURN_INFO |
| 35 | Language=English | 35 | Language=English |
| 36 | Burn v%1!hs!, Windows v%2!d!.%3!d! (Build %4!d!: Service Pack %5!d!), path: %6!ls! | 36 | Burn %7!hs! v%1!hs!, Windows v%2!d!.%3!d! %8!hs! (Build %4!d!: Service Pack %5!d!), path: %6!ls! |
| 37 | . | 37 | . |
| 38 | 38 | ||
| 39 | MessageId=2 | 39 | MessageId=2 |
diff --git a/src/engine/engine.vcxproj b/src/engine/engine.vcxproj index d62105ed..52f71b1d 100644 --- a/src/engine/engine.vcxproj +++ b/src/engine/engine.vcxproj | |||
| @@ -21,6 +21,14 @@ | |||
| 21 | <Configuration>Release</Configuration> | 21 | <Configuration>Release</Configuration> |
| 22 | <Platform>x64</Platform> | 22 | <Platform>x64</Platform> |
| 23 | </ProjectConfiguration> | 23 | </ProjectConfiguration> |
| 24 | <ProjectConfiguration Include="Debug|ARM64"> | ||
| 25 | <Configuration>Debug</Configuration> | ||
| 26 | <Platform>ARM64</Platform> | ||
| 27 | </ProjectConfiguration> | ||
| 28 | <ProjectConfiguration Include="Release|ARM64"> | ||
| 29 | <Configuration>Release</Configuration> | ||
| 30 | <Platform>ARM64</Platform> | ||
| 31 | </ProjectConfiguration> | ||
| 24 | </ItemGroup> | 32 | </ItemGroup> |
| 25 | 33 | ||
| 26 | <PropertyGroup Label="Globals"> | 34 | <PropertyGroup Label="Globals"> |
diff --git a/src/engine/variable.cpp b/src/engine/variable.cpp index ea84752d..51dbdff4 100644 --- a/src/engine/variable.cpp +++ b/src/engine/variable.cpp | |||
| @@ -157,10 +157,6 @@ static HRESULT InitializeVariableNumeric( | |||
| 157 | __in DWORD_PTR dwpData, | 157 | __in DWORD_PTR dwpData, |
| 158 | __inout BURN_VARIANT* pValue | 158 | __inout BURN_VARIANT* pValue |
| 159 | ); | 159 | ); |
| 160 | static HRESULT InitializeVariableRegistryFolder( | ||
| 161 | __in DWORD_PTR dwpData, | ||
| 162 | __inout BURN_VARIANT* pValue | ||
| 163 | ); | ||
| 164 | static HRESULT InitializeVariable6432Folder( | 160 | static HRESULT InitializeVariable6432Folder( |
| 165 | __in DWORD_PTR dwpData, | 161 | __in DWORD_PTR dwpData, |
| 166 | __inout BURN_VARIANT* pValue | 162 | __inout BURN_VARIANT* pValue |
| @@ -190,6 +186,13 @@ static HRESULT Get64bitFolderFromRegistry( | |||
| 190 | __deref_out_z LPWSTR* psczPath | 186 | __deref_out_z LPWSTR* psczPath |
| 191 | ); | 187 | ); |
| 192 | 188 | ||
| 189 | #if !defined(_WIN64) | ||
| 190 | static HRESULT InitializeVariableRegistryFolder( | ||
| 191 | __in DWORD_PTR dwpData, | ||
| 192 | __inout BURN_VARIANT* pValue | ||
| 193 | ); | ||
| 194 | #endif | ||
| 195 | |||
| 193 | 196 | ||
| 194 | // function definitions | 197 | // function definitions |
| 195 | 198 | ||
| @@ -1101,13 +1104,17 @@ static HRESULT FormatString( | |||
| 1101 | LPWSTR* rgVariables = NULL; | 1104 | LPWSTR* rgVariables = NULL; |
| 1102 | DWORD cVariables = 0; | 1105 | DWORD cVariables = 0; |
| 1103 | DWORD cch = 0; | 1106 | DWORD cch = 0; |
| 1107 | size_t cchIn = 0; | ||
| 1104 | BOOL fHidden = FALSE; | 1108 | BOOL fHidden = FALSE; |
| 1105 | MSIHANDLE hRecord = NULL; | 1109 | MSIHANDLE hRecord = NULL; |
| 1106 | 1110 | ||
| 1107 | ::EnterCriticalSection(&pVariables->csAccess); | 1111 | ::EnterCriticalSection(&pVariables->csAccess); |
| 1108 | 1112 | ||
| 1109 | // allocate buffer for format string | 1113 | // allocate buffer for format string |
| 1110 | hr = StrAlloc(&sczFormat, lstrlenW(wzIn) + 1); | 1114 | hr = ::StringCchLengthW(wzIn, STRSAFE_MAX_CCH - 1, &cchIn); |
| 1115 | ExitOnFailure(hr, "Failed to length of format string."); | ||
| 1116 | |||
| 1117 | hr = StrAlloc(&sczFormat, cchIn + 1); | ||
| 1111 | ExitOnFailure(hr, "Failed to allocate buffer for format string."); | 1118 | ExitOnFailure(hr, "Failed to allocate buffer for format string."); |
| 1112 | 1119 | ||
| 1113 | // read out variables from the unformatted string and build a format string | 1120 | // read out variables from the unformatted string and build a format string |
| @@ -1133,7 +1140,7 @@ static HRESULT FormatString( | |||
| 1133 | ExitOnFailure(hr, "Failed to append string."); | 1140 | ExitOnFailure(hr, "Failed to append string."); |
| 1134 | break; | 1141 | break; |
| 1135 | } | 1142 | } |
| 1136 | cch = wzClose - wzOpen - 1; | 1143 | cch = (DWORD)(wzClose - wzOpen - 1); |
| 1137 | 1144 | ||
| 1138 | if (0 == cch) | 1145 | if (0 == cch) |
| 1139 | { | 1146 | { |
| @@ -2170,6 +2177,7 @@ LExit: | |||
| 2170 | return hr; | 2177 | return hr; |
| 2171 | } | 2178 | } |
| 2172 | 2179 | ||
| 2180 | #if !defined(_WIN64) | ||
| 2173 | static HRESULT InitializeVariableRegistryFolder( | 2181 | static HRESULT InitializeVariableRegistryFolder( |
| 2174 | __in DWORD_PTR dwpData, | 2182 | __in DWORD_PTR dwpData, |
| 2175 | __inout BURN_VARIANT* pValue | 2183 | __inout BURN_VARIANT* pValue |
| @@ -2179,7 +2187,6 @@ static HRESULT InitializeVariableRegistryFolder( | |||
| 2179 | int nFolder = (int)dwpData; | 2187 | int nFolder = (int)dwpData; |
| 2180 | LPWSTR sczPath = NULL; | 2188 | LPWSTR sczPath = NULL; |
| 2181 | 2189 | ||
| 2182 | #if !defined(_WIN64) | ||
| 2183 | BOOL fIsWow64 = FALSE; | 2190 | BOOL fIsWow64 = FALSE; |
| 2184 | 2191 | ||
| 2185 | ProcWow64(::GetCurrentProcess(), &fIsWow64); | 2192 | ProcWow64(::GetCurrentProcess(), &fIsWow64); |
| @@ -2187,7 +2194,6 @@ static HRESULT InitializeVariableRegistryFolder( | |||
| 2187 | { | 2194 | { |
| 2188 | ExitFunction(); | 2195 | ExitFunction(); |
| 2189 | } | 2196 | } |
| 2190 | #endif | ||
| 2191 | 2197 | ||
| 2192 | hr = Get64bitFolderFromRegistry(nFolder, &sczPath); | 2198 | hr = Get64bitFolderFromRegistry(nFolder, &sczPath); |
| 2193 | ExitOnFailure(hr, "Failed to get 64-bit folder."); | 2199 | ExitOnFailure(hr, "Failed to get 64-bit folder."); |
| @@ -2201,6 +2207,7 @@ LExit: | |||
| 2201 | 2207 | ||
| 2202 | return hr; | 2208 | return hr; |
| 2203 | } | 2209 | } |
| 2210 | #endif | ||
| 2204 | 2211 | ||
| 2205 | static HRESULT InitializeVariable6432Folder( | 2212 | static HRESULT InitializeVariable6432Folder( |
| 2206 | __in DWORD_PTR dwpData, | 2213 | __in DWORD_PTR dwpData, |
diff --git a/src/stub/WixToolset.Burn.nuspec b/src/stub/WixToolset.Burn.nuspec index 35392523..f314a8a4 100644 --- a/src/stub/WixToolset.Burn.nuspec +++ b/src/stub/WixToolset.Burn.nuspec | |||
| @@ -16,5 +16,9 @@ | |||
| 16 | <file src="$projectFolder$$id$.props" target="buildTransitive" /> | 16 | <file src="$projectFolder$$id$.props" target="buildTransitive" /> |
| 17 | <file src="Win32\burn.exe" target="tools\x86" /> | 17 | <file src="Win32\burn.exe" target="tools\x86" /> |
| 18 | <file src="Win32\burn.pdb" target="tools\x86" /> | 18 | <file src="Win32\burn.pdb" target="tools\x86" /> |
| 19 | <file src="x64\burn.exe" target="tools\x64" /> | ||
| 20 | <file src="x64\burn.pdb" target="tools\x64" /> | ||
| 21 | <file src="arm64\burn.exe" target="tools\arm64" /> | ||
| 22 | <file src="arm64\burn.pdb" target="tools\arm64" /> | ||
| 19 | </files> | 23 | </files> |
| 20 | </package> | 24 | </package> |
diff --git a/src/stub/stub.vcxproj b/src/stub/stub.vcxproj index 082b80e5..a8fbdfeb 100644 --- a/src/stub/stub.vcxproj +++ b/src/stub/stub.vcxproj | |||
| @@ -24,6 +24,14 @@ | |||
| 24 | <Configuration>Release</Configuration> | 24 | <Configuration>Release</Configuration> |
| 25 | <Platform>x64</Platform> | 25 | <Platform>x64</Platform> |
| 26 | </ProjectConfiguration> | 26 | </ProjectConfiguration> |
| 27 | <ProjectConfiguration Include="Debug|ARM64"> | ||
| 28 | <Configuration>Debug</Configuration> | ||
| 29 | <Platform>ARM64</Platform> | ||
| 30 | </ProjectConfiguration> | ||
| 31 | <ProjectConfiguration Include="Release|ARM64"> | ||
| 32 | <Configuration>Release</Configuration> | ||
| 33 | <Platform>ARM64</Platform> | ||
| 34 | </ProjectConfiguration> | ||
| 27 | </ItemGroup> | 35 | </ItemGroup> |
| 28 | 36 | ||
| 29 | <PropertyGroup Label="Globals"> | 37 | <PropertyGroup Label="Globals"> |
diff --git a/src/test/BurnUnitTest/BurnUnitTest.vcxproj b/src/test/BurnUnitTest/BurnUnitTest.vcxproj index b668f68a..1f4a7111 100644 --- a/src/test/BurnUnitTest/BurnUnitTest.vcxproj +++ b/src/test/BurnUnitTest/BurnUnitTest.vcxproj | |||
| @@ -6,10 +6,18 @@ | |||
| 6 | <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" /> | 6 | <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" /> |
| 7 | <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.59\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.59\build\WixToolset.DUtil.props')" /> | 7 | <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.59\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.59\build\WixToolset.DUtil.props')" /> |
| 8 | <ItemGroup Label="ProjectConfigurations"> | 8 | <ItemGroup Label="ProjectConfigurations"> |
| 9 | <ProjectConfiguration Include="Debug|ARM64"> | ||
| 10 | <Configuration>Debug</Configuration> | ||
| 11 | <Platform>ARM64</Platform> | ||
| 12 | </ProjectConfiguration> | ||
| 9 | <ProjectConfiguration Include="Debug|Win32"> | 13 | <ProjectConfiguration Include="Debug|Win32"> |
| 10 | <Configuration>Debug</Configuration> | 14 | <Configuration>Debug</Configuration> |
| 11 | <Platform>Win32</Platform> | 15 | <Platform>Win32</Platform> |
| 12 | </ProjectConfiguration> | 16 | </ProjectConfiguration> |
| 17 | <ProjectConfiguration Include="Release|ARM64"> | ||
| 18 | <Configuration>Release</Configuration> | ||
| 19 | <Platform>ARM64</Platform> | ||
| 20 | </ProjectConfiguration> | ||
| 13 | <ProjectConfiguration Include="Release|Win32"> | 21 | <ProjectConfiguration Include="Release|Win32"> |
| 14 | <Configuration>Release</Configuration> | 22 | <Configuration>Release</Configuration> |
| 15 | <Platform>Win32</Platform> | 23 | <Platform>Win32</Platform> |
