generated from Ash258/GenericBucket
/
MicrosoftOffice365-Install.json
49 lines (49 loc) · 2.51 KB
/
MicrosoftOffice365-Install.json
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
{
"version": "16.0.17531.20046",
"description": "Microsoft Office 365. Family of client software, server software and services developed by Microsoft.",
"homepage": "https://www.office.com/",
"license": {
"identifier": "Proprietary",
"url": "https://www.microsoft.com/licensing/terms/productoffering/OfficeDesktopApplicationsWindows/MCA"
},
"changelog": "https://learn.microsoft.com/en-us/officeupdates/current-channel",
"depends": "7zip19.00-helper",
"url": "https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_17531-20046.exe#/dl.7z_",
"hash": "0f9e6df376853154e05d81e2550183ed621ec97fc3f0c290666683a057086b92",
"pre_install": [
"$scriptdir = \"$bucketsdir\\Scoop-Apps\\scripts\"",
"if ($architecture -eq '64bit') {",
" Copy-Item \"$scriptdir\\install-office-365-apps.xml\" \"$dir\\\"",
"}",
"elseif ($architecture -eq '32bit') {",
" (Get-Content \"$scriptdir\\install-office-365-apps.xml\").Replace('64', '32') | Set-Content -Path \"$dir\\install-office-365-apps.xml\"",
"}"
],
"installer": {
"script": [
"Start-Process -Wait 7z1900-helper -ArgumentList @('x', '-bso0', \"`\"$dir\\dl.7z_`\"\", \"`\"-o$dir`\"\")",
"Start-Process -Wait \"$dir\\setup.exe\" -ArgumentList @('/configure', \"`\"$dir\\install-office-365-apps.xml`\"\")"
]
},
"checkver": {
"script": [
"$ProgressPreference = 'SilentlyContinue'",
"$url1 = 'https://docs.microsoft.com/en-us/officeupdates/odt-release-history'",
"$regex1 = '<p>Version ([\\d.]+)'",
"$url2 = 'https://www.microsoft.com/en-au/download/confirmation.aspx?id=49117'",
"$regex2 = 'download/([\\w/-]+)(officedeploymenttool_[\\d-]+\\.exe)'",
"",
"$cont = $(Invoke-WebRequest $url1).Content",
"if (!($cont -match $regex1)) { Write-Host \"Could not match '$regex1' in '$url1'\"; return }",
"$app_ver = $matches[1]",
"$cont = $(Invoke-WebRequest $url2).Content",
"if (!($cont -match $regex2)) { Write-Host \"Could not match '$regex2' in '$url2'\"; return }",
"$path = $matches[1]; $filename = $matches[2]",
"Write-Output $app_ver $path $filename"
],
"regex": "([\\d.]+) (?<path>[\\w-/]+) (?<filename>[\\w.-]+)"
},
"autoupdate": {
"url": "https://download.microsoft.com/download/$matchPath$matchFilename#/dl.7z_"
}
}