diff options
author | Be <be@mixxx.org> | 2018-10-22 18:25:46 -0500 |
---|---|---|
committer | Be <be@mixxx.org> | 2018-10-22 18:25:46 -0500 |
commit | 46fe39f99619b5d6ff96b4946e674ed2a48286f0 (patch) | |
tree | 5889e0cee5032aa95b47603594d8af58a32097ca /build/windows | |
parent | 8026db26bd889f79c5d84f442638ac15352dd190 (diff) | |
parent | e8de37b2968abef63fe75fc8f65f5b5f03d35c99 (diff) |
Merge remote-tracking branch 'upstream/2.1' into 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' |