Skip to content

Commit 89124e6

Browse files
committed
pritunl-client: Update to version 1.3.4466.51 and refactor manifest
* Add arm64 version * Update checkver & autoupdate * Refactor service management logic
1 parent a711ebd commit 89124e6

File tree

1 file changed

+71
-29
lines changed

1 file changed

+71
-29
lines changed

bucket/pritunl-client.json

Lines changed: 71 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,92 @@
11
{
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.",
44
"homepage": "https://client.pritunl.com",
55
"license": {
66
"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"
88
},
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,
915
"architecture": {
1016
"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+
}
1331
}
1432
},
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+
],
2558
"bin": [
26-
[
27-
"pritunl.exe",
28-
"pritunl",
29-
"--no-main"
30-
]
59+
"pritunl.exe",
60+
"pritunl-client.exe"
3161
],
3262
"shortcuts": [
3363
[
3464
"pritunl.exe",
3565
"Pritunl"
3666
]
3767
],
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+
},
3985
"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"
4890
}
4991
}
5092
}

0 commit comments

Comments
 (0)