From b2ac68c44837b285dea7bd984c2016dbf647f888 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Tue, 24 Sep 2024 17:09:18 +0200 Subject: [PATCH] Report WhiskyWine version in logs --- .../Sources/WhiskyKit/Extensions/FileHandle+Extensions.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WhiskyKit/Sources/WhiskyKit/Extensions/FileHandle+Extensions.swift b/WhiskyKit/Sources/WhiskyKit/Extensions/FileHandle+Extensions.swift index 319053b5..589b6b62 100644 --- a/WhiskyKit/Sources/WhiskyKit/Extensions/FileHandle+Extensions.swift +++ b/WhiskyKit/Sources/WhiskyKit/Extensions/FileHandle+Extensions.swift @@ -18,6 +18,7 @@ import Foundation import os.log +import SemanticVersion extension FileHandle { func extract(_ type: T.Type, offset: UInt64 = 0) -> T? { @@ -73,7 +74,9 @@ extension FileHandle { header += "Bottle Name: \(bottle.settings.name)\n" header += "Bottle URL: \(bottle.url.path)\n\n" - header += "Wine Version: \(bottle.settings.wineVersion)\n" + if let version = WhiskyWineInstaller.whiskyWineVersion() { + header += "WhiskyWine Version: \(version.major).\(version.minor).\(version.patch)\n" + } header += "Windows Version: \(bottle.settings.windowsVersion)\n" header += "Enhanced Sync: \(bottle.settings.enhancedSync)\n\n"