kopia lustrzana https://github.com/OpenDroneMap/ODM
Download signtool
rodzic
4b0f64e1bf
commit
fef659af41
|
@ -38,7 +38,7 @@ jobs:
|
|||
env:
|
||||
CODE_SIGN_CERT_PATH: ${{ steps.code_sign.outputs.filePath }}
|
||||
run: |
|
||||
python configure.py dist --signtool-path $((Get-Command signtool).Source) --code-sign-cert-path $env:CODE_SIGN_CERT_PATH
|
||||
python configure.py dist --code-sign-cert-path $env:CODE_SIGN_CERT_PATH
|
||||
- name: Upload Setup File
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
|
|
17
configure.py
17
configure.py
|
@ -34,11 +34,6 @@ parser.add_argument('--code-sign-cert-path',
|
|||
default='',
|
||||
required=False,
|
||||
help='Path to pfx code signing certificate')
|
||||
parser.add_argument('--signtool-path',
|
||||
type=str,
|
||||
default='',
|
||||
required=False,
|
||||
help='Path to signtool.exe')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
@ -171,6 +166,14 @@ def dist():
|
|||
with zipfile.ZipFile(pythonzip_path) as z:
|
||||
z.extractall("python38")
|
||||
|
||||
# Download signtool
|
||||
signtool_path = os.path.join("SuperBuild", "download", "signtool.exe")
|
||||
signtool_url = "https://github.com/OpenDroneMap/windows-deps/releases/download/2.5.0/signtool.exe"
|
||||
if not os.path.exists(signtool_path):
|
||||
print("Downloading %s" % signtool_url)
|
||||
with urllib.request.urlopen(signtool_url) as response, open(signtool_path, 'wb') as out_file:
|
||||
shutil.copyfileobj(response, out_file)
|
||||
|
||||
# Download innosetup
|
||||
if not os.path.isdir("innosetup"):
|
||||
innosetupzip_path = os.path.join("SuperBuild", "download", "innosetup.zip")
|
||||
|
@ -188,8 +191,8 @@ def dist():
|
|||
|
||||
# Run
|
||||
cs_flags = ""
|
||||
if args.code_sign_cert_path and args.signtool_path:
|
||||
cs_flags = '"/Ssigntool=%s sign /f %s /fd SHA1 /t http://timestamp.sectigo.com $f"' % (args.signtool_path, args.code_sign_cert_path)
|
||||
if args.code_sign_cert_path:
|
||||
cs_flags = '"/Ssigntool=%s sign /f %s /fd SHA1 /t http://timestamp.sectigo.com $f"' % (signtool_path, args.code_sign_cert_path)
|
||||
run("innosetup\\iscc /Qp " + cs_flags + " \"innosetup.iss\"")
|
||||
|
||||
print("Done! Setup created in dist/")
|
||||
|
|
Ładowanie…
Reference in New Issue