homebrew-cask/Casks/unity-webgl-support-for-edi...

29 lines
999 B
Ruby

cask "unity-webgl-support-for-editor" do
version "2022.1.23f1,9636b062134a"
sha256 "ddc7059330cdc5b0d5d6e75c4612857ad06854decf5252ee03a788bb58ce8529"
url "https://download.unity3d.com/download_unity/#{version.csv.second}/MacEditorTargetInstaller/UnitySetup-WebGL-Support-for-Editor-#{version.csv.first}.pkg",
verified: "download.unity3d.com/download_unity/"
name "Unity WebGL Build Support"
desc "WebGL target support for Unity"
homepage "https://unity.com/products"
livecheck do
url "https://public-cdn.cloud.unity3d.com/hub/prod/releases-darwin.json"
strategy :page_match do |page|
page.scan(%r{
/download_unity/(\h+)/MacEditorTargetInstaller
/UnitySetup-WebGL-Support-for-Editor-(\d+(?:\.\d+)+[a-z]*\d*)\.pkg
}ix).map do |match|
"#{match[1]},#{match[0]}"
end
end
end
depends_on cask: "unity"
pkg "UnitySetup-WebGL-Support-for-Editor-#{version.csv.first}.pkg"
uninstall pkgutil: "com.unity3d.WebGLSupport"
end