Skip to content

Commit dd539b9

Browse files
authored
[DEVOPS-4335] chore(chocolatey): add nuspec and scripts (#4506)
1 parent 2259feb commit dd539b9

4 files changed

Lines changed: 73 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo on
2+
cmd /k cpush "unigetui.$VAR1$.nupkg"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$ErrorActionPreference = 'Stop'
2+
3+
$PackageName = 'unigetui'
4+
$Url = 'https://cdn.devolutions.net/download/Devolutions.UniGetUI.win-x64.$VAR1$.0.exe'
5+
6+
$PackageArgs = @{
7+
packageName = $PackageName
8+
url = $Url
9+
fileType = 'exe'
10+
silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /ALLUSERS /NoWinGet /NoAutoStart'
11+
validExitCodes= @(0, 3010)
12+
checksum = '$VAR2$'
13+
checksumType = 'sha256'
14+
}
15+
16+
Install-ChocolateyPackage @PackageArgs
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
$ErrorActionPreference = 'Stop'
2+
3+
$PackageName = 'unigetui'
4+
5+
$PackageArgs = @{
6+
packageName = $PackageName
7+
softwareName = 'UniGetUI'
8+
fileType = 'exe'
9+
silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART'
10+
validExitCodes= @(0, 3010)
11+
}
12+
13+
[array]$Key = Get-UninstallRegistryKey -SoftwareName $PackageArgs['softwareName']
14+
15+
if ($Key.Count -eq 1) {
16+
$Key | % {
17+
$uninstallExe = $_.UninstallString -replace '"', ''
18+
if (Test-Path $uninstallExe) {
19+
$PackageArgs['file'] = $uninstallExe
20+
Uninstall-ChocolateyPackage @PackageArgs
21+
} else {
22+
Write-Warning "Uninstaller not found at $uninstallExe"
23+
}
24+
}
25+
} elseif ($Key.Count -eq 0) {
26+
Write-Warning "$PackageName has already been uninstalled."
27+
} elseif ($Key.Count -gt 1) {
28+
Write-Warning "$($Key.Count) matches found!"
29+
Write-Warning "To prevent accidental data loss, no programs will be uninstalled."
30+
Write-Warning "The following keys were matched:"
31+
$Key | % {Write-Warning "- $($_.DisplayName)"}
32+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3+
<metadata>
4+
<id>unigetui</id>
5+
<title>UniGetUI</title>
6+
<version>$VAR1$</version>
7+
<authors>Devolutions Inc.</authors>
8+
<owners>Devolutions Inc.</owners>
9+
<summary>An intuitive GUI to discover, install, update, and uninstall packages from WinGet, Scoop, Chocolatey, npm, Pip, and more.</summary>
10+
<description>The main goal of this project is to create an intuitive GUI for the most common CLI package managers for Windows 10 and Windows 11, such as WinGet, Scoop, Chocolatey, npm, Pip, .NET Tool, PowerShell Gallery and Cargo.</description>
11+
<projectUrl>https://devolutions.net/unigetui/</projectUrl>
12+
<tags>unigetui wingetui cli package-manager windows-10 windows-11 scoop winget chocolatey npm pip dotnet-tool dotnet windows package-manager-interface gui powershell powershell-ui gallery devolutions</tags>
13+
<copyright>Copyright © 2006-2026</copyright>
14+
<releaseNotes>https://github.com/Devolutions/UniGetUI/releases/tag/v$VAR1$</releaseNotes>
15+
<licenseUrl>https://github.com/Devolutions/UniGetUI/blob/HEAD/LICENSE</licenseUrl>
16+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
17+
<iconUrl>https://cdnweb.devolutions.net/web/common/logos/img-devolutions-unigetui-white.svg</iconUrl>
18+
</metadata>
19+
<files>
20+
<file src="tools\chocolateyInstall.ps1" target="tools" />
21+
<file src="tools\chocolateyUninstall.ps1" target="tools" />
22+
</files>
23+
</package>

0 commit comments

Comments
 (0)