changeset 1020:355ef428b5f4

merge
author sam <sam@basx.dev>
date Wed, 08 May 2024 15:46:47 +0700
parents 87da8f6fe70f (current diff) c066b9a63368 (diff)
children 73b572f82a1f
files
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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}"