Commit 2f2ddea1 authored by talljosh's avatar talljosh

Windows build script: use whatever version of Python 'py' refers to, and sign...

Windows build script: use whatever version of Python 'py' refers to, and sign the EXE files in one go.
parent 504a80301d41
......@@ -51,12 +51,13 @@ def deltree(dirname):
os.rmdir(dirname)
def sign_exe(exe_name):
def sign_exe(*exe_names):
ret = subprocess.run([
'signtool', 'sign', '/v', '/a', '/t', TIME_SERVER,
'/fd', 'sha256', exe_name])
'/fd', 'sha256'] + list(exe_names))
assert ret.returncode == 0
def main():
assert sys.version_info > (2, 6)
......@@ -68,9 +69,9 @@ def main():
BUILD_PATH = r'dist\trosnoth'
deltree(BUILD_PATH)
deltree(r'build\trosnoth')
assert os.system(r'pyinstaller.exe trosnoth.spec') == 0
for exe_name in ['trosnoth.exe']:
sign_exe('dist\\trosnoth\\' + exe_name)
assert os.system(r'py -m PyInstaller trosnoth.spec') == 0
exe_names = ['dist\\trosnoth\\' + name for name in ['trosnoth.exe', 'support.exe']]
sign_exe(*exe_names)
# SetOutPath '$INSTDIR\<directory>'
# File 'source-code\<filepath>'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment