Merge pull request #20210 from Homebrew/migrate-casks
[Homebrew/homebrew-cask-versions.git] / Casks / wine-staging.rb
blobfc426aea787ffe156431fccce1198ad7685c5f84
1 cask "wine-staging" do
2   version "9.7"
3   sha256 "8d5231668c862f7cffa8b5ff2d19d30b550859c13967bee4e62ffc7d309ca699"
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/"
10   name "WineHQ-staging"
11   desc "Compatibility layer to run Windows applications"
12   homepage "https://wiki.winehq.org/MacOS"
14   livecheck do
15     url :url
16     strategy :github_latest
17     regex(/^v?((?:\d+(?:\.\d+)+)(?:-RC\d)?)$/i)
18   end
20   conflicts_with cask: [
21     "wine-stable",
22     "wine-devel",
23   ]
24   depends_on cask: "gstreamer-runtime"
25   depends_on macos: ">= :catalina"
27   app "Wine Staging.app"
28   dir_path = "#{appdir}/Wine Staging.app/Contents/Resources"
29   binary "#{dir_path}/start/bin/appdb"
30   binary "#{dir_path}/start/bin/winehelp"
31   binary "#{dir_path}/wine/bin/msidb"
32   binary "#{dir_path}/wine/bin/msiexec"
33   binary "#{dir_path}/wine/bin/notepad"
34   binary "#{dir_path}/wine/bin/regedit"
35   binary "#{dir_path}/wine/bin/regsvr32"
36   binary "#{dir_path}/wine/bin/wine"
37   binary "#{dir_path}/wine/bin/wine-preloader"
38   binary "#{dir_path}/wine/bin/wine64"
39   binary "#{dir_path}/wine/bin/wine64-preloader"
40   binary "#{dir_path}/wine/bin/wineboot"
41   binary "#{dir_path}/wine/bin/winecfg"
42   binary "#{dir_path}/wine/bin/wineconsole"
43   binary "#{dir_path}/wine/bin/winedbg"
44   binary "#{dir_path}/wine/bin/winefile"
45   binary "#{dir_path}/wine/bin/winemine"
46   binary "#{dir_path}/wine/bin/winepath"
47   binary "#{dir_path}/wine/bin/wineserver"
49   zap trash: [
50         "~/.local/share/applications/wine*",
51         "~/.local/share/icons/hicolor/**/application-x-wine*",
52         "~/.local/share/mime/application/x-wine*",
53         "~/.local/share/mime/packages/x-wine*",
54         "~/.wine",
55         "~/.wine32",
56         "~/Library/Saved Application State/org.winehq.wine-staging.wine.savedState",
57       ],
58       rmdir: [
59         "~/.local/share/applications",
60         "~/.local/share/icons",
61         "~/.local/share/mime",
62       ]
64   caveats <<~EOS
65     #{token} supports both 32-bit and 64-bit. It is compatible with an existing
66     32-bit wine prefix, but it will now default to 64-bit when you create a new
67     wine prefix. The architecture can be selected using the WINEARCH environment
68     variable which can be set to either win32 or win64.
70     To create a new pure 32-bit prefix, you can run:
71       $ WINEARCH=win32 WINEPREFIX=~/.wine32 winecfg
73     See the Wine FAQ for details: https://wiki.winehq.org/FAQ#Wineprefixes
74   EOS
75 end