BuildTools: Fix build error when key files don't exist (PR
@@ -544,6 +544,8 @@ public static bool CopyKernelDriver(BuildFlags Flags)
File.WriteAllText(sigfile, string.Empty);
+ if (File.Exists(Verify.GetPath("kph.key")))
+ {
int errorcode = Win32.CreateProcess(
CustomSignToolPath,
$"sign -k {Verify.GetPath("kph.key")} {file} -s {sigfile}",
@@ -565,6 +567,7 @@ public static bool CopyKernelDriver(BuildFlags Flags)
}
}
}
+ }
if (BuildNightly)
{
@@ -612,6 +615,8 @@ public static bool SignPlugin(string PluginName)
File.WriteAllText(sigfile, string.Empty);
+ if (File.Exists(Verify.GetPath("kph.key")))
+ {
int errorcode = Win32.CreateProcess(
CustomSignToolPath,
$"sign -k {Verify.GetPath("kph.key")} {PluginName} -s {sigfile}",
@@ -630,6 +635,7 @@ public static bool SignPlugin(string PluginName)
return false;
}
}
+ }
return true;
}
