win_toolchain: Add another source dir for dbghelp.dll when packaging the toolchain

It appears that newer VS 2017 installers install CppUnitFramework in different
way. My version VS 15.6.6. The problem is that normal users do not seem to be
able to download the VS 15.3.2 that Chromium suggests and this script was
probably originally tested with.

I installed:
vs_professional__428566190.xxx.exe
  --add Microsoft.VisualStudio.Workload.NativeDesktop
  --add Microsoft.VisualStudio.Component.Debugger.JustInTime
  --add Microsoft.VisualStudio.Component.Graphics.Tools
  --add Microsoft.VisualStudio.Component.Graphics.Win81
  --add Microsoft.VisualStudio.Component.NuGet
  --add Microsoft.VisualStudio.Component.Static.Analysis.Tools
  --add Microsoft.VisualStudio.Component.VC.ATL
  --add Microsoft.VisualStudio.Component.VC.DiagnosticTools
  --add Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest
  --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64
  --add Microsoft.VisualStudio.Component.Windows10SDK.15063.Desktop
  --add Microsoft.VisualStudio.Component.Windows10SDK.15063.UWP
  --add Microsoft.VisualStudio.Component.Windows10SDK.15063.UWP.Native

 Go to apps -> Windows sdk 15063
  Modify  -> Change
   Select Debugging tools for Windows

Ended up with VS 15.6.6 and Windows SDK 10.0.15063.673

Packaged with:
  python  %HOME%\depot_tools\win_toolchain\package_from_installed.py -w 10.0.15063.0 2017

Bug: 834656
Change-Id: I5e6bf6a5f94a28d5ba81a3c8cd79e37028b9429b
Reviewed-on: https://chromium-review.googlesource.com/1018470
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
changes/70/1018470/6
Kimmo Kinnunen 7 years ago committed by Commit Bot
parent 7c3ff1311a
commit d3f2c8e783

@ -198,13 +198,20 @@ def BuildFileList(override_dir):
# The recommended fix is to copy dbghelp.dll from the VS install instead,
# as done here:
if VS_VERSION == '2017' and combined.endswith('dbghelp.dll'):
good_dbghelp_path = os.path.join(vs_path, 'Common7', 'IDE',
'CommonExtensions', 'Microsoft', 'TestWindow',
'Extensions', 'CppUnitFramework')
if combined.count('\\x64\\') > 0:
combined = os.path.join(good_dbghelp_path, 'x64', 'dbghelp.dll')
else:
combined = os.path.join(good_dbghelp_path, 'dbghelp.dll')
prefix_path = os.path.join(vs_path, 'Common7', 'IDE',
'CommonExtensions', 'Microsoft',
'TestWindow', 'Extensions')
arch_dir = 'x64' if combined.count('\\x64\\') > 0 else ''
good_dbghelp_path_candidates = [
os.path.join(prefix_path, 'CppUnitFramework', arch_dir,
'dbghelp.dll'),
os.path.join(prefix_path, 'Cpp', arch_dir, 'dbghelp.dll')
]
combined = good_dbghelp_path_candidates[0]
for c in good_dbghelp_path_candidates:
if os.path.exists(c):
combined = c
break
result.append((combined, to))
# Copy the x86 ucrt DLLs to all directories with 32-bit binaries that are

Loading…
Cancel
Save