diff --git a/Build/build.ps1 b/Build/after_build.ps1
similarity index 100%
rename from Build/build.ps1
rename to Build/after_build.ps1
diff --git a/Build/prebuild.ps1 b/Build/before_build.ps1
similarity index 100%
rename from Build/prebuild.ps1
rename to Build/before_build.ps1
diff --git a/Build/build_success.ps1 b/Build/build_success.ps1
new file mode 100644
index 000000000..7bd971c38
--- /dev/null
+++ b/Build/build_success.ps1
@@ -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 .
+################################################################
+
+$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
+}
diff --git a/Build/chocolatey/greenshot/greenshot.nuspec b/Build/chocolatey/greenshot/greenshot.nuspec
new file mode 100644
index 000000000..527a23594
--- /dev/null
+++ b/Build/chocolatey/greenshot/greenshot.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ greenshot
+ Greenshot
+ 1.2.8.12
+ Greenshot
+ devious
+ Greenshot is a light-weight screenshot software tool for Windows.
+ 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.
+ http://getgreenshot.org/
+ greenshot screenshot screen capture notsilent
+ http://www.gnu.org/licenses/gpl.html
+ false
+ http://upload.wikimedia.org/wikipedia/commons/9/95/GreenshotLogo.png
+
+
+
\ No newline at end of file
diff --git a/Build/chocolatey/greenshot/tools/chocolateyInstall.ps1 b/Build/chocolatey/greenshot/tools/chocolateyInstall.ps1
new file mode 100644
index 000000000..1eece97c1
--- /dev/null
+++ b/Build/chocolatey/greenshot/tools/chocolateyInstall.ps1
@@ -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'
diff --git a/Build/chocolatey/greenshot/tools/chocolateyuninstall.ps1 b/Build/chocolatey/greenshot/tools/chocolateyuninstall.ps1
new file mode 100644
index 000000000..b67c0175b
--- /dev/null
+++ b/Build/chocolatey/greenshot/tools/chocolateyuninstall.ps1
@@ -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"
+}
\ No newline at end of file
diff --git a/appveyor13.yml b/appveyor13.yml
index 42be232f5..4a7eb6c64 100644
--- a/appveyor13.yml
+++ b/appveyor13.yml
@@ -40,12 +40,14 @@ environment:
build_type: ALPHA
before_build:
- nuget restore
- - ps: Build/prebuild.ps1
+ - ps: Build/before_build.ps1
build:
project: greenshot.sln
verbosity: normal
after_build:
-- ps: Build/build.ps1
+- ps: Build/after_build.ps1
+on_success:
+- ps: Build/build_success.ps1
test: off
artifacts:
- path: AssemblyDir\Greenshot*INSTALLER*.exe