Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Chocolatey packaging. [skip ci]
- Loading branch information
1 parent
eac3276
commit 1b90c2a
Showing
7 changed files
with
98 additions
and
2 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains 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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
################################################################ | ||
# Greenshot cholocatey script, written for the Windows Power Shell | ||
# Assumes the installation of Microsoft .NET Framework 4.5 | ||
################################################################ | ||
# Greenshot - a free and open source screenshot tool | ||
# Copyright (C) 2007-2015 Thomas Braun, Jens Klingen, Robin Krom | ||
# | ||
# For more information see: http://getgreenshot.org/ | ||
# The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/ | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 1 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
################################################################ | ||
|
||
$builddir = "$(get-location)\Build" | ||
|
||
# This function builds & uploads the chocolatey package | ||
Function ChocolateyPackage { | ||
pushd "$builddir\chocolatey" | ||
Try | ||
{ | ||
Write-Host "Generating chocolatey package" | ||
choco pack | ||
Write-Host "Set chocolatey key" | ||
choco apiKey -k $env:choco_api_key -source https://chocolatey.org/ | ||
Write-Host "Pushing chocolatey package" | ||
Get-ChildItem -Recurse -Include *.nupkg | foreach { | ||
choco push $_.fullname | ||
} | ||
} | ||
Catch [system.exception] | ||
{ | ||
#error logging | ||
} | ||
Finally | ||
{ | ||
popd | ||
} | ||
} | ||
|
||
if ($env:build_type -eq "RELEASE") { | ||
Write-Host "Building & uploading chocolatey package" | ||
ChocolateyPackage | ||
} |
This file contains 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||
<metadata> | ||
<id>greenshot</id> | ||
<title>Greenshot</title> | ||
<version>1.2.8.12</version> | ||
<authors>Greenshot</authors> | ||
<owners>devious</owners> | ||
<summary>Greenshot is a light-weight screenshot software tool for Windows.</summary> | ||
<description>Greenshot is a light-weight screenshot software tool for Windows with the following key features: | ||
Quickly create screenshots of a selected region, window or fullscreen; you can even capture complete (scrolling) web pages from Internet Explorer. | ||
Easily annotate, highlight or obfuscate parts of the screenshot. | ||
Export the screenshot in various ways: save to file, send to printer, copy to clipboard, attach to e-mail, send Office programs or upload to photo sites like Flickr or Picasa, and others. | ||
...and a lot more options simplyfying creation of and work with screenshots every day. | ||
|
||
Being easy to understand and configurable, Greenshot is an efficient tool for project managers, software developers, technical writers, testers and anyone else creating screenshots.</description> | ||
<projectUrl>http://getgreenshot.org/</projectUrl> | ||
<tags>greenshot screenshot screen capture notsilent</tags> | ||
<licenseUrl>http://www.gnu.org/licenses/gpl.html</licenseUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<iconUrl>http://upload.wikimedia.org/wikipedia/commons/9/95/GreenshotLogo.png</iconUrl> | ||
<!--<dependencies> | ||
<dependency id="" version="" /> | ||
</dependencies>--> | ||
</metadata> | ||
</package> |
This file contains 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
if (Get-Process 'Greenshot' -ea SilentlyContinue) {Stop-Process -processname Greenshot} | ||
Install-ChocolateyPackage 'greenshot' 'EXE' '/VERYSILENT' 'https://github.com/greenshot/greenshot/releases/download/Greenshot-RELEASE-1.2.8.12/Greenshot-INSTALLER-1.2.8.12-RELEASE.exe' |
This file contains 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
$packageName = "Greenshot" | ||
$installerType = "exe" | ||
|
||
|
||
# Uninstall $packageName if older version is installed | ||
if (Test-Path "$env:ProgramFiles\$packageName") { | ||
Uninstall-ChocolateyPackage $packageName $installerType "/VERYSILENT /NORESTART" "$env:ProgramFiles\$packageName\unins000.exe" | ||
} | ||
|
||
if (Test-Path "${env:ProgramFiles(x86)}\$packageName") { | ||
Uninstall-ChocolateyPackage $packageName $installerType "/VERYSILENT /NORESTART" "${env:ProgramFiles(x86)}\$packageName\unins000.exe" | ||
} |
This file contains 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