Skip to content

Commit 7402bf4

Browse files
authored
opera@126.0.5750.18: Add arm64 version, update installer script & checkver (#16987)
1 parent 5291883 commit 7402bf4

File tree

1 file changed

+31
-24
lines changed

1 file changed

+31
-24
lines changed

bucket/opera.json

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
11
{
22
"version": "126.0.5750.18",
3-
"description": "Fast, secure, easy-to-use browser.",
4-
"homepage": "https://www.opera.com/",
3+
"description": "A fast, secure, easy-to-use browser.",
4+
"homepage": "https://www.opera.com",
55
"license": {
66
"identifier": "Freeware",
77
"url": "https://www.opera.com/eula/computers"
88
},
99
"architecture": {
1010
"64bit": {
11-
"url": "https://get.geo.opera.com/pub/opera/desktop/126.0.5750.18/win/Opera_126.0.5750.18_Setup_x64.exe#/dl.7z",
11+
"url": "https://get.geo.opera.com/pub/opera/desktop/126.0.5750.18/win/Opera_126.0.5750.18_Setup_x64.exe",
1212
"hash": "467b9cc15979927ebc8bca4dfbe31f1c15f239a12af9113fe9f3ba4ea5091efd"
1313
},
1414
"32bit": {
15-
"url": "https://get.geo.opera.com/pub/opera/desktop/126.0.5750.18/win/Opera_126.0.5750.18_Setup.exe#/dl.7z",
15+
"url": "https://get.geo.opera.com/pub/opera/desktop/126.0.5750.18/win/Opera_126.0.5750.18_Setup.exe",
1616
"hash": "3727e8d9651139f74d7b1970d3e853de423d546605b0577fdb18678086ce57ce"
17+
},
18+
"arm64": {
19+
"url": "https://get.geo.opera.com/pub/opera/desktop/126.0.5750.18/win/Opera_126.0.5750.18_Setup_arm64.exe",
20+
"hash": "a12a44911f5ad97ff12aa3349bb3cdc4acd972041363229f22b93fb41d181351"
1721
}
1822
},
1923
"installer": {
2024
"script": [
21-
"Remove-Item -Path \"$dir\\*_list\" -Force -ErrorAction SilentlyContinue",
25+
"Expand-7zipArchive -Path \"$dir\\$fname\" -DestinationPath $dir -Removal",
2226
"$version, 'autoupdate' | ForEach-Object { ensure \"$dir\\$_\" | Out-Null }",
2327
"Move-Item -Path \"$dir\\opera_autoupdate*\" -Destination \"$dir\\autoupdate\" -Force",
28+
"Remove-Item -Path \"$dir\\*\" -Include '*_list' -Force -ErrorAction SilentlyContinue",
2429
"$exclude_list = @('Assets', $version, 'autoupdate', 'Resources.pri', 'opera.visualelementsmanifest.xml')",
2530
"Get-ChildItem -Path $dir | Where-Object { $exclude_list -notcontains $_.Name } | ForEach-Object {",
26-
" $destination_dir = Join-Path $dir \"$version\\$($_.Name)\"",
27-
" Move-Item -Path $_.FullName -Destination $destination_dir -Force -ErrorAction SilentlyContinue",
31+
" Move-Item -Path $_.FullName -Destination \"$dir\\$version\\$($_.Name)\" -Force -ErrorAction SilentlyContinue",
2832
"}",
29-
"Copy-Item -Path \"$dir\\$version\\opera.exe\" -Destination $dir -Force",
30-
"$cfg = @{ 'autoupdate'= $false; 'enable_stats' = $false; 'single_profile' = $true } | ConvertTo-Json",
31-
"Set-Content -Path \"$dir\\installer_prefs.json\" -Value $cfg -Encoding ASCII"
33+
"Copy-Item -Path \"$dir\\$version\\opera.exe\" -Destination $dir",
34+
"$cfg = @{ 'autoupdate'= $false; 'enable_stats' = $false; 'single_profile' = $true } | ConvertTo-Json -Depth 5",
35+
"Set-Content -Path \"$dir\\installer_prefs.json\" -Value $cfg -Encoding ascii"
3236
]
3337
},
3438
"shortcuts": [
@@ -40,29 +44,32 @@
4044
"persist": "profile",
4145
"checkver": {
4246
"script": [
43-
"$version_regex = '^(?!\\.)[\\d.]+/$'",
47+
"$path_regex = '^(?!\\.)[\\d.]+/$'",
4448
"$version_sort = { [version]$_.href.TrimEnd('/') }",
45-
"$releases = 'https://get.geo.opera.com/pub/opera/desktop/'",
46-
"$download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing",
47-
"$version_segments = $download_page.links | Where-Object href -Match $version_regex | Sort-Object $version_sort -Descending | Select-Object -Expand href",
48-
"foreach ($version_segment in $version_segments) {",
49-
" $version_url = $releases + $version_segment",
50-
" $version_page = Invoke-WebRequest -Uri $version_url -UseBasicParsing",
51-
" if ($null -ne $version_page -and $version_page.Content -match 'win') {",
52-
" Write-Output $version_segment",
53-
" break",
54-
" }",
49+
"$releases_url = 'https://get.geo.opera.com/pub/opera/desktop/'",
50+
"$releases_page = Invoke-WebRequest -Uri $releases_url -UseBasicParsing -ErrorAction Stop",
51+
"$path_segments = $releases_page.links | Where-Object { $_.href -match $path_regex } |",
52+
" Sort-Object -Property $version_sort -Descending | ForEach-Object -MemberName href",
53+
"foreach ($path_segment in $path_segments.TrimEnd('/')) {",
54+
" $release_url = 'https://get.geo.opera.com/pub/opera/desktop/{0}/win/' -f $path_segment",
55+
" $download_page = Invoke-WebRequest -Uri $release_url -UseBasicParsing -ErrorAction Stop",
56+
" $installer_name = $download_page.Links | Where-Object { $_.href -match '(?<=Setup\\w+)\\.exe$' } |",
57+
" Select-Object -ExpandProperty href -First 1",
58+
" if ($null -ne $installer_name) { Write-Output $installer_name; break }",
5559
"}"
5660
],
57-
"regex": "([\\d.]+)/"
61+
"regex": "Opera_([\\d.]+)_Setup"
5862
},
5963
"autoupdate": {
6064
"architecture": {
6165
"64bit": {
62-
"url": "https://get.geo.opera.com/pub/opera/desktop/$version/win/Opera_$version_Setup_x64.exe#/dl.7z"
66+
"url": "https://get.geo.opera.com/pub/opera/desktop/$version/win/Opera_$version_Setup_x64.exe"
6367
},
6468
"32bit": {
65-
"url": "https://get.geo.opera.com/pub/opera/desktop/$version/win/Opera_$version_Setup.exe#/dl.7z"
69+
"url": "https://get.geo.opera.com/pub/opera/desktop/$version/win/Opera_$version_Setup.exe"
70+
},
71+
"arm64": {
72+
"url": "https://get.geo.opera.com/pub/opera/desktop/$version/win/Opera_$version_Setup_arm64.exe"
6673
}
6774
},
6875
"hash": {

0 commit comments

Comments
 (0)