diff --git a/packages/reolink-client/reolink-client.nuspec b/packages/reolink-client/reolink-client.nuspec new file mode 100755 index 0000000..ebb842a --- /dev/null +++ b/packages/reolink-client/reolink-client.nuspec @@ -0,0 +1,22 @@ + + + + reolink-client + 7.2.2.31 + Reolink Client + Reolink Innovation Limited + foo.li systeme + software + https://reolink.com/terms-conditions/ + https://reolink.com/de/software-and-manual/ + https://git.foo.li/peter/chocolatey/raw/branch/master/icons/reolink.jpg + false + Get Your Home and Business within Your Sight. + Reolink App and Client help you to keep an eye on your home and business whenever and wherever you are. + Reolink Client + https://github.com/aluxnimm/outlookcaldavsynchronizer/releases/tag/v3.6.1 + videomonitoring monitoring video webcam admin + + + + + diff --git a/packages/reolink-client/tools/chocolateyinstall.ps1 b/packages/reolink-client/tools/chocolateyinstall.ps1 new file mode 100755 index 0000000..e179da1 --- /dev/null +++ b/packages/reolink-client/tools/chocolateyinstall.ps1 @@ -0,0 +1,39 @@ +# Reolink Client +# 2011-2019 foo.li systeme + software + +$release = '7.2.2.31' +$packageName = 'reolink-client' +$fileType = 'exe' +$silentArgs = '/SILENT' +$url = 'https://s3.amazonaws.com/reolink-storage/website/client/Reolink+Client+Windows+v' + $version + '+x32bit.zip' +$url64 = 'https://s3.amazonaws.com/reolink-storage/website/client/Reolink+Client+Windows+v' + $version + '+x64bit.zip' +$unpackDir = New-Item "${ENV:TEMP}\reolink" -ItemType Directory -Force +$unpackFile = "${ENV:TEMP}\reolink.zip" +$setup32 = 'Reolink Client Windows v' + $version + ' x32bit.exe' +$setup64 = 'Reolink Client Windows v' + $version + ' x64bit.exe' +$setupFile = Join-Path "$unpackDir" "$setup32" +$setupFile64 = Join-Path "$unpackDir" "$setup64" + +$ErrorActionPreference = 'Continue' + +#if ($env:PROCESSOR_ARCHITECURE -eq 'AMD64') { +$arch = (Get-WmiObject -Class Win32_ComputerSystem).SystemType -match '(x64)' +if ($arch = "True") { + $setup = $setupFile64 +} else { + $setup = $setupFile +} + +try { + Write-Host "Downloading Release" $release + Get-ChocolateyWebFile $packageName $unpackFile $url $url64 + Get-ChocolateyUnzip $unpackFile $unpackDir + Install-ChocolateyInstallPackage $packageName $fileType $silentArgs $setup + #delete downloaded file + Remove-Item -Path $unpackDir -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path $unpackFile -Force -ErrorAction SilentlyContinue +} catch { + throw $_.Exception + Remove-Item -Path $unpackDir -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path $unpackFile -Force -ErrorAction SilentlyContinue +} diff --git a/packages/reolink-client/tools/chocolateyuninstall.ps1 b/packages/reolink-client/tools/chocolateyuninstall.ps1 new file mode 100755 index 0000000..1aaf2a1 --- /dev/null +++ b/packages/reolink-client/tools/chocolateyuninstall.ps1 @@ -0,0 +1,34 @@ +#uninstall Reolink Client +#2011-2019 foo.li systeme + software + +$packageName = 'reolink-client' +$packageSearch = 'Reolink Client*' +$r = Get-ItemProperty -Path @( 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', + 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*', + 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' ) ` + -ErrorAction:SilentlyContinue ` + | Where-Object { $_.DisplayName -like $packageSearch } + +$r | ForEach-Object { + $exe = $_.UninstallString | Select-String -Pattern ".*exe`"?$" + $msi = $_.UninstallString | Select-String -Pattern "^MsiExec.*$" + if ($exe) { + $installerType = 'exe' + $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' + $validExitCodes = @(0) + Uninstall-ChocolateyPackage -PackageName "$packageName" ` + -FileType "$installerType" ` + -SilentArgs "$($silentArgs)" ` + -File "$($_.UninstallString)" ` + -ValidExitCodes $validExitCodes + } + if ($msi) { + $installerType = 'msi' + $silentArgs = '/quiet /qn /norestart' + $validExitCodes = @(0,3010) + Uninstall-ChocolateyPackage -PackageName "$packageName" ` + -FileType "$installerType" ` + -SilentArgs "$($_.PSChildName) $silentArgs" ` + -ValidExitCodes $validExitCodes + } +}