OpenBoard Package initial

This commit is contained in:
Peter V. Beck 2018-01-29 23:32:05 +01:00
parent 305aa10bdf
commit 458d031997
4 changed files with 89 additions and 0 deletions

BIN
icons/openboard.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>openboard</id>
<version>1.3.6</version>
<title>OpenBoard</title>
<authors>Open Education Foundation</authors>
<owners>foo.li systeme + software</owners>
<licenseUrl>https://github.com/OpenBoard-org/OpenBoard/blob/master/LICENSE</licenseUrl>
<projectUrl>http://openboard.ch/index.en.html/</projectUrl>
<iconUrl>https://raw.githubusercontent.com/peterbeck/chocolatey/master/icons/openboard.png</iconUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>Interactive whiteboard for schools and universities</description>
<summary>OpenBoard Whiteboard</summary>
<releaseNotes>release 1.5.2</releaseNotes>
<copyright>OpenBoard.org</copyright>
<language />
<tags>whiteboard admin</tags>
</metadata>
</package>

View File

@ -0,0 +1,35 @@
# OpenBoard Whiteboard
# 2018 foo.li systeme + software
# https://www.gnu.org/licenses/gpl.txt
$packageName = 'openboard'
$packageSearch = 'OpenBoard'
$installerType = 'exe'
$silentArgs = '/SILENT'
$version = '1.3.6'
$url = 'https://github.com/OpenBoard-org/OpenBoard/releases/download/v' + $version + '/OpenBoard_Installer_' + $version + '.exe'
$url64 = $url
$checksum = '02A3E147D680563ED48BA54E2DE7917C42368A3B'
$checksumType = 'sha1'
$checksum64 = $checksum
$checksumType64 = $checksumType
try {
#version not in uninstaller entry, no check at the moment...
#$app = Get-ItemProperty -Path @('HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*',
# 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*') `
# -ErrorAction:SilentlyContinue | Where-Object { $_.DisplayName -like $packageSearch }
#
#if ($app -and ([version]$app.DisplayVersion -ge [version]$version)) {
# Write-Output $(
# 'OpenBoard ' + $version + ' or greater is already installed. ' +
# 'No need to download and install again. Otherwise uninstall first.'
# )
#} else {
Install-ChocolateyPackage $packageName $installerType $silentArgs $url $url64 `
-checksum $checksum -checksumType $checksumType `
-checksum64 $checksum64 -checksumType64 $checksumType64
#}
} catch {
throw $_.Exception
}

View File

@ -0,0 +1,34 @@
#OpenBoard uninstaller
$packageName = 'openboard'
$packageSearch = 'OpenBoard'
$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'
$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
}
}