diff --git a/Configs/Base.xcconfig b/Configs/Base.xcconfig index 789d3d2..fe65cdf 100644 --- a/Configs/Base.xcconfig +++ b/Configs/Base.xcconfig @@ -1,3 +1,3 @@ -MARKETING_VERSION = 0.1.2 +MARKETING_VERSION = 0.1.3 CURRENT_PROJECT_VERSION = 0 DEBUG_MODE = NO diff --git a/PCL.Mac/App/AppDelegate.swift b/PCL.Mac/App/AppDelegate.swift index 876d195..c073931 100644 --- a/PCL.Mac/App/AppDelegate.swift +++ b/PCL.Mac/App/AppDelegate.swift @@ -45,6 +45,11 @@ class AppDelegate: NSObject, NSApplicationDelegate { try SwiftScaffolding.Logger.enableLogging(url: URLConstants.logsDirectoryURL.appending(path: "swift-scaffolding.log")) } _ = LauncherConfig.shared + executeTask("清理临时文件") { + for url in try FileManager.default.contentsOfDirectory(at: URLConstants.tempURL, includingPropertiesForKeys: nil) { + try FileManager.default.removeItem(at: url) + } + } executeTask("加载版本缓存") { try VersionCache.load() } diff --git a/PCL.Mac/ContentView.swift b/PCL.Mac/ContentView.swift index fe6c908..3d47c5a 100644 --- a/PCL.Mac/ContentView.swift +++ b/PCL.Mac/ContentView.swift @@ -176,7 +176,7 @@ private struct ExtraButtonsOverlay: View { Image(imageName) .resizable() .scaledToFit() - .padding(12) + .padding(10) .foregroundStyle(Color.color8) } .gesture( diff --git a/PCL.Mac/Managers/MinecraftLaunchManager.swift b/PCL.Mac/Managers/MinecraftLaunchManager.swift index 1b1e52c..6d6f0eb 100644 --- a/PCL.Mac/Managers/MinecraftLaunchManager.swift +++ b/PCL.Mac/Managers/MinecraftLaunchManager.swift @@ -50,6 +50,8 @@ class MinecraftLaunchManager: ObservableObject { if ![0, 9, 15, 128 + 9, 128 + 15].contains(process.terminationStatus) { log("游戏非正常退出") self?.onGameCrash(instance: instance, options: launcher.options, logURL: launcher.logURL) + } else { + try? FileManager.default.removeItem(at: launcher.logURL) } DispatchQueue.main.async { self?.cancel()