aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <vonreth@kde.org>2016-10-19 10:19:57 (GMT)
committerHannah von Reth <vonreth@kde.org>2016-10-19 10:19:57 (GMT)
commit58d306871b2024fa15a08f2697f9ff3b43d14846 (patch)
tree0c3156a31d094325f27b348bbb612dfdb217dd9c
parent54e232d37abb1ba3949c8df0e7e1822531943d50 (diff)
Update chocolatey installer script
-rw-r--r--chocolatey/tools/chocolateyUninstall.ps16
-rw-r--r--chocolatey/tools/chocolateyinstall.ps130
2 files changed, 35 insertions, 1 deletions
diff --git a/chocolatey/tools/chocolateyUninstall.ps1 b/chocolatey/tools/chocolateyUninstall.ps1
new file mode 100644
index 0000000..57d9769
--- /dev/null
+++ b/chocolatey/tools/chocolateyUninstall.ps1
@@ -0,0 +1,6 @@
+[array]$key = Get-UninstallRegistryKey -SoftwareName "Kate*"
+if ($key -ne $null) {
+ Uninstall-ChocolateyPackage "kate" "EXE" "/S" -File $key.UninstallString
+ $instDir = Split-Path -Parent $key.UninstallString
+ Uninstall-BinFile -Name "kate" -Path "$instDir/bin/kate.exe"
+} \ No newline at end of file
diff --git a/chocolatey/tools/chocolateyinstall.ps1 b/chocolatey/tools/chocolateyinstall.ps1
index 7c34d59..a27be0f 100644
--- a/chocolatey/tools/chocolateyinstall.ps1
+++ b/chocolatey/tools/chocolateyinstall.ps1
@@ -1 +1,29 @@
-Install-ChocolateyPackage 'kate' 'exe' '/S' 'http://download.kde.org/stable/kate/Kate-setup-16.08.2-KF5.27-32bit.exe' 'http://download.kde.org/stable/kate/Kate-setup-16.08.2-KF5.27-64bit.exe'
+$url32 = "http://download.kde.org/stable/kate/Kate-setup-16.08.2-KF5.27-32bit.exe"
+$url64 = "http://download.kde.org/stable/kate/Kate-setup-16.08.2-KF5.27-64bit.exe"
+$checksum32 = "1dfbc3bed44642ec22e422fcfe13201651ad11839fbd1616beba3cb5015531b8"
+$checksum64 = "553c67ac8a63fd402ee63bbe54094716894232bd65af6c293dc4808b75110d97"
+
+$installArgs = "/S"
+
+$params = @{
+ packageName = "kate"
+ fileType = "EXE"
+ silentArgs = $installArgs
+ url = $url32
+ url64Bit = $url64
+ checksum = $checksum32
+ checksum64 = $checksum64
+ checksumType = "sha256"
+ checksumType64 = "sha256"
+}
+
+$ROOT=[System.IO.Path]::GetDirectoryName($myInvocation.MyCommand.Definition)
+& "$ROOT/chocolateyUninstall.ps1"
+
+Install-ChocolateyPackage @params
+
+[array]$key = Get-UninstallRegistryKey -SoftwareName "Kate*"
+if ($key -ne $null) {
+ $instDir = Split-Path -Parent $key.UninstallString
+ Install-BinFile -Name "kate" -Path "$instDir/bin/kate.exe"
+}