|
1 | 1 | { |
2 | | - "version": "1.3.4392.66", |
3 | | - "description": "OpenVPN Client", |
| 2 | + "version": "1.3.4466.51", |
| 3 | + "description": "A free and open source cross platform OpenVPN client.", |
4 | 4 | "homepage": "https://client.pritunl.com", |
5 | 5 | "license": { |
6 | 6 | "identifier": "Freeware", |
7 | | - "url": "https://github.com/pritunl/pritunl-client-electron/blob/master/LICENSE" |
| 7 | + "url": "https://github.com/pritunl/pritunl-client-electron/blob/HEAD/LICENSE" |
8 | 8 | }, |
| 9 | + "suggest": { |
| 10 | + "Microsoft Visual C++ 2015-2022 Redistributable": "extras/vcredist2022" |
| 11 | + }, |
| 12 | + "url": "https://github.com/pritunl/pritunl-client-electron/releases/download/1.3.4466.51/Pritunl.exe#/dl.exe", |
| 13 | + "hash": "sha512:704afa0da898efc80aa9897b2cd0d5df8e4732382e0ee5d31461c3d3b80abb68a05a3c6f155039af264619e8a85014c60421400cd75d3d7db512e19040b74f40", |
| 14 | + "innosetup": true, |
9 | 15 | "architecture": { |
10 | 16 | "64bit": { |
11 | | - "url": "https://github.com/pritunl/pritunl-client-electron/releases/download/1.3.4392.66/Pritunl.exe#/dl.exe", |
12 | | - "hash": "31f491e42f72cdf440e3b7e12780b507842e12ea5faa5456da459e6387201bf9" |
| 17 | + "installer": { |
| 18 | + "script": [ |
| 19 | + "Get-ChildItem -Path $dir -Include '*,2*' -Recurse -File | Remove-Item -Force -ErrorAction SilentlyContinue", |
| 20 | + "Get-ChildItem -Path $dir -Include '*,1*' -Recurse -File | Rename-Item -NewName { $_.Name -replace ',\\d', '' }" |
| 21 | + ] |
| 22 | + } |
| 23 | + }, |
| 24 | + "arm64": { |
| 25 | + "installer": { |
| 26 | + "script": [ |
| 27 | + "Get-ChildItem -Path $dir -Include '*,1*' -Recurse -File | Remove-Item -Force -ErrorAction SilentlyContinue", |
| 28 | + "Get-ChildItem -Path $dir -Include '*,2*' -Recurse -File | Rename-Item -NewName { $_.Name -replace ',\\d', '' }" |
| 29 | + ] |
| 30 | + } |
13 | 31 | } |
14 | 32 | }, |
15 | | - "innosetup": true, |
16 | | - "pre_install": "if (-not (is_admin)) { error 'This package requires admin privileges to install'; break }", |
17 | | - "post_install": "Invoke-ExternalCommand \"$dir\\post_install.exe\" -RunAs | Out-Null", |
18 | | - "uninstaller": { |
19 | | - "script": [ |
20 | | - "if (-not (is_admin)) { error 'This package requires admin privileges to uninstall'; break }", |
21 | | - "Invoke-ExternalCommand \"$dir\\pre_uninstall.exe\" -RunAs | Out-Null", |
22 | | - "Remove-Item 'C:\\ProgramData\\Pritunl' -Recurse -Force" |
23 | | - ] |
24 | | - }, |
| 33 | + "pre_install": "if (-not (is_admin)) { abort \"`n[ERROR] $app requires admin rights to $cmd.\" }", |
| 34 | + "post_install": [ |
| 35 | + "$service_name = 'pritunl'", |
| 36 | + "Start-Service -Name $service_name -ErrorAction SilentlyContinue", |
| 37 | + "$service = Get-Service -Name $service_name -ErrorAction SilentlyContinue", |
| 38 | + "$registry_path = \"HKLM:\\SYSTEM\\CurrentControlSet\\Services\\$service_name\"", |
| 39 | + "if ($service -and $service.Status -eq 'Running') { return }", |
| 40 | + "if ($service) { abort \"`n[ERROR] Service '$service_name' exists but failed to start. Installation terminated.\" }", |
| 41 | + "$service_config = @{", |
| 42 | + " Name = 'pritunl'", |
| 43 | + " BinaryPathName = \"`\"$dir\\pritunl-service.exe`\"\"", |
| 44 | + " DisplayName = 'Pritunl Client Helper Service'", |
| 45 | + " Description = 'Provides core helper functions for the Pritunl VPN client. Disabling this service will prevent the Pritunl client from functioning correctly.'", |
| 46 | + " StartupType = 'Automatic'", |
| 47 | + "}", |
| 48 | + "New-Service @service_config | Out-Null", |
| 49 | + "$failure_actions = [byte[]](", |
| 50 | + " 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,", |
| 51 | + " 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xb8, 0x0b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,", |
| 52 | + " 0x88, 0x13, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x88, 0x13, 0x00, 0x00", |
| 53 | + ")", |
| 54 | + "Set-ItemProperty -Path $registry_path -Name 'FailureActions' -Value $failure_actions", |
| 55 | + "Set-ItemProperty -Path $registry_path -Name 'FailureActionsOnNonCrashFailures' -Value 1", |
| 56 | + "Start-Service -Name $service_name -ErrorAction SilentlyContinue" |
| 57 | + ], |
25 | 58 | "bin": [ |
26 | | - [ |
27 | | - "pritunl.exe", |
28 | | - "pritunl", |
29 | | - "--no-main" |
30 | | - ] |
| 59 | + "pritunl.exe", |
| 60 | + "pritunl-client.exe" |
31 | 61 | ], |
32 | 62 | "shortcuts": [ |
33 | 63 | [ |
34 | 64 | "pritunl.exe", |
35 | 65 | "Pritunl" |
36 | 66 | ] |
37 | 67 | ], |
38 | | - "checkver": "([\\d.]+)/Pritunl.exe", |
| 68 | + "pre_uninstall": "if (-not (is_admin)) { abort \"`n[ERROR] $app requires admin rights to $cmd.\" }", |
| 69 | + "uninstaller": { |
| 70 | + "script": [ |
| 71 | + "Stop-Service -Name 'pritunl' -Force -ErrorAction SilentlyContinue", |
| 72 | + "Stop-Process -Name 'pritunl', 'pritunl-service' -Force -ErrorAction SilentlyContinue", |
| 73 | + "Start-Sleep -Milliseconds 1500", |
| 74 | + "if ($cmd -ne 'uninstall') { return }", |
| 75 | + "if ($PSVersionTable.PSVersion -lt [Version]::new(6, 0)) {", |
| 76 | + " Start-Process -FilePath 'sc.exe' -ArgumentList @('delete', 'pritunl') -NoNewWindow -Wait", |
| 77 | + "} else {", |
| 78 | + " Remove-Service -Name 'pritunl' -ErrorAction SilentlyContinue", |
| 79 | + "}" |
| 80 | + ] |
| 81 | + }, |
| 82 | + "checkver": { |
| 83 | + "github": "https://github.com/pritunl/pritunl-client-electron" |
| 84 | + }, |
39 | 85 | "autoupdate": { |
40 | | - "architecture": { |
41 | | - "64bit": { |
42 | | - "url": "https://github.com/pritunl/pritunl-client-electron/releases/download/$version/Pritunl.exe#/dl.exe", |
43 | | - "hash": { |
44 | | - "url": "https://raw.githubusercontent.com/pritunl/pritunl-client-electron/master/SHA256", |
45 | | - "regex": "$version[\\r\\n]+$sha256.*?$basename" |
46 | | - } |
47 | | - } |
| 86 | + "url": "https://github.com/pritunl/pritunl-client-electron/releases/download/$version/Pritunl.exe#/dl.exe", |
| 87 | + "hash": { |
| 88 | + "url": "https://raw.githubusercontent.com/pritunl/pritunl-client-electron/HEAD/SHA512", |
| 89 | + "regex": "(?s)$version.+?$sha512.+?$basename" |
48 | 90 | } |
49 | 91 | } |
50 | 92 | } |
0 commit comments