# HG changeset patch # User sam # Date 1714382120 -25200 # Node ID 881be26337615b699e3214b06372fc6aa8acfc07 # Parent e61aed76463e26320e25e6d7b06c3a191fddd1b8 add: command to sign executables on windows diff -r e61aed76463e -r 881be2633761 semicongine/build.nim --- a/semicongine/build.nim Sun Apr 28 17:22:20 2024 +0700 +++ b/semicongine/build.nim Mon Apr 29 16:15:20 2024 +0700 @@ -177,3 +177,9 @@ raise newException(Exception, "Unsupported platform") let scriptPath = "..".joinPath("..").joinPath(buildscript) exec &"./{steamcmd} +login \"{steamaccount}\" \"{password}\" +run_app_build {scriptPath} +quit" + +proc semicongine_sign_executable*(file: string) = + const SIGNTOOL_EXE = "C:/Program Files (x86)/Windows Kits/10/App Certification Kit/signtool.exe" + if not SIGNTOOL_EXE.fileExists: + raise newException(Exception, &"signtool.exe not found at ({SIGNTOOL_EXE}), please install the Windows SDK") + exec $"{SIGNTOOL_EXE} sign /a /tr http://timestamp.globalsign.com/tsa/r6advanced1 /fd SHA256 /td SHA256 {file}"