3 sha256 "b1c95978bff4acab025c422fab85f83543b4e30361a53b2d9b07927938f4f71a"
5 # Current winehq packages are deprecated and these are packages from
6 # the new maintainers that will eventually be pushed to Winehq.
7 # See https://www.winehq.org/pipermail/wine-devel/2021-July/191504.html
8 url "https://github.com/Gcenx/macOS_Wine_builds/releases/download/#{version.major_minor}/wine-staging-#{version}-osx64.tar.xz",
9 verified: "github.com/Gcenx/macOS_Wine_builds/"
11 desc "Compatibility layer to run Windows applications"
12 homepage "https://wiki.winehq.org/MacOS"
14 # Not every GitHub release provides a `wine-staging` file, so we check multiple
15 # recent releases instead of only the "latest" release.
18 regex(/^v?((?:\d+(?:\.\d+)+)(?:-RC\d)?)$/i)
19 strategy :github_releases do |json, regex|
20 file_regex = /^wine[._-]staging[._-].*?$/i
23 next if release["draft"] || release["prerelease"]
24 next unless release["assets"]&.any? { |asset| asset["name"]&.match?(file_regex) }
26 match = release["tag_name"]&.match(regex)
34 conflicts_with cask: [
38 depends_on cask: "gstreamer-runtime"
39 depends_on macos: ">= :catalina"
41 app "Wine Staging.app"
42 dir_path = "#{appdir}/Wine Staging.app/Contents/Resources"
43 binary "#{dir_path}/start/bin/appdb"
44 binary "#{dir_path}/start/bin/winehelp"
45 binary "#{dir_path}/wine/bin/msidb"
46 binary "#{dir_path}/wine/bin/msiexec"
47 binary "#{dir_path}/wine/bin/notepad"
48 binary "#{dir_path}/wine/bin/regedit"
49 binary "#{dir_path}/wine/bin/regsvr32"
50 binary "#{dir_path}/wine/bin/wine"
51 binary "#{dir_path}/wine/bin/wineboot"
52 binary "#{dir_path}/wine/bin/winecfg"
53 binary "#{dir_path}/wine/bin/wineconsole"
54 binary "#{dir_path}/wine/bin/winedbg"
55 binary "#{dir_path}/wine/bin/winefile"
56 binary "#{dir_path}/wine/bin/winemine"
57 binary "#{dir_path}/wine/bin/winepath"
58 binary "#{dir_path}/wine/bin/wineserver"
61 "~/.local/share/applications/wine*",
62 "~/.local/share/icons/hicolor/**/application-x-wine*",
63 "~/.local/share/mime/application/x-wine*",
64 "~/.local/share/mime/packages/x-wine*",
67 "~/Library/Saved Application State/org.winehq.wine-staging.wine.savedState",
70 "~/.local/share/applications",
71 "~/.local/share/icons",
72 "~/.local/share/mime",