|
29 | 29 | default='https://github.com/OpenDroneMap/windows-deps/releases/download/2.6.0/vcpkg-export.zip', |
30 | 30 | required=False, |
31 | 31 | help='Path to VCPKG export archive') |
| 32 | +parser.add_argument('--signtool-path', |
| 33 | + type=str, |
| 34 | + default='', |
| 35 | + required=False, |
| 36 | + help='Path to x64 signtool.exe') |
32 | 37 | parser.add_argument('--code-sign-cert-path', |
33 | 38 | type=str, |
34 | 39 | default='', |
@@ -175,14 +180,6 @@ def dist(): |
175 | 180 | with zipfile.ZipFile(pythonzip_path) as z: |
176 | 181 | z.extractall("python312") |
177 | 182 |
|
178 | | - # Download signtool |
179 | | - signtool_path = os.path.join("SuperBuild", "download", "signtool.exe") |
180 | | - signtool_url = "https://github.com/OpenDroneMap/windows-deps/releases/download/2.5.0/signtool.exe" |
181 | | - if not os.path.exists(signtool_path): |
182 | | - print("Downloading %s" % signtool_url) |
183 | | - with urllib.request.urlopen(signtool_url) as response, open(signtool_path, 'wb') as out_file: |
184 | | - shutil.copyfileobj(response, out_file) |
185 | | - |
186 | 183 | # Download Artifact Signing Dlib |
187 | 184 | if args.azure_signing_metadata: |
188 | 185 | azure_signing_path = os.path.join("SuperBuild", "download", "microsoft.artifactsigning.client.1.0.115.nupkg") |
@@ -215,11 +212,12 @@ def dist(): |
215 | 212 |
|
216 | 213 | # Run |
217 | 214 | cs_flags = '/DSKIP_SIGN=1' |
218 | | - if args.azure_signing_metadata: |
219 | | - dlib_path = os.path.join("azuresigning", "bin", "x86", "Azure.CodeSigning.Dlib.dll") |
220 | | - cs_flags = '"/Ssigntool=$q%s$q sign /v /debug /fd SHA256 /tr http://timestamp.acs.microsoft.com /td SHA256 /dlib $q%s$q /dmdf $q%s$q $f"' % (os.path.abspath(signtool_path), os.path.abspath(dlib_path), args.azure_signing_metadata) |
221 | | - elif args.code_sign_cert_path: |
222 | | - cs_flags = '"/Ssigntool=$q%s$q sign /f $q%s$q /fd SHA1 /t http://timestamp.sectigo.com $f"' % (os.path.abspath(signtool_path), args.code_sign_cert_path) |
| 215 | + if args.signtool_path: |
| 216 | + if args.azure_signing_metadata: |
| 217 | + dlib_path = os.path.join("azuresigning", "bin", "x64", "Azure.CodeSigning.Dlib.dll") |
| 218 | + cs_flags = '"/Ssigntool=$q%s$q sign /v /debug /fd SHA256 /tr http://timestamp.acs.microsoft.com /td SHA256 /dlib $q%s$q /dmdf $q%s$q $f"' % (os.path.abspath(args.signtool_path), os.path.abspath(dlib_path), args.azure_signing_metadata) |
| 219 | + elif args.code_sign_cert_path: |
| 220 | + cs_flags = '"/Ssigntool=$q%s$q sign /f $q%s$q /fd SHA1 /t http://timestamp.sectigo.com $f"' % (os.path.abspath(args.signtool_path), args.code_sign_cert_path) |
223 | 221 | run("innosetup\\iscc /Qp " + cs_flags + " \"innosetup.iss\"") |
224 | 222 |
|
225 | 223 | print("Done! Setup created in dist/") |
|
0 commit comments