# HG changeset patch # User sam # Date 1714382120 -25200 # Node ID 1953a7ba41612e51a59f432abcbf4cdbb68222b4 # Parent 2762e6dd5f90592a42aebd27a9a8a2e6b20565eb add: command to sign executables on windows diff -r 2762e6dd5f90 -r 1953a7ba4161 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}"