-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
opera.json
62 lines (62 loc) · 2.64 KB
/
opera.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
50
51
52
53
54
55
56
57
58
59
60
61
62
{
"version": "115.0.5322.119",
"description": "Fast, secure, easy-to-use browser.",
"homepage": "https://www.opera.com/",
"license": {
"identifier": "Freeware",
"url": "https://www.opera.com/eula/computers"
},
"architecture": {
"64bit": {
"url": "https://get.geo.opera.com/pub/opera/desktop/115.0.5322.119/win/Opera_115.0.5322.119_Setup_x64.exe#/dl.7z",
"hash": "e62e4c93a17387c1e1c7edc8032cfcdc38b0376535a9c2d27782bd60561c5121"
},
"32bit": {
"url": "https://get.geo.opera.com/pub/opera/desktop/115.0.5322.119/win/Opera_115.0.5322.119_Setup.exe#/dl.7z",
"hash": "44fd20b6b056a0a8809912005500ebb1fc75d3e20223f5226e28cc7dc9e82cbd"
}
},
"installer": {
"script": [
"Remove-Item -Path \"$dir\\*_list\" -Force",
"Move-Item -Path \"$dir\\*\" -Destination \"$dir\\$version\" -Exclude 'Assets', 'launcher*', 'Resources.pri' -ErrorAction Ignore",
"if (!(Test-Path \"$dir\\$version\\localization\")) {",
" New-Item -Path \"$dir\\$version\\localization\" -ItemType Directory | Out-Null",
" Move-Item -Path \"$dir\\$version\\*.pak\" -Destination \"$dir\\$version\\localization\" -Exclude 'opera*' -ErrorAction Ignore",
"}",
"Set-Content -Path \"$dir\\installer_prefs.json\" -Value (@{ 'autoupdate'= $false; 'enable_stats' = $false; 'single_profile' = $true } | ConvertTo-Json) -Encoding ASCII",
"Copy-Item \"$dir\\$version\\opera.exe\" \"$dir\""
]
},
"shortcuts": [
[
"opera.exe",
"Opera"
]
],
"persist": "profile",
"checkver": {
"script": [
"$releases = 'https://get.geo.opera.com/pub/opera/desktop/'",
"$download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing",
"$versionSort = { [version]$_.href.TrimEnd('/') }",
"$last_ver = $download_page.links | Where-Object href -match '^[\\d]+[\\d\\.]+/$' | Sort-Object $versionSort -Descending | Select-Object -first 1 -expand href",
"$version = $last_ver -replace '/', ''",
"Write-Output $version"
],
"regex": "(\\S+)"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://get.geo.opera.com/pub/opera/desktop/$version/win/Opera_$version_Setup_x64.exe#/dl.7z"
},
"32bit": {
"url": "https://get.geo.opera.com/pub/opera/desktop/$version/win/Opera_$version_Setup.exe#/dl.7z"
}
},
"hash": {
"url": "$url.sha256sum"
}
}
}