|
1 | 1 | { |
2 | 2 | "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", |
5 | 5 | "license": { |
6 | 6 | "identifier": "Freeware", |
7 | 7 | "url": "https://www.opera.com/eula/computers" |
8 | 8 | }, |
9 | 9 | "architecture": { |
10 | 10 | "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", |
12 | 12 | "hash": "467b9cc15979927ebc8bca4dfbe31f1c15f239a12af9113fe9f3ba4ea5091efd" |
13 | 13 | }, |
14 | 14 | "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", |
16 | 16 | "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" |
17 | 21 | } |
18 | 22 | }, |
19 | 23 | "installer": { |
20 | 24 | "script": [ |
21 | | - "Remove-Item -Path \"$dir\\*_list\" -Force -ErrorAction SilentlyContinue", |
| 25 | + "Expand-7zipArchive -Path \"$dir\\$fname\" -DestinationPath $dir -Removal", |
22 | 26 | "$version, 'autoupdate' | ForEach-Object { ensure \"$dir\\$_\" | Out-Null }", |
23 | 27 | "Move-Item -Path \"$dir\\opera_autoupdate*\" -Destination \"$dir\\autoupdate\" -Force", |
| 28 | + "Remove-Item -Path \"$dir\\*\" -Include '*_list' -Force -ErrorAction SilentlyContinue", |
24 | 29 | "$exclude_list = @('Assets', $version, 'autoupdate', 'Resources.pri', 'opera.visualelementsmanifest.xml')", |
25 | 30 | "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", |
28 | 32 | "}", |
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" |
32 | 36 | ] |
33 | 37 | }, |
34 | 38 | "shortcuts": [ |
|
40 | 44 | "persist": "profile", |
41 | 45 | "checkver": { |
42 | 46 | "script": [ |
43 | | - "$version_regex = '^(?!\\.)[\\d.]+/$'", |
| 47 | + "$path_regex = '^(?!\\.)[\\d.]+/$'", |
44 | 48 | "$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 }", |
55 | 59 | "}" |
56 | 60 | ], |
57 | | - "regex": "([\\d.]+)/" |
| 61 | + "regex": "Opera_([\\d.]+)_Setup" |
58 | 62 | }, |
59 | 63 | "autoupdate": { |
60 | 64 | "architecture": { |
61 | 65 | "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" |
63 | 67 | }, |
64 | 68 | "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" |
66 | 73 | } |
67 | 74 | }, |
68 | 75 | "hash": { |
|
0 commit comments