Commit 23f1987b authored by tsuji's avatar tsuji

・UIへの結果出力を合計に修正

ファイル毎では時間がかかり過ぎるため
・検版の並列処理にスレッド数の上限を設定
parent d0537a47
...@@ -22,19 +22,26 @@ namespace CSRender ...@@ -22,19 +22,26 @@ namespace CSRender
class CompareTIFF class CompareTIFF
{ {
public static void runPureVerify(string targetDir, string referenceDir, string workPath, public static void runPureVerify(string targetDir, string referenceDir, string workPath,
string shiftPixel, string colorMargin, string removePoint, string shadingOff, string shiftPixel, string colorMargin, string removePoint, string shadingOff, bool reportFlag,
bool reportFlag, string reportName, string inDiffPath, string inTargetFileName, DateTime inDateTime) string reportName, string inDiffPath, string inTargetFileName, DateTime inDateTime, string inReportInfo)
{ {
//実行用コンソールの呼び出し //exeのpathを取得
ProcessStartInfo processStartInfo = new ProcessStartInfo();
string appPath = System.Reflection.Assembly.GetExecutingAssembly().Location; //モジュールのパスを取得 string appPath = System.Reflection.Assembly.GetExecutingAssembly().Location; //モジュールのパスを取得
string appDirectory = appPath.Substring(0, appPath.LastIndexOf(@"\") + 1); //モジュールの存在するディレクトリを取得 string appDirectory = appPath.Substring(0, appPath.LastIndexOf(@"\") + 1); //モジュールの存在するディレクトリを取得
string exePath = System.IO.Path.Combine("PureVerify.Data", "RipVerify", "bin", "x64"); string exePath = System.IO.Path.Combine("PureVerify.Data", "RipVerify", "bin", "x64");
//実行用コンソールの呼び出し
ProcessStartInfo processStartInfo = new ProcessStartInfo();
processStartInfo.FileName = System.IO.Path.Combine(appDirectory, exePath, "PureVerify.exe"); processStartInfo.FileName = System.IO.Path.Combine(appDirectory, exePath, "PureVerify.exe");
processStartInfo.WindowStyle = ProcessWindowStyle.Minimized;
processStartInfo.CreateNoWindow = true; // コマンドプロンプトを非表示 processStartInfo.CreateNoWindow = true; // コマンドプロンプトを非表示
processStartInfo.UseShellExecute = false; // シェル機能オフ processStartInfo.UseShellExecute = false; // シェル機能オフ
processStartInfo.RedirectStandardOutput = true;//標準出力をリダイレクト processStartInfo.RedirectStandardOutput = true;//標準出力をリダイレクト
//レポートに書き込む情報を編集
inTargetFileName = System.IO.Path.GetFileNameWithoutExtension(inTargetFileName);
string reportInfoPath = MainWindow.editEachReport(appDirectory,inTargetFileName, inReportInfo, targetDir, referenceDir);
//引数設定 //引数設定
//指定ファイル //指定ファイル
processStartInfo.Arguments = "/tar "; processStartInfo.Arguments = "/tar ";
...@@ -79,14 +86,13 @@ namespace CSRender ...@@ -79,14 +86,13 @@ namespace CSRender
processStartInfo.Arguments += "\" "; processStartInfo.Arguments += "\" ";
//対象ファイル名を設定 //対象ファイル名を設定
inTargetFileName = System.IO.Path.GetFileNameWithoutExtension(inTargetFileName);
processStartInfo.Arguments += "/inspTiff \""; processStartInfo.Arguments += "/inspTiff \"";
processStartInfo.Arguments += inTargetFileName + ".pdf"; processStartInfo.Arguments += inTargetFileName + ".pdf";
processStartInfo.Arguments += "\" "; processStartInfo.Arguments += "\" ";
//レポートファイル名を設定 //レポートファイル名を設定
string timeForReport = "【" + inDateTime.ToString("yyMMdd_HHmm") + "】" + ".pdf"; string timeForReport = "【" + inDateTime.ToString("yyMMdd_HHmm") + "】" + ".pdf";
string TargetName = System.IO.Path.Combine(reportName, "report_" + inTargetFileName + ".pdf" + timeForReport); string TargetName = System.IO.Path.Combine(reportName, inTargetFileName + ".pdf" + timeForReport);
processStartInfo.Arguments += "/inspReport \""; processStartInfo.Arguments += "/inspReport \"";
processStartInfo.Arguments += TargetName; processStartInfo.Arguments += TargetName;
processStartInfo.Arguments += "\" "; processStartInfo.Arguments += "\" ";
...@@ -110,8 +116,9 @@ namespace CSRender ...@@ -110,8 +116,9 @@ namespace CSRender
//レポート記述内容の参照先 //レポート記述内容の参照先
processStartInfo.Arguments += "/topPageInfo "; processStartInfo.Arguments += "/topPageInfo ";
string textPath = System.IO.Path.Combine("PureVerify.Data", "RipVerify", "work", "OUT_INFO", "CSReportInf.txt"); //string textPath = System.IO.Path.Combine("PureVerify.Data", "RipVerify", "work", "OUT_INFO", "CSReportInf.txt");
processStartInfo.Arguments += System.IO.Path.Combine(appDirectory, textPath); //processStartInfo.Arguments += System.IO.Path.Combine(appDirectory, textPath);
processStartInfo.Arguments += reportInfoPath;
//CSRender.exeを実行 //CSRender.exeを実行
Process process = Process.Start(processStartInfo); Process process = Process.Start(processStartInfo);
...@@ -121,8 +128,7 @@ namespace CSRender ...@@ -121,8 +128,7 @@ namespace CSRender
//NGの含まれる場合レポート名の頭に【NG】を付与 //NGの含まれる場合レポート名の頭に【NG】を付与
NGReportName(TargetName, reportName); NGReportName(TargetName, reportName);
//return workDir;
} }
//指定先にレポートを移動 //指定先にレポートを移動
...@@ -158,16 +164,27 @@ namespace CSRender ...@@ -158,16 +164,27 @@ namespace CSRender
{ {
//string searchName = "report_" + inTargetName; //string searchName = "report_" + inTargetName;
string searchfile = System.IO.Path.GetFileNameWithoutExtension(inTargetName) + "&*"; string searchfile = System.IO.Path.GetFileNameWithoutExtension(inTargetName) + "&*";
var reportFileName = Directory.GetFiles(inReportPath, searchfile); var NGreportFileName = Directory.GetFiles(inReportPath, searchfile);
if (reportFileName.Length > 0) var OKreportFileName = Directory.GetFiles(inReportPath, System.IO.Path.GetFileName(inTargetName));
int NGCount = NGreportFileName.Length;
if (NGCount > 0)
{ {
foreach (var oldPathName in reportFileName) foreach (var oldPathName in NGreportFileName)
{ {
string oldFile = System.IO.Path.GetFileName(oldPathName); string oldFile = System.IO.Path.GetFileName(oldPathName);
File.Copy(oldPathName, System.IO.Path.Combine(inReportPath, "【NG】" + oldFile), true); File.Copy(oldPathName, System.IO.Path.Combine(inReportPath, "【NG】" + oldFile), true);
File.Delete(oldPathName); File.Delete(oldPathName);
} }
} }
else
{
foreach (var beforePathName in OKreportFileName)
{
string oldFile = System.IO.Path.GetFileName(beforePathName);
File.Copy(beforePathName, System.IO.Path.Combine(inReportPath, "【OK】" + oldFile), true);
File.Delete(beforePathName);
}
}
} }
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment