-
Notifications
You must be signed in to change notification settings - Fork 1.6k
pritunl-client: Update to version 1.3.4466.51 and refactor manifest #16997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,131 @@ | ||
| { | ||
| "version": "1.3.4466.51", | ||
| "description": "OpenVPN Client", | ||
| "description": "A free and open source cross platform OpenVPN client.", | ||
| "homepage": "https://client.pritunl.com", | ||
| "license": { | ||
| "identifier": "Freeware", | ||
| "url": "https://github.com/pritunl/pritunl-client-electron/blob/master/LICENSE" | ||
| "url": "https://github.com/pritunl/pritunl-client-electron/blob/HEAD/LICENSE" | ||
| }, | ||
| "suggest": { | ||
| "Microsoft Visual C++ 2015-2022 Redistributable": "extras/vcredist2022" | ||
| }, | ||
| "url": "https://github.com/pritunl/pritunl-client-electron/releases/download/1.3.4466.51/Pritunl.exe#/dl.exe", | ||
| "hash": "sha512:704afa0da898efc80aa9897b2cd0d5df8e4732382e0ee5d31461c3d3b80abb68a05a3c6f155039af264619e8a85014c60421400cd75d3d7db512e19040b74f40", | ||
| "innosetup": true, | ||
| "architecture": { | ||
| "64bit": { | ||
| "url": "https://github.com/pritunl/pritunl-client-electron/releases/download/1.3.4466.51/Pritunl.exe#/dl.exe", | ||
| "hash": "d6b43bf1832d2f2f3f44d7942bb9d6a6c32f17ec4acc711a2458daa8db7cda8b" | ||
| "installer": { | ||
| "script": [ | ||
| "Get-ChildItem -Path $dir -Include '*,2*' -Recurse -File | Remove-Item -Force -ErrorAction SilentlyContinue", | ||
| "Get-ChildItem -Path $dir -Include '*,1*' -Recurse -File | Rename-Item -NewName { $_.Name -replace ',\\d', '' }" | ||
| ] | ||
| } | ||
| }, | ||
| "arm64": { | ||
| "installer": { | ||
| "script": [ | ||
| "Get-ChildItem -Path $dir -Include '*,1*' -Recurse -File | Remove-Item -Force -ErrorAction SilentlyContinue", | ||
| "Get-ChildItem -Path $dir -Include '*,2*' -Recurse -File | Rename-Item -NewName { $_.Name -replace ',\\d', '' }" | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "innosetup": true, | ||
| "pre_install": "if (-not (is_admin)) { error 'This package requires admin privileges to install'; break }", | ||
| "post_install": "Invoke-ExternalCommand \"$dir\\post_install.exe\" -RunAs | Out-Null", | ||
| "uninstaller": { | ||
| "script": [ | ||
| "if (-not (is_admin)) { error 'This package requires admin privileges to uninstall'; break }", | ||
| "Invoke-ExternalCommand \"$dir\\pre_uninstall.exe\" -RunAs | Out-Null", | ||
| "Remove-Item 'C:\\ProgramData\\Pritunl' -Recurse -Force" | ||
| ] | ||
| }, | ||
| "pre_install": "if (-not (is_admin)) { abort \"`n[ERROR] $app requires admin rights to $cmd.\" }", | ||
| "post_install": [ | ||
| "$service_name = 'pritunl'", | ||
| "$path_regex = [regex]::Escape((Split-Path -Path $dir -Parent))", | ||
| "Start-Service -Name $service_name -ErrorAction SilentlyContinue", | ||
| "if ($PSVersionTable.PSVersion -ge [version]::new(6, 0)) {", | ||
| " $services = Get-Service -Name $service_name -ErrorAction SilentlyContinue", | ||
| "} else {", | ||
| " $name_filter = \"Name = '$service_name'\"", | ||
| " $services = Get-CimInstance -ClassName Win32_Service -Filter $name_filter -ErrorAction SilentlyContinue |", | ||
| " Select-Object -Property *, @{ Name = 'BinaryPathName'; Expression = { $_.PathName } }", | ||
| "}", | ||
| "$service = $services | Where-Object { $_.BinaryPathName -match $path_regex }", | ||
| "if ($service -and @($service.Status, $service.State) -contains 'Running') { return }", | ||
| "if ($service) { abort \"`n[ERROR] Service '$service_name' exists but failed to start. Installation terminated.\" }", | ||
| "if ($services) {", | ||
| " Write-Host \"`nINFO Identified a stale or conflicting service instance. Initiating removal...\" -ForegroundColor DarkGray", | ||
| " Stop-Service -Name $service_name -Force -ErrorAction SilentlyContinue; Start-Sleep -Milliseconds 1500", | ||
| " if ($PSVersionTable.PSVersion -ge [version]::new(6, 0)) {", | ||
| " Remove-Service -Name $service_name -ErrorAction SilentlyContinue", | ||
| " } else {", | ||
| " Start-Process -FilePath 'sc.exe' -ArgumentList @('delete', $service_name) -NoNewWindow -Wait", | ||
| " }", | ||
| " $timer = [System.Diagnostics.Stopwatch]::StartNew()", | ||
| " while ($timer.Elapsed.TotalSeconds -lt 16) {", | ||
| " $current_elapsed = $timer.Elapsed.TotalSeconds", | ||
| " $percent = [System.Math]::Min(($current_elapsed / 15) * 100, 100)", | ||
| " $progress_params = @{", | ||
| " Activity = 'Service Management'; PercentComplete = $percent", | ||
| " CurrentOperation = \"Elapsed: $current_elapsed s / Timeout: 15 s\"", | ||
| " Status = \"Waiting for '$service_name' to be fully de-registered...\"", | ||
| " }", | ||
| " $check = Get-Service -Name $service_name -ErrorAction SilentlyContinue", | ||
| " if ($null -eq $check) {", | ||
| " $progress_params['Status'] = 'Service successfully uninstalled.'", | ||
| " $progress_params['PercentComplete'] = 100", | ||
| " $progress_params['Completed'] = $true", | ||
| " Write-Progress @progress_params", | ||
| " break", | ||
| " }", | ||
| " Write-Progress @progress_params", | ||
| " Start-Sleep -Milliseconds 2500", | ||
| " }", | ||
| " $timer.Stop()", | ||
| " abort 'Please reboot your computer to complete the uninstallation, then try again.'", | ||
| "}", | ||
SorYoshino marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "$service_config = @{", | ||
| " Name = $service_name", | ||
| " BinaryPathName = \"`\"$dir\\pritunl-service.exe`\"\"", | ||
| " DisplayName = 'Pritunl Client Helper Service'", | ||
| " Description = 'Provides core helper functions for the Pritunl VPN client. Disabling this service will prevent the Pritunl client from functioning correctly.'", | ||
| " StartupType = 'Automatic'", | ||
| "}", | ||
| "New-Service @service_config | Out-Null", | ||
| "$failure_actions = [byte[]](", | ||
| " 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,", | ||
| " 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xb8, 0x0b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,", | ||
| " 0x88, 0x13, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x88, 0x13, 0x00, 0x00", | ||
| ")", | ||
| "$registry_path = \"HKLM:\\SYSTEM\\CurrentControlSet\\Services\\$service_name\"", | ||
| "Set-ItemProperty -Path $registry_path -Name 'FailureActions' -Value $failure_actions", | ||
| "Set-ItemProperty -Path $registry_path -Name 'FailureActionsOnNonCrashFailures' -Value 1", | ||
| "Start-Service -Name $service_name -ErrorAction SilentlyContinue" | ||
| ], | ||
| "bin": [ | ||
| [ | ||
| "pritunl.exe", | ||
| "pritunl", | ||
| "--no-main" | ||
| ] | ||
| "pritunl.exe", | ||
| "pritunl-client.exe" | ||
| ], | ||
| "shortcuts": [ | ||
| [ | ||
| "pritunl.exe", | ||
| "Pritunl" | ||
| ] | ||
| ], | ||
| "checkver": "([\\d.]+)/Pritunl.exe", | ||
| "pre_uninstall": "if (-not (is_admin)) { abort \"`n[ERROR] $app requires admin rights to $cmd.\" }", | ||
| "uninstaller": { | ||
| "script": [ | ||
| "Stop-Service -Name 'pritunl' -Force -ErrorAction SilentlyContinue", | ||
| "Stop-Process -Name 'pritunl', 'pritunl-service' -Force -ErrorAction SilentlyContinue", | ||
| "Start-Sleep -Milliseconds 1500", | ||
| "if ($cmd -ne 'uninstall') { return }", | ||
| "if ($PSVersionTable.PSVersion -lt [Version]::new(6, 0)) {", | ||
| " Start-Process -FilePath 'sc.exe' -ArgumentList @('delete', 'pritunl') -NoNewWindow -Wait", | ||
| "} else {", | ||
| " Remove-Service -Name 'pritunl' -ErrorAction SilentlyContinue", | ||
| "}" | ||
| ] | ||
| }, | ||
| "checkver": { | ||
| "github": "https://github.com/pritunl/pritunl-client-electron" | ||
| }, | ||
| "autoupdate": { | ||
| "architecture": { | ||
| "64bit": { | ||
| "url": "https://github.com/pritunl/pritunl-client-electron/releases/download/$version/Pritunl.exe#/dl.exe", | ||
| "hash": { | ||
| "url": "https://raw.githubusercontent.com/pritunl/pritunl-client-electron/master/SHA256", | ||
| "regex": "$version[\\r\\n]+$sha256.*?$basename" | ||
| } | ||
| } | ||
| "url": "https://github.com/pritunl/pritunl-client-electron/releases/download/$version/Pritunl.exe#/dl.exe", | ||
haussmann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "hash": { | ||
| "url": "https://raw.githubusercontent.com/pritunl/pritunl-client-electron/HEAD/SHA512", | ||
| "regex": "(?s)$version.+?$sha512.+?$basename" | ||
| } | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.