diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 825dba2c..76e55202 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -1,7 +1,6 @@ name: Bug Report description: Report a bug. -title: "[Bug]: " -labels: ["bug"] +type: "Bug" body: - type: textarea id: description diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index c3f546d2..fb71528f 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -1,7 +1,6 @@ name: Feature Request description: Request a new feature. -title: "[Feature]: " -labels: ["enhancement"] +type: "Enhancement" body: - type: textarea id: related-to-problem @@ -30,4 +29,4 @@ body: description: All issues must be written in clear plain English so that all devs are able to read them. options: - label: Yes my issue is written in English - required: true \ No newline at end of file + required: true diff --git a/Whisky.xcodeproj/project.pbxproj b/Whisky.xcodeproj/project.pbxproj index 33a1ce88..1b7edeec 100644 --- a/Whisky.xcodeproj/project.pbxproj +++ b/Whisky.xcodeproj/project.pbxproj @@ -781,7 +781,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 41; + CURRENT_PROJECT_VERSION = 42; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"Whisky/Preview Content\""; DEVELOPMENT_TEAM = ""; @@ -800,7 +800,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 14.0; - MARKETING_VERSION = 2.3.3; + MARKETING_VERSION = 2.3.4; PRODUCT_BUNDLE_IDENTIFIER = com.isaacmarovitz.Whisky; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -820,7 +820,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 41; + CURRENT_PROJECT_VERSION = 42; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"Whisky/Preview Content\""; DEVELOPMENT_TEAM = ""; @@ -839,7 +839,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 14.0; - MARKETING_VERSION = 2.3.3; + MARKETING_VERSION = 2.3.4; PRODUCT_BUNDLE_IDENTIFIER = com.isaacmarovitz.Whisky; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -910,7 +910,7 @@ CODE_SIGN_ENTITLEMENTS = WhiskyThumbnail/WhiskyThumbnail.entitlements; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 41; + CURRENT_PROJECT_VERSION = 42; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=macosx*]" = 92S3SG4PTH; @@ -927,7 +927,7 @@ "@executable_path/../../../../Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 2.3.3; + MARKETING_VERSION = 2.3.4; PRODUCT_BUNDLE_IDENTIFIER = com.isaacmarovitz.Whisky.WhiskyThumbnail; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -946,7 +946,7 @@ CODE_SIGN_ENTITLEMENTS = WhiskyThumbnail/WhiskyThumbnail.entitlements; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 41; + CURRENT_PROJECT_VERSION = 42; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=macosx*]" = 92S3SG4PTH; @@ -963,7 +963,7 @@ "@executable_path/../../../../Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 2.3.3; + MARKETING_VERSION = 2.3.4; PRODUCT_BUNDLE_IDENTIFIER = com.isaacmarovitz.Whisky.WhiskyThumbnail; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/Whisky/Views/Bottle/ConfigView.swift b/Whisky/Views/Bottle/ConfigView.swift index 9edaa3d9..ca5bd801 100644 --- a/Whisky/Views/Bottle/ConfigView.swift +++ b/Whisky/Views/Bottle/ConfigView.swift @@ -99,6 +99,23 @@ struct ConfigView: View { ) } } + if #available(macOS 15, *) { + Toggle(isOn: $bottle.settings.avxEnabled) { + VStack(alignment: .leading) { + Text("config.avx") + if bottle.settings.avxEnabled { + HStack(alignment: .firstTextBaseline) { + Image(systemName: "exclamationmark.triangle.fill") + .symbolRenderingMode(.multicolor) + .font(.subheadline) + Text("config.avx.warning") + .fontWeight(.light) + .font(.subheadline) + } + } + } + } + } } Section("config.title.dxvk", isExpanded: $dxvkSectionExpanded) { Toggle(isOn: $bottle.settings.dxvk) { @@ -124,6 +141,15 @@ struct ConfigView: View { Text("config.metalTrace") Text("config.metalTrace.info") } + if let device = MTLCreateSystemDefaultDevice() { + // Represents the Apple family 9 GPU features that correspond to the Apple A17, M3, and M4 GPUs. + if device.supportsFamily(.apple9) { + Toggle(isOn: $bottle.settings.dxrEnabled) { + Text("config.dxr") + Text("config.dxr.info") + } + } + } } } .formStyle(.grouped) 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" diff --git a/WhiskyKit/Sources/WhiskyKit/Whisky/BottleSettings.swift b/WhiskyKit/Sources/WhiskyKit/Whisky/BottleSettings.swift index cbd9692a..e56aae79 100644 --- a/WhiskyKit/Sources/WhiskyKit/Whisky/BottleSettings.swift +++ b/WhiskyKit/Sources/WhiskyKit/Whisky/BottleSettings.swift @@ -86,6 +86,7 @@ public struct BottleWineConfig: Codable, Equatable { var wineVersion: SemanticVersion = Self.defaultWineVersion var windowsVersion: WinVersion = .win10 var enhancedSync: EnhancedSync = .msync + var avxEnabled: Bool = false public init() {} @@ -95,6 +96,7 @@ public struct BottleWineConfig: Codable, Equatable { self.wineVersion = try container.decodeIfPresent(SemanticVersion.self, forKey: .wineVersion) ?? Self.defaultWineVersion self.windowsVersion = try container.decodeIfPresent(WinVersion.self, forKey: .windowsVersion) ?? .win10 self.enhancedSync = try container.decodeIfPresent(EnhancedSync.self, forKey: .enhancedSync) ?? .msync + self.avxEnabled = try container.decodeIfPresent(Bool.self, forKey: .avxEnabled) ?? false } // swiftlint:enable line_length } @@ -102,6 +104,7 @@ public struct BottleWineConfig: Codable, Equatable { public struct BottleMetalConfig: Codable, Equatable { var metalHud: Bool = false var metalTrace: Bool = false + var dxrEnabled: Bool = false public init() {} @@ -109,6 +112,7 @@ public struct BottleMetalConfig: Codable, Equatable { let container = try decoder.container(keyedBy: CodingKeys.self) self.metalHud = try container.decodeIfPresent(Bool.self, forKey: .metalHud) ?? false self.metalTrace = try container.decodeIfPresent(Bool.self, forKey: .metalTrace) ?? false + self.dxrEnabled = try container.decodeIfPresent(Bool.self, forKey: .dxrEnabled) ?? false } } @@ -176,6 +180,11 @@ public struct BottleSettings: Codable, Equatable { set { wineConfig.windowsVersion = newValue } } + public var avxEnabled: Bool { + get { return wineConfig.avxEnabled } + set { wineConfig.avxEnabled = newValue } + } + /// The pinned programs on this bottle public var pins: [PinnedProgram] { get { return info.pins } @@ -203,6 +212,11 @@ public struct BottleSettings: Codable, Equatable { set { metalConfig.metalTrace = newValue } } + public var dxrEnabled: Bool { + get { return metalConfig.dxrEnabled } + set { metalConfig.dxrEnabled = newValue } + } + public var dxvk: Bool { get { return dxvkConfig.dxvk } set { dxvkConfig.dxvk = newValue } @@ -295,5 +309,13 @@ public struct BottleSettings: Codable, Equatable { if metalTrace { wineEnv.updateValue("1", forKey: "METAL_CAPTURE_ENABLED") } + + if avxEnabled { + wineEnv.updateValue("1", forKey: "ROSETTA_ADVERTISE_AVX") + } + + if dxrEnabled { + wineEnv.updateValue("1", forKey: "D3DM_SUPPORT_DXR") + } } }