Add support for an inline TAEF install rather than requiring WDK (#196)
Adds support for SDK 10.0.15063.0. Adds support for TAEF download into external dir, no WDK required.
This commit is contained in:
Родитель
892e7953fd
Коммит
2cce7933fb
|
@ -49,6 +49,7 @@ autoconf/autom4te.cache
|
|||
# Directories to ignore (do not add trailing '/'s, they skip symlinks).
|
||||
#==============================================================================#
|
||||
# External projects that are tracked independently.
|
||||
external/*
|
||||
projects/*
|
||||
!projects/*.*
|
||||
!projects/Makefile
|
||||
|
|
|
@ -7,6 +7,7 @@ get_filename_component(WINDOWS_KIT_81_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Micro
|
|||
set(pfx86 "programfiles(x86)") # Work around behavior for environment names allows chars.
|
||||
find_path(TAEF_INCLUDE_DIR # Set variable TAEF_INCLUDE_DIR
|
||||
Wex.Common.h # Find a path with Wex.Common.h
|
||||
HINTS "${CMAKE_SOURCE_DIR}/external/taef/build/Include"
|
||||
HINTS "${WINDOWS_KIT_10_PATH}/Testing/Development/inc"
|
||||
HINTS "${WINDOWS_KIT_81_PATH}/Testing/Development/inc"
|
||||
DOC "path to TAEF header files"
|
||||
|
@ -15,24 +16,33 @@ find_path(TAEF_INCLUDE_DIR # Set variable TAEF_INCLUDE_DIR
|
|||
|
||||
if (CMAKE_GENERATOR MATCHES "Visual Studio.*Win64" )
|
||||
find_library(TAEF_COMMON_LIBRARY NAMES Te.Common.lib
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../Library/x64
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../lib/x64 )
|
||||
find_library(TAEF_WEX_COMMON_LIBRARY NAMES Wex.Common.lib
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../Library/x64
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../lib/x64 )
|
||||
find_library(TAEF_WEX_LOGGER_LIBRARY NAMES Wex.Logger.lib
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../Library/x64
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../lib/x64 )
|
||||
elseif (CMAKE_GENERATOR MATCHES "Visual Studio.*ARM" )
|
||||
find_library(TAEF_COMMON_LIBRARY NAMES Te.Common.lib
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../Library/arm
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../lib/arm )
|
||||
find_library(TAEF_WEX_COMMON_LIBRARY NAMES Wex.Common.lib
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../Library/arm
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../lib/arm )
|
||||
find_library(TAEF_WEX_LOGGER_LIBRARY NAMES Wex.Logger.lib
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../Library/arm
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../lib/arm )
|
||||
else (CMAKE_GENERATOR MATCHES "Visual Studio.*Win64" )
|
||||
find_library(TAEF_COMMON_LIBRARY NAMES Te.Common.lib
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../Library/x86
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../lib/x86 )
|
||||
find_library(TAEF_WEX_COMMON_LIBRARY NAMES Wex.Common.lib
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../Library/x86
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../lib/x86 )
|
||||
find_library(TAEF_WEX_LOGGER_LIBRARY NAMES Wex.Logger.lib
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../Library/x86
|
||||
HINTS ${TAEF_INCLUDE_DIR}/../lib/x86 )
|
||||
endif (CMAKE_GENERATOR MATCHES "Visual Studio.*Win64" )
|
||||
|
||||
|
@ -40,7 +50,9 @@ set(TAEF_LIBRARIES ${TAEF_COMMON_LIBRARY} ${TAEF_WEX_COMMON_LIBRARY} ${TAEF_WEX_
|
|||
set(TAEF_INCLUDE_DIRS ${TAEF_INCLUDE_DIR})
|
||||
|
||||
# Prefer the version that supports both x86 and x64, else prefer latest.
|
||||
if(EXISTS "${WINDOWS_KIT_10_PATH}/Testing/Runtimes/TAEF/x86/te.exe"
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/external/taef/build/Binaries/amd64/te.exe")
|
||||
set(TAEF_BIN_DIR "${WINDOWS_KIT_10_PATH}/Testing/Runtimes/TAEF")
|
||||
elseif(EXISTS "${WINDOWS_KIT_10_PATH}/Testing/Runtimes/TAEF/x86/te.exe"
|
||||
AND EXISTS "${WINDOWS_KIT_10_PATH}/Testing/Runtimes/TAEF/x64/te.exe")
|
||||
set(TAEF_BIN_DIR "${WINDOWS_KIT_10_PATH}/Testing/Runtimes/TAEF")
|
||||
elseif(EXISTS "${WINDOWS_KIT_81_PATH}/Testing/Runtimes/TAEF/x86/te.exe"
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
import urllib
|
||||
import os
|
||||
import zipfile
|
||||
|
||||
url = "https://github.com/Microsoft/WinObjC/raw/develop/deps/prebuilt/nuget/taef.redist.wlk.1.0.170206001-nativetargets.nupkg"
|
||||
zipfile_name = os.path.join(os.environ['TEMP'], "taef.redist.wlk.1.0.170206001-nativetargets.nupkg.zip")
|
||||
src_dir = os.environ['HLSL_SRC_DIR']
|
||||
taef_dir = os.path.join(src_dir, "external", "taef")
|
||||
|
||||
if not os.path.isdir(taef_dir):
|
||||
os.mkdir(taef_dir)
|
||||
|
||||
urllib.urlretrieve(url, zipfile_name)
|
||||
z = zipfile.ZipFile(zipfile_name)
|
||||
z.extractall(taef_dir)
|
||||
z.close()
|
||||
|
|
@ -134,10 +134,12 @@ if exist "%programfiles%\windows kits\10\Testing\Runtimes\TAEF\Te.exe" set path=
|
|||
if exist "%programfiles(x86)%\windows kits\10\Testing\Runtimes\TAEF\Te.exe" set path=%path%;%programfiles(x86)%\windows kits\10\Testing\Runtimes\TAEF
|
||||
if exist "%programfiles%\windows kits\8.1\Testing\Runtimes\TAEF\Te.exe" set path=%path%;%programfiles%\windows kits\8.1\Testing\Runtimes\TAEF
|
||||
if exist "%programfiles(x86)%\windows kits\8.1\Testing\Runtimes\TAEF\Te.exe" set path=%path%;%programfiles(x86)%\windows kits\8.1\Testing\Runtimes\TAEF
|
||||
if exist "%HLSL_SRC_DIR%\external\taef\build\Binaries\amd64\TE.exe" set path=%path%;%HLSL_SRC_DIR%\external\taef\build\Binaries\amd64
|
||||
where te.exe 1>nul 2>nul
|
||||
if errorlevel 1 (
|
||||
echo Unable to find TAEF te.exe on path - you will have to add this before running tests.
|
||||
echo WDK includes TAEF and is available from https://msdn.microsoft.com/en-us/windows/hardware/dn913721.aspx
|
||||
echo Alternatively, consider a project-local install by running %HLSL_SRC_DIR%\utils\hct\hctgettaef.py
|
||||
echo Please see the README.md instructions in the project root.
|
||||
exit /b 1
|
||||
)
|
||||
|
@ -178,7 +180,11 @@ if not exist "%kit_root%" (
|
|||
echo Windows 10 SDK was installed but is not accessible.
|
||||
exit /b 1
|
||||
)
|
||||
rem 10.0.14393.0 will work properly. Reject 10586 and 10240 explicitly.
|
||||
rem 10.0.15063.0 and 10.0.14393.0 will work properly. Reject 10586 and 10240 explicitly.
|
||||
if exist "%kit_root%\include\10.0.15063.0\um\d3d12.h" (
|
||||
echo Found Windows SDK 10.0.15063.0
|
||||
goto :eof
|
||||
)
|
||||
if exist "%kit_root%\include\10.0.14393.0\um\d3d12.h" (
|
||||
echo Found Windows SDK 10.0.14393.0
|
||||
goto :eof
|
||||
|
|
Загрузка…
Ссылка в новой задаче