-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
/
microsoft-office-businesspro.rb
132 lines (126 loc) 路 6.31 KB
/
microsoft-office-businesspro.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
cask "microsoft-office-businesspro" do
version "16.85.24051214"
sha256 "4678b6a657d1b3a5e1b00903a232aba8fa12ee766f1539cc3b52edf71df49a5f"
url "https://officecdnmac.microsoft.com/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/Microsoft_365_and_Office_#{version}_BusinessPro_Installer.pkg"
name "Microsoft Office BusinessPro"
desc "Office suite"
homepage "https://www.microsoft.com/en-us/microsoft-365/mac/microsoft-365-for-mac/"
livecheck do
url "https://go.microsoft.com/fwlink/p/?linkid=2009112"
regex(/(\d+(?:\.\d+)+)/i)
strategy :header_match
end
auto_updates true
conflicts_with cask: %w[
microsoft-excel
microsoft-office
microsoft-onenote
microsoft-outlook
microsoft-powerpoint
microsoft-teams
microsoft-teams@classic
microsoft-word
onedrive
]
depends_on cask: "microsoft-auto-update"
depends_on macos: ">= :monterey"
pkg "Microsoft_365_and_Office_#{version}_BusinessPro_Installer.pkg",
choices: [
{
"choiceIdentifier" => "com.microsoft.autoupdate", # Office16_all_autoupdate.pkg
"choiceAttribute" => "selected",
"attributeSetting" => 0,
},
]
uninstall launchctl: [
"com.microsoft.office.licensing.helper",
"com.microsoft.office.licensingV2.helper",
"com.microsoft.OneDriveStandaloneUpdater",
"com.microsoft.OneDriveStandaloneUpdaterDaemon",
"com.microsoft.OneDriveUpdaterDaemon",
"com.microsoft.SyncReporter",
"com.microsoft.teams.TeamsUpdaterDaemon",
],
quit: "com.microsoft.autoupdate2",
pkgutil: [
"com.microsoft.MSTeamsAudioDevice",
"com.microsoft.OneDrive",
"com.microsoft.package.DFonts",
"com.microsoft.package.Frameworks",
"com.microsoft.package.Microsoft_AutoUpdate.app",
"com.microsoft.package.Microsoft_Excel.app",
"com.microsoft.package.Microsoft_OneNote.app",
"com.microsoft.package.Microsoft_Outlook.app",
"com.microsoft.package.Microsoft_PowerPoint.app",
"com.microsoft.package.Microsoft_Word.app",
"com.microsoft.package.Proofing_Tools",
"com.microsoft.pkg.licensing",
"com.microsoft.teams",
"com.microsoft.wdav",
],
delete: [
"/Applications/Microsoft Defender.app",
"/Applications/Microsoft Excel.app",
"/Applications/Microsoft OneNote.app",
"/Applications/Microsoft Outlook.app",
"/Applications/Microsoft PowerPoint.app",
"/Applications/Microsoft Teams.app",
"/Applications/Microsoft Word.app",
"/Applications/OneDrive.app",
]
zap trash: [
"~/Library/Application Scripts/com.microsoft.errorreporting",
"~/Library/Application Scripts/com.microsoft.Excel",
"~/Library/Application Scripts/com.microsoft.Office365ServiceV2",
"~/Library/Application Scripts/com.microsoft.OneDrive.FileProvider",
"~/Library/Application Scripts/com.microsoft.OneDrive.FinderSync",
"~/Library/Application Scripts/com.microsoft.OneDriveLauncher",
"~/Library/Application Scripts/com.microsoft.onenote.mac",
"~/Library/Application Scripts/com.microsoft.onenote.mac.shareextension",
"~/Library/Application Scripts/com.microsoft.openxml.excel.app",
"~/Library/Application Scripts/com.microsoft.Outlook",
"~/Library/Application Scripts/com.microsoft.outlook.profilemanager",
"~/Library/Application Scripts/com.microsoft.Powerpoint",
"~/Library/Application Scripts/com.microsoft.Word",
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.microsoft.excel.sfl*",
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.microsoft.powerpoint.sfl*",
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.microsoft.word.sfl*",
"~/Library/Application Support/com.microsoft.teams",
"~/Library/Application Support/CrashReporter/Microsoft Error Reporting_*.plist",
"~/Library/Application Support/Microsoft Update Assistant",
"~/Library/Application Support/Microsoft/Teams",
"~/Library/Application Support/Teams",
"~/Library/Caches/com.microsoft.OneDriveStandaloneUpdater",
"~/Library/Caches/com.microsoft.teams",
"~/Library/Caches/com.plausiblelabs.crashreporter.data/com.microsoft.OneDriveStandaloneUpdater",
"~/Library/Containers/com.microsoft.com.microsoft.RMS-XPCService",
"~/Library/Containers/com.microsoft.errorreporting",
"~/Library/Containers/com.microsoft.Excel",
"~/Library/Containers/com.microsoft.netlib.shipassertprocess",
"~/Library/Containers/com.microsoft.Office365ServiceV2",
"~/Library/Containers/com.microsoft.onenote.mac",
"~/Library/Containers/com.microsoft.onenote.mac.shareextension",
"~/Library/Containers/com.microsoft.openxml.excel.app",
"~/Library/Containers/com.microsoft.Outlook",
"~/Library/Containers/com.microsoft.outlook.profilemanager",
"~/Library/Containers/com.microsoft.Powerpoint",
"~/Library/Containers/com.microsoft.Word",
"~/Library/Cookies/com.microsoft.teams.binarycookies",
"~/Library/Group Containers/UBF8T346G9.ms",
"~/Library/Group Containers/UBF8T346G9.Office",
"~/Library/Group Containers/UBF8T346G9.OfficeOneDriveSyncIntegration",
"~/Library/Group Containers/UBF8T346G9.OfficeOsfWebHost",
"~/Library/HTTPStorages/com.microsoft.OneDriveStandaloneUpdater",
"~/Library/HTTPStorages/com.microsoft.OneDriveStandaloneUpdater.binarycookies",
"~/Library/Logs/Microsoft Teams",
"~/Library/Preferences/com.microsoft.Excel.plist",
"~/Library/Preferences/com.microsoft.Outlook.plist",
"~/Library/Preferences/com.microsoft.Powerpoint.plist",
"~/Library/Preferences/com.microsoft.teams.plist",
"~/Library/Preferences/com.microsoft.Word.plist",
"~/Library/Saved Application State/com.microsoft.office.setupassistant.savedState",
"~/Library/Saved Application State/com.microsoft.teams.savedState",
"~/Library/Saved Application State/com.microsoft.Word.savedState",
"~/Library/WebKit/com.microsoft.teams",
]
end