diff options
author | Be <be@mixxx.org> | 2018-10-22 18:32:23 -0500 |
---|---|---|
committer | Be <be@mixxx.org> | 2018-10-22 18:32:23 -0500 |
commit | 9c353dbfda68159521b55b2fbc42d053085cef0a (patch) | |
tree | 3a87e05a735c9eb0e28f2a356d5b860f078846e5 /build/windows | |
parent | 24aab8c2657b23328dffb633ecda0302417f293d (diff) | |
parent | 46fe39f99619b5d6ff96b4946e674ed2a48286f0 (diff) |
Merge remote-tracking branch 'upstream/2.2'
Diffstat (limited to 'build/windows')
-rw-r--r-- | build/windows/__init__.py | 0 | ||||
-rw-r--r-- | build/windows/signtool.py | 29 |
2 files changed, 29 insertions, 0 deletions
diff --git a/build/windows/__init__.py b/build/windows/__init__.py new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/build/windows/__init__.py diff --git a/build/windows/signtool.py b/build/windows/signtool.py new file mode 100644 index 0000000000..00a3ac8c16 --- /dev/null +++ b/build/windows/signtool.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python + +import os +import SCons +from SCons.Builder import Builder +from SCons.Script import * + +def signtool_path(subject_name, path): + print("Running signtool: ", path) + command = "signtool sign /n \"%s\" /v /debug %s" % (subject_name, path) + if os.system(command) != 0: + raise Exception('signtool failed: ' + command) + +def do_signtool(target, source, env): + print('do_signtool', target, source, env) + subject_name = env.get('SUBJECT_NAME', '') + + for s in source: + path = str(s) + if path.endswith('.exe') or path.endswith('.dll'): + signtool_path(subject_name, path) + +SignTool = Builder(action = do_signtool) + +def generate(env): + env['BUILDERS']['SignTool'] = SignTool + +def exists(env): + return os.platform == 'windows' |