Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit501cbbe

Browse files
authored
Merge pull request#838 from OneBlue/use-available-win10-sdks
List installed Win10 SDK's when looking for windows sdk tool
2 parents4919915 +a4318e1 commit501cbbe

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

‎AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
- ([@civilx64](https://github.com/civilx64))
5656
- ([@GSPP](https://github.com/GSPP))
5757
- ([@omnicognate](https://github.com/omnicognate))
58+
- ([@OneBlue](https://github.com/OneBlue))
5859
- ([@rico-chet](https://github.com/rico-chet))
5960
- ([@rmadsen-ks](https://github.com/rmadsen-ks))
6061
- ([@stonebig](https://github.com/stonebig))

‎CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
77

88
##[unreleased][]
99

10+
- Look for installed Windows 10 sdk's during installation instead of relying on specific versions.
11+
1012
###Added
1113

1214
- Added support for embedding python into dotnet core 2.0 (NetStandard 2.0)

‎setup.py

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
kits_root="SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots"
4040
kits_suffix=os.path.join("bin",ARCH)
4141

42-
WIN_SDK_KEYS=(
42+
WIN_SDK_KEYS=[
4343
RegKey(sdk_name="Windows Kit 10.0",key=kits_root,
4444
value_name="KitsRoot10",suffix=os.path.join("bin","10.0.16299.0",ARCH)),
4545

@@ -69,7 +69,7 @@
6969

7070
RegKey(sdk_name="Windows SDK 6.0A",key=sdks_root.format("6.0A\\WinSDK"),
7171
value_name="InstallationFolder",suffix=""),
72-
)
72+
]
7373

7474
VS_KEYS= (
7575
RegKey(sdk_name="MSBuild 15",key=vs_root.format("15.0"),
@@ -145,6 +145,29 @@ def _update_xlat_devtools():
145145
elifDEVTOOLS=="Mono":
146146
DEVTOOLS="dotnet"
147147

148+
def_collect_installed_windows_kits_v10(winreg):
149+
"""Adds the installed Windows 10 kits to WIN_SDK_KEYS """
150+
globalWIN_SDK_KEYS
151+
installed_kits= []
152+
153+
withwinreg.OpenKey(winreg.HKEY_LOCAL_MACHINE,kits_root,0,winreg.KEY_READ)askey:
154+
i=0
155+
whileTrue:
156+
try:
157+
installed_kits.append(winreg.EnumKey(key,i))
158+
i+=1
159+
exceptWindowsError:
160+
break
161+
162+
defmake_reg_key(version):
163+
returnRegKey(sdk_name="Windows Kit 10.0",key=kits_root,
164+
value_name="KitsRoot10",suffix=os.path.join("bin",version,ARCH))
165+
166+
WIN_SDK_KEYS+= [make_reg_key(e)foreininstalled_kitsife.startswith('10.')]
167+
168+
# Make sure this function won't be called again
169+
_collect_installed_windows_kits_v10= (lambda:None)
170+
148171
classBuildExtPythonnet(build_ext.build_ext):
149172
user_options=build_ext.build_ext.user_options+ [
150173
('xplat',None,None)
@@ -367,6 +390,8 @@ def _find_msbuild_tool(self, tool="msbuild.exe", use_windows_sdk=False):
367390
exceptImportError:# PY3
368391
importwinreg
369392

393+
_collect_installed_windows_kits_v10(winreg)
394+
370395
keys_to_check=WIN_SDK_KEYSifuse_windows_sdkelseVS_KEYS
371396
hklm=winreg.HKEY_LOCAL_MACHINE
372397
forrkeyinkeys_to_check:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp