obs@beta: migrate
This commit is contained in:
parent
f4555a6810
commit
330c864289
|
@ -0,0 +1,46 @@
|
|||
cask "obs@beta" do
|
||||
arch arm: "Apple", intel: "Intel"
|
||||
livecheck_folder = on_arch_conditional arm: "arm64", intel: "x86_64"
|
||||
|
||||
version "30.1.0-rc1"
|
||||
sha256 arm: "2a749d1308029a039e4cad6223076d90fa30a86c11e1e1271ac82ae7596624fe",
|
||||
intel: "15af4c79230a18f7e48cb1c2182b97b13b09420130cccf805814cbe77c009c41"
|
||||
|
||||
url "https://cdn-fastly.obsproject.com/downloads/OBS-Studio-#{version}-macOS-#{arch}.dmg"
|
||||
name "OBS"
|
||||
desc "Open-source software for live streaming and screen recording"
|
||||
homepage "https://obsproject.com/forum/list/test-builds.20/"
|
||||
|
||||
livecheck do
|
||||
url "https://obsproject.com/osx_update/updates_#{livecheck_folder}_v2.xml"
|
||||
regex(/obs[._-]studio[._-](\d+(?:[.-]\d+)+(?:(?:-beta)|(?:-rc))\d+)[._-]macos/i)
|
||||
strategy :sparkle do |items, regex|
|
||||
items.find { |item| item.channel == "beta" }&.url&.scan(regex)&.flatten
|
||||
end
|
||||
end
|
||||
|
||||
auto_updates true
|
||||
conflicts_with cask: "obs"
|
||||
depends_on macos: ">= :big_sur"
|
||||
|
||||
app "OBS.app"
|
||||
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
|
||||
shimscript = "#{staged_path}/obs.wrapper.sh"
|
||||
binary shimscript, target: "obs"
|
||||
|
||||
preflight do
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/bash
|
||||
exec '#{appdir}/OBS.app/Contents/MacOS/OBS' "$@"
|
||||
EOS
|
||||
end
|
||||
|
||||
uninstall delete: "/Library/CoreMediaIO/Plug-Ins/DAL/obs-mac-virtualcam.plugin"
|
||||
|
||||
zap trash: [
|
||||
"~/Library/Application Support/obs-studio",
|
||||
"~/Library/HTTPStorages/com.obsproject.obs-studio",
|
||||
"~/Library/Preferences/com.obsproject.obs-studio.plist",
|
||||
"~/Library/Saved Application State/com.obsproject.obs-studio.savedState",
|
||||
]
|
||||
end
|
Loading…
Reference in New Issue