From 9a82b3c65c9d9b323dc9150077e7ff51c01b4a58 Mon Sep 17 00:00:00 2001 From: dnobori Date: Tue, 15 Sep 2015 14:22:53 +0900 Subject: v4.19-9577-beta --- src/BuildUtil/BuildUtilCommands.cs | 7 ++++++- src/BuildUtil/CodeSign.cs | 11 +++++++---- src/BuildUtil/Win32BuildUtil.cs | 12 ++++++------ 3 files changed, 19 insertions(+), 11 deletions(-) (limited to 'src/BuildUtil') diff --git a/src/BuildUtil/BuildUtilCommands.cs b/src/BuildUtil/BuildUtilCommands.cs index 4e0c3644..78d19edd 100644 --- a/src/BuildUtil/BuildUtilCommands.cs +++ b/src/BuildUtil/BuildUtilCommands.cs @@ -1322,6 +1322,8 @@ namespace BuildUtil new ConsoleParam("DEST"), new ConsoleParam("COMMENT", ConsoleService.Prompt, "Comment: ", ConsoleService.EvalNotEmpty, null), new ConsoleParam("KERNEL"), + new ConsoleParam("CERTID"), + new ConsoleParam("SHAMODE"), }; ConsoleParamValueList vl = c.ParseCommandList(cmdName, str, args); @@ -1334,7 +1336,10 @@ namespace BuildUtil string comment = vl["COMMENT"].StrValue; bool kernel = vl["KERNEL"].BoolValue; - CodeSign.SignFile(destFileName, srcFileName, comment, kernel); + int certid = vl["CERTID"].IntValue; + int shamode = vl["SHAMODE"].IntValue; + + CodeSign.SignFile(destFileName, srcFileName, comment, kernel, certid, shamode); return 0; } diff --git a/src/BuildUtil/CodeSign.cs b/src/BuildUtil/CodeSign.cs index 0ae698df..0f1dcc34 100644 --- a/src/BuildUtil/CodeSign.cs +++ b/src/BuildUtil/CodeSign.cs @@ -260,16 +260,19 @@ namespace BuildUtil { int cert_id = UsingCertId; - SignFile(destFileName, srcFileName, comment, kernelModeDriver, cert_id); + SignFile(destFileName, srcFileName, comment, kernelModeDriver, cert_id, 0); } - public static void SignFile(string destFileName, string srcFileName, string comment, bool kernelModeDriver, int cert_id) + public static void SignFile(string destFileName, string srcFileName, string comment, bool kernelModeDriver, int cert_id, int sha_mode) { #if !BU_OSS + if (cert_id == 0) + { + cert_id = UsingCertId; + } + Con.WriteLine("Signing for '{0}'...", Path.GetFileName(destFileName)); byte[] srcData = File.ReadAllBytes(srcFileName); - int sha_mode = 0; - if (srcFileName.EndsWith(".msi", StringComparison.InvariantCultureIgnoreCase)) { sha_mode = 1; diff --git a/src/BuildUtil/Win32BuildUtil.cs b/src/BuildUtil/Win32BuildUtil.cs index 4766684c..54f987a6 100644 --- a/src/BuildUtil/Win32BuildUtil.cs +++ b/src/BuildUtil/Win32BuildUtil.cs @@ -1249,7 +1249,7 @@ namespace BuildUtil IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6_Win10\x86\Neo6_x86_" + name + ".inf"), process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.inf")), build, version, date, sys_name, name, string.Format("Neo6_x86_{0}.cat", name), true), Str.ShiftJisEncoding, false); cat_src_filename.Add("Neo6_x86_" + name + ".inf"); - IO.FileCopy(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86.sys"), Path.Combine(dst_dir, @"Neo6_Win10\x86\Neo6_x86_" + name + ".sys")); + IO.FileCopy(Path.Combine(src_dir, @"Neo6\x86\Neo6_x86_win10.sys"), Path.Combine(dst_dir, @"Neo6_Win10\x86\Neo6_x86_" + name + ".sys")); make_cat_file(Path.Combine(dst_dir, @"Neo6_Win10\x86"), cat_src_filename.ToArray(), "Neo6_x86_" + name + ".cat", true, true); } @@ -1268,7 +1268,7 @@ namespace BuildUtil IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Neo6_Win10\x64\Neo6_x64_" + name + ".inf"), process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.inf")), build, version, date, sys_name, name, string.Format("Neo6_x64_{0}.cat", name), true), Str.ShiftJisEncoding, false); cat_src_filename.Add("Neo6_x64_" + name + ".inf"); - IO.FileCopy(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64.sys"), Path.Combine(dst_dir, @"Neo6_Win10\x64\Neo6_x64_" + name + ".sys")); + IO.FileCopy(Path.Combine(src_dir, @"Neo6\x64\Neo6_x64_win10.sys"), Path.Combine(dst_dir, @"Neo6_Win10\x64\Neo6_x64_" + name + ".sys")); make_cat_file(Path.Combine(dst_dir, @"Neo6_Win10\x64"), cat_src_filename.ToArray(), "Neo6_x64_" + name + ".cat", true, true); } @@ -1303,7 +1303,7 @@ namespace BuildUtil cat_src_filename.Add("SeLow_x86.inf"); IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"SeLow_Win10\x86\SeLow_x86.inf"), process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86.inf")), build, version, date, null, null, "SeLow_Win10_x86.cat", false), Str.ShiftJisEncoding, false); - IO.FileCopy(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86.sys"), Path.Combine(dst_dir, @"SeLow_Win10\x86\SeLow_x86.sys")); + IO.FileCopy(Path.Combine(src_dir, @"SeLow\x86\SeLow_x86_win10.sys"), Path.Combine(dst_dir, @"SeLow_Win10\x86\SeLow_x86.sys")); make_cat_file(Path.Combine(dst_dir, @"SeLow_Win10\x86"), cat_src_filename.ToArray(), "SeLow_Win10_x86.cat", true, false); // SeLow x64 for Windows 10 @@ -1313,7 +1313,7 @@ namespace BuildUtil cat_src_filename.Add("SeLow_x64.inf"); IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"SeLow_Win10\x64\SeLow_x64.inf"), process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64.inf")), build, version, date, null, null, "SeLow_Win10_x64.cat", false), Str.ShiftJisEncoding, false); - IO.FileCopy(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64.sys"), Path.Combine(dst_dir, @"SeLow_Win10\x64\SeLow_x64.sys")); + IO.FileCopy(Path.Combine(src_dir, @"SeLow\x64\SeLow_x64_win10.sys"), Path.Combine(dst_dir, @"SeLow_Win10\x64\SeLow_x64.sys")); make_cat_file(Path.Combine(dst_dir, @"SeLow_Win10\x64"), cat_src_filename.ToArray(), "SeLow_Win10_x64.cat", true, false); // Wfp x86 @@ -1345,7 +1345,7 @@ namespace BuildUtil cat_src_filename.Add("pxwfp_x86.inf"); IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Wfp_Win10\x86\pxwfp_x86.inf"), process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86.inf")), build, version, date, null, null, "pxwfp_Win10_x86.cat", false), Str.ShiftJisEncoding, false); - IO.FileCopy(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86.sys"), Path.Combine(dst_dir, @"Wfp_Win10\x86\pxwfp_x86.sys")); + IO.FileCopy(Path.Combine(src_dir, @"Wfp\x86\pxwfp_x86_win10.sys"), Path.Combine(dst_dir, @"Wfp_Win10\x86\pxwfp_x86.sys")); make_cat_file(Path.Combine(dst_dir, @"Wfp_Win10\x86"), cat_src_filename.ToArray(), "pxwfp_Win10_x86.cat", true, false); // Wfp x64 for Windows 10 @@ -1355,7 +1355,7 @@ namespace BuildUtil cat_src_filename.Add("pxwfp_x64.inf"); IO.WriteAllTextWithEncoding(Path.Combine(dst_dir, @"Wfp_Win10\x64\pxwfp_x64.inf"), process_inf_file(IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64.inf")), build, version, date, null, null, "pxwfp_Win10_x64.cat", false), Str.ShiftJisEncoding, false); - IO.FileCopy(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64.sys"), Path.Combine(dst_dir, @"Wfp_Win10\x64\pxwfp_x64.sys")); + IO.FileCopy(Path.Combine(src_dir, @"Wfp\x64\pxwfp_x64_win10.sys"), Path.Combine(dst_dir, @"Wfp_Win10\x64\pxwfp_x64.sys")); make_cat_file(Path.Combine(dst_dir, @"Wfp_Win10\x64"), cat_src_filename.ToArray(), "pxwfp_Win10_x64.cat", true, false); string tmp_body = IO.ReadAllTextWithAutoGetEncoding(Path.Combine(src_dir, "make_whql_submission.cm_")); -- cgit v1.2.3