Skip to content

Commit

Permalink
fix: wpsoffice-en
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscaner committed Sep 23, 2024
1 parent d58e4c8 commit d433f11
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions Casks/w/wpsoffice-en.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
cask "wpsoffice-en" do
arch arm: "arm64", intel: "x64"

version "0024.21300060"
lang = "zh-CN"
channel = "0024.21300060"
hdid = "11a27203ebea456b23522df31cfd8095"

version "6.10.0.8196"
sha256 :no_check

url "https://wdl1.pcfg.cache.wpscdn.com/wpsdl/macwpsoffice/download/installer/WPSOffice_#{arch}_#{version}.dmg",
url "https://wdl1.pcfg.cache.wpscdn.com/wpsdl/macwpsoffice/download/installer/WPSOffice_#{arch}_#{channel}.dmg",
verified: "wdl1.pcfg.cache.wpscdn.com/"
name "WPS Office"
desc "AI-Powered Office Suite for Everyone"
homepage "https://www.wps.com/"

livecheck do
skip "No Version Information Available"
url "https://api-web-param-us.wps.com/onlineParamByFunc?funcName=Mac_Update&version=#{version}&hdid=#{hdid}&lang=#{lang}&channel=#{channel}&devicetype=mac"
strategy :page_match do |page|
params = JSON.parse(page)["params"]

next version if params.blank?

params[0]["extras"].find { |extra| extra["key"] == "latest_version" }["value"]
end
end

auto_updates true
Expand All @@ -22,14 +33,12 @@
uninstall quit: "com.kingsoft.wpsoffice.mac.global"

zap trash: [
"/Application/WPS Office.app",
"/Applications/wpsoffice.app",
"~/Library/Application Scripts/com.kingsoft.wpsoffice.mac.global",
"~/Library/Application Support/CrashReporter/wpsoffice_1ACF1E2B-4D5C-504D-B6FE-65DDCCEC136A",
"~/Library/Caches/com.kingsoft.wpsoffice.mac.global.installer",
"~/Library/Application Scripts/com.kingsoft.wpsoffice.mac.global.recentfiles",
"~/Library/Containers/com.kingsoft.wpsoffice.mac.global",
"~/Library/Containers/recentfilesglobal",
"~/Library/Containers/com.kingsoft.wpsoffice.mac.global.recentfiles",
"~/Library/Group Containers/2G98R5QYU5.wpsoffice",
"~/Library/HTTPStorage/com.kingsoft.wpsoffice.mac.global.installer",
"~/Library/Saved Application State/com.kingsoft.wpsoffice.mac.global.installer.savedState",
"~/Library/Saved Application State/com.kingsoft.wpsoffice.mac.global.savedState",
]
end

0 comments on commit d433f11

Please sign in to comment.