|
@@ -88,6 +88,32 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
|
|
|
DispatchQueue.main.async {
|
|
|
self.view.window?.title = "KdanAuto:"+CPDFConvertKit.sharedInstance().versionString
|
|
|
}
|
|
|
+
|
|
|
+// DispatchQueue.global().async {
|
|
|
+// let path = "/Users/zhudongyong/Desktop/Report_image";
|
|
|
+//
|
|
|
+// let items = FileManager.default.subpaths(atPath: path)
|
|
|
+//
|
|
|
+// let semaphore = DispatchSemaphore(value: 20)
|
|
|
+// for item in items! {
|
|
|
+// if NSString(string: item as! String).contains("_CPU.png") {
|
|
|
+// let checkPath = path.appending("/\(item)")
|
|
|
+// let nName = NSString(string: item).replacingOccurrences(of: "_CPU", with: "_GPU")
|
|
|
+// let resultPath = path.appending("/\(nName)")
|
|
|
+// let index = items!.firstIndex(of: item);
|
|
|
+// let progress = 100 * Float(index!)/Float(items!.count)
|
|
|
+//
|
|
|
+// semaphore.wait()
|
|
|
+// DispatchQueue.global().async {
|
|
|
+// let degree = ImageProcess.compareJPEG(resultPath, checkPath: checkPath, processCover: false)
|
|
|
+// if (degree != 100) {
|
|
|
+// NSLog("[\(degree)][\(progress)]\(nName)");
|
|
|
+// }
|
|
|
+// semaphore.signal()
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
override func awakeFromNib() {
|