Skip to content

Commit

Permalink
Merge pull request #196542 from Homebrew/omnissa-horizon-client
Browse files Browse the repository at this point in the history
  • Loading branch information
khipp authored Dec 27, 2024
2 parents 72bcca4 + d8a1b82 commit 8898e7c
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 79 deletions.
69 changes: 69 additions & 0 deletions Casks/o/omnissa-horizon-client.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
cask "omnissa-horizon-client" do
version "2412-8.14.0-12437218286,CART25FQ4_MAC_2412"
sha256 "89d4e910bed1fb03c322d22d1be75aa8172af390d08db9d3449ffeab051d0f21"

url "https://download3.omnissa.com/software/#{version.csv.second}/Omnissa-Horizon-Client-#{version.csv.first}.dmg"
name "Omnissa Horizon Client"
desc "Virtual machine client"
homepage "https://www.omnissa.com/"

livecheck do
url "https://customerconnect.omnissa.com/channel/public/api/v1.0/products/getRelatedDLGList?locale=en_US&category=desktop_end_user_computing&product=omnissa_horizon_clients&version=8&dlgType=PRODUCT_BINARY"
regex(%r{/([^/]+)/Omnissa[._-]Horizon[._-]Client[._-]v?(\d+(?:[.-]\d+)+)\.dmg}i)
strategy :json do |json, regex|
mac_json_info = json["dlgEditionsLists"]&.select { |item| item["name"]&.match(/mac/i) }&.first
api_item = mac_json_info["dlgList"]&.first
next if api_item.blank?

download_group = api_item["code"]
product_id = api_item["productId"]
pid = api_item["releasePackageId"]
next if download_group.blank? || product_id.blank? || pid.blank?

url = "https://customerconnect.omnissa.com/channel/public/api/v1.0/dlg/details?locale=en_US&downloadGroup=#{download_group}&productId=#{product_id}&rPId=#{pid}"
download_item = Homebrew::Livecheck::Strategy.page_content(url)
next if download_item[:content].blank?

match = download_item[:content].match(regex)
next if match.blank?

"#{match[2]},#{match[1]}"
end
end

auto_updates true
depends_on macos: ">= :big_sur"

pkg "Omnissa Horizon Client.pkg"

uninstall launchctl: [
"com.omnissa.horizon.CDSHelper",
"com.ws1.deem.MacUIEvents",
"com.ws1.deemd",
"com.ws1.ws1etlm",
"com.ws1.ws1etlmu",
],
quit: "com.omnissa.horizonapp",
pkgutil: [
"com.omnissa.horizon.client.mac",
"com.ws1.Deem",
"com.ws1.Deem.InstallerHelper",
"com.ws1.EndpointTelemetryService",
]

zap trash: [
"/Library/Application Support/Omnissa",
"/Library/LaunchDaemons/com.omnissa.horizon.CDSHelper.plist",
"/Library/Preferences/com.omnissa.horizon.client.mac.plist",
"/Library/PrivilegedHelperTools/com.omnissa.horizon.CDSHelper",
"~/.omnissa",
"~/Library/Application Support/Omnissa Horizon Client",
"~/Library/Caches/com.omnissa.horizon.client.mac",
"~/Library/Logs/Omnissa Horizon Client",
"~/Library/Logs/Omnissa",
"~/Library/Preferences/com.omnissa.horizon.client.mac.plist",
"~/Library/Preferences/com.omnissa.horizon.keyboard.plist",
"~/Library/Saved Application State/com.omnissa.horizon.client.mac.savedState",
"~/Library/WebKit/com.omnissa.horizon.client.mac",
]
end
79 changes: 0 additions & 79 deletions Casks/v/vmware-horizon-client.rb

This file was deleted.

1 change: 1 addition & 0 deletions cask_renames.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@
"tla-plus-toolbox": "tla+-toolbox",
"tutanota": "tuta-mail",
"vmware-fusion-tech@preview": "vmware-fusion@preview",
"vmware-horizon-client": "omnissa-horizon-client",
"xournal-plus-plus": "xournal++"
}

0 comments on commit 8898e7c

Please sign in to comment.