excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / s / sketchup.rb
blob2258e7eae716e4fdd50982aa35982f9969d2cb50
1 cask "sketchup" do
2   version "2024.0.598.243"
3   sha256 "bf070195914fdfa4b01d2c4a527f7bc0a0b2089e9f3f50ae4e22ec3dd2a1357f"
5   url "https://download.sketchup.com/SketchUp-#{version.dots_to_hyphens}.dmg"
6   name "SketchUp"
7   desc "3D modeling software used to create and manipulate 3D models"
8   homepage "https://www.sketchup.com/"
10   livecheck do
11     url "https://www.sketchup.com/download/all"
12     strategy :page_match
13     regex(/SketchUp-(\d+(?:-\d+)+)\.dmg/i)
14     strategy :page_match do |page, regex|
15       match = page.scan(regex).map { |v| v.first.tr("-", ".") }
16       next if match.blank?
18       match
19     end
20   end
22   depends_on macos: ">= :monterey"
24   suite "SketchUp #{version.major}"
26   zap trash: [
27     "~/Library/Application Scripts/com.sketchup.LayOut.#{version.major}.LayOutThumbnailExtension",
28     "~/Library/Application Scripts/com.sketchup.SketchUp.#{version.major}.SketchUpThumbnailExtension",
29     "~/Library/Application Support/SketchUp #{version.major}",
30     "~/Library/Caches/com.sketchup.LayOut.#{version.major}",
31     "~/Library/Caches/com.sketchup.SketchUp.#{version.major}",
32     "~/Library/Caches/com.sketchup.StyleBuilder.#{version.major}",
33     "~/Library/Containers/com.sketchup.LayOut.#{version.major}.LayOutThumbnailExtension",
34     "~/Library/Containers/com.sketchup.SketchUp.#{version.major}.SketchUpThumbnailExtension",
35     "~/Library/Preferences/com.sketchup.LayOut.#{version.major}.plist",
36     "~/Library/Preferences/com.sketchup.SketchUp.#{version.major}.plist",
37     "~/Library/Preferences/com.sketchup.StyleBuilder.#{version.major}.plist",
38     "~/Library/Preferences/Trimble.SketchUp-Helper.(Renderer).plist",
39   ]
40 end