init
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
This commit is contained in:
35
cmake/validate_d3d_compiler.py
Normal file
35
cmake/validate_d3d_compiler.py
Normal file
@@ -0,0 +1,35 @@
|
||||
# This file is part of Desktop App Toolkit,
|
||||
# a set of libraries for developing nice desktop applications.
|
||||
#
|
||||
# For license and copyright information please follow this link:
|
||||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||
|
||||
from __future__ import print_function
|
||||
import sys, os, re, hashlib
|
||||
|
||||
def error(*args, **kwargs):
|
||||
print(*args, file=sys.stderr, **kwargs)
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
from win32api import GetFileVersionInfo
|
||||
except ImportError:
|
||||
error('Python module "pywin32" is not installed.\n\nTry "' + sys.executable + ' -m pip install pywin32".')
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
error('Expected input path to "d3dcompiler_47.dll".')
|
||||
|
||||
inputPath = sys.argv[1]
|
||||
if not os.path.exists(inputPath):
|
||||
error('File "' + inputPath + '" doesn\'t exist.')
|
||||
|
||||
info = GetFileVersionInfo(inputPath, '\\')
|
||||
version = [ info['FileVersionMS'] // 65536, info['FileVersionMS'] % 65536, info['FileVersionLS'] // 65536, info['FileVersionLS'] % 65536 ]
|
||||
if (version != [10, 0, 22621, 3233]):
|
||||
error('Bad "d3dcompiler_47.dll" version: ' + '.'.join(str(x) for x in version))
|
||||
|
||||
bufferSize = 1024 * 1024
|
||||
sha256 = hashlib.sha256()
|
||||
|
||||
with open(inputPath, 'rb') as f:
|
||||
print(hashlib.sha256(f.read()).hexdigest())
|
||||
Reference in New Issue
Block a user