Skip to content
This repository was archived by the owner on May 11, 2025. It is now read-only.

Commit d7683c3

Browse files
committed
Add cabextract to Winetricks PATH
Fix URL SwiftLint
1 parent aadc670 commit d7683c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Whisky/Utils/Winetricks.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ class Winetricks {
4646
.appending(path: "winetricks")
4747

4848
static func runCommand(command: String, bottle: Bottle) async {
49+
guard let resourcesURL = Bundle.main.url(forResource: "cabextract", withExtension: nil)?
50+
.deletingLastPathComponent() else { return }
4951
// swiftlint:disable:next line_length
50-
let winetricksCmd = #"PATH=\"\#(GPTKInstaller.binFolder.path):$PATH\" WINE=wine64 WINEPREFIX=\"\#(bottle.url.path)\" \"\#(winetricksURL.path(percentEncoded: false))\" \#(command)"#
52+
let winetricksCmd = #"PATH=\"\#(GPTKInstaller.binFolder.path):\#(resourcesURL.path(percentEncoded: false)):$PATH\" WINE=wine64 WINEPREFIX=\"\#(bottle.url.path)\" \"\#(winetricksURL.path(percentEncoded: false))\" \#(command)"#
5153

5254
let script = """
5355
tell application "Terminal"

0 commit comments

Comments
 (0)