##// END OF EJS Templates
pyoxidizer: support code signing...
Gregory Szorc -
r47977:c8001d9c default
parent child Browse files
Show More
@@ -8,12 +8,29 b''
8 #
8 #
9 # EXTRA_MSI_FEATURES
9 # EXTRA_MSI_FEATURES
10 # ; delimited string of extra features to advertise in the built MSA.
10 # ; delimited string of extra features to advertise in the built MSA.
11 #
12 # SIGNING_PFX_PATH
13 # Path to code signing certificate to use.
14 #
15 # SIGNING_PFX_PASSWORD
16 # Password to code signing PFX file defined by SIGNING_PFX_PATH.
17 #
18 # SIGNING_SUBJECT_NAME
19 # String fragment in code signing certificate subject name used to find
20 # code signing certificate in Windows certificate store.
21 #
22 # TIME_STAMP_SERVER_URL
23 # URL of time-stamp token authority (RFC 3161) servers to stamp code signatures.
11
24
12 ROOT = CWD + "/../.."
25 ROOT = CWD + "/../.."
13
26
14 VERSION = VARS.get("VERSION", "5.8")
27 VERSION = VARS.get("VERSION", "5.8")
15 MSI_NAME = VARS.get("MSI_NAME", "mercurial")
28 MSI_NAME = VARS.get("MSI_NAME", "mercurial")
16 EXTRA_MSI_FEATURES = VARS.get("EXTRA_MSI_FEATURES")
29 EXTRA_MSI_FEATURES = VARS.get("EXTRA_MSI_FEATURES")
30 SIGNING_PFX_PATH = VARS.get("SIGNING_PFX_PATH")
31 SIGNING_PFX_PASSWORD = VARS.get("SIGNING_PFX_PASSWORD", "")
32 SIGNING_SUBJECT_NAME = VARS.get("SIGNING_SUBJECT_NAME")
33 TIME_STAMP_SERVER_URL = VARS.get("TIME_STAMP_SERVER_URL", "http://timestamp.digicert.com")
17
34
18 IS_WINDOWS = "windows" in BUILD_TARGET_TRIPLE
35 IS_WINDOWS = "windows" in BUILD_TARGET_TRIPLE
19
36
@@ -230,6 +247,24 b' def make_msi(manifest):'
230 return wix
247 return wix
231
248
232
249
250 def register_code_signers():
251 if not IS_WINDOWS:
252 return
253
254 if SIGNING_PFX_PATH:
255 signer = code_signer_from_pfx_file(SIGNING_PFX_PATH, SIGNING_PFX_PASSWORD)
256 elif SIGNING_SUBJECT_NAME:
257 signer = code_signer_from_windows_store_subject(SIGNING_SUBJECT_NAME)
258 else:
259 signer = None
260
261 if signer:
262 signer.set_time_stamp_server(TIME_STAMP_SERVER_URL)
263 signer.activate()
264
265
266 register_code_signers()
267
233 register_target("distribution", make_distribution)
268 register_target("distribution", make_distribution)
234 register_target("exe", make_exe, depends = ["distribution"])
269 register_target("exe", make_exe, depends = ["distribution"])
235 register_target("app", make_manifest, depends = ["distribution", "exe"], default = True)
270 register_target("app", make_manifest, depends = ["distribution", "exe"], default = True)
General Comments 0
You need to be logged in to leave comments. Login now