# HG changeset patch # User sam # Date 1715158007 -25200 # Node ID 355ef428b5f4ecc000c8398f2b60bae65badf760 # Parent 87da8f6fe70f10745bc2130858c84e830fefd2d5# Parent c066b9a633683a17cc9c9a8dbed8fc878b8ef431 merge diff -r 87da8f6fe70f -r 355ef428b5f4 semicongine/build.nim --- a/semicongine/build.nim Wed May 08 15:43:16 2024 +0700 +++ b/semicongine/build.nim Wed May 08 15:46:47 2024 +0700 @@ -84,6 +84,9 @@ proc semicongine_zip*(dir: string) = withdir dir.parentDir: + let zipFile = dir.lastPathPart & ".zip" + if zipFile.fileExists: + zipFile.rmFile() if defined(linux): exec &"zip -r {dir.lastPathPart} {dir.lastPathPart}" elif defined(windows): @@ -174,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}"