Skip to content

Commit

Permalink
Add chocolatey package.
Browse files Browse the repository at this point in the history
  • Loading branch information
alxnull committed Aug 22, 2020
1 parent 1031f3d commit da1a239
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,6 @@ paket-files/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc

# Custom
*.msi
20 changes: 20 additions & 0 deletions PinWin.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Setup", "Setup\Setup.wixproj", "{DD87CEB2-5635-488B-BD9C-52CBD93A608C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "choco", "choco", "{E667BED5-F79A-4305-B701-AED24AB5EADC}"
ProjectSection(SolutionItems) = preProject
choco\pinwin.nuspec = choco\pinwin.nuspec
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{D6DF54E0-79AF-462A-A802-4464118076CA}"
ProjectSection(SolutionItems) = preProject
choco\tools\chocolateyinstall.ps1 = choco\tools\chocolateyinstall.ps1
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "img", "img", "{2FAC4F97-AEF9-471E-9B57-579290BDE553}"
ProjectSection(SolutionItems) = preProject
img\icon.png = img\icon.png
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -39,6 +54,11 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{E667BED5-F79A-4305-B701-AED24AB5EADC} = {060ED345-F2C1-408B-B1A7-37CFCC2A168B}
{D6DF54E0-79AF-462A-A802-4464118076CA} = {E667BED5-F79A-4305-B701-AED24AB5EADC}
{2FAC4F97-AEF9-471E-9B57-579290BDE553} = {060ED345-F2C1-408B-B1A7-37CFCC2A168B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {23B94BA9-5C80-4343-ADD9-343CB9F9804D}
EndGlobalSection
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,23 @@ PinWin is a minimal Windows system tray application that allows you to pin any w

- Runs quietly in background and does not need installation

## Setup and Usage
## Setup

#### Requirements

PinWin requires Windows 7 or newer and .NET Framework 4.6.2 or higher.

#### Installation

- Download the [latest release from SourceForge](https://sourceforge.net/projects/pinwin/files/)

or

- Install from [Chocolatey](https://chocolatey.org):
```
choco install pinwin
```

## Feedback and Support

_Please leave a feedback on [Sourceforge](https://sourceforge.net/p/pinwin/reviews). Thank you!_
Expand Down
34 changes: 34 additions & 0 deletions choco/pinwin.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<!-- == PACKAGE SPECIFIC SECTION == -->
<id>pinwin</id>
<version>0.2.2</version>
<owners>alxnull</owners>
<!-- ============================== -->

<!-- == SOFTWARE SPECIFIC SECTION == -->
<title>PinWin</title>
<authors>alxnull</authors>
<projectUrl>https://sf.net/p/pinwin</projectUrl>
<iconUrl>https://gitcdn.xyz/repo/Bluegrams/PinWin/master/img/icon.png</iconUrl>
<copyright>© 2020 Bluegrams</copyright>
<licenseUrl>https://github.com/Bluegrams/PinWin/blob/master/LICENSE.txt</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<projectSourceUrl>https://github.com/Bluegrams/PinWin</projectSourceUrl>
<bugTrackerUrl>https://github.com/Bluegrams/PinWin/issues</bugTrackerUrl>
<tags>pinwin windows always-on-top ontop pin desktop</tags>
<summary>Pin any window to be always on top of the screen.</summary>
<description>PinWin is a minimal Windows system tray application that allows you to pin any windows to the top of the screen with one click.</description>
<releaseNotes>https://github.com/Bluegrams/PinWin/blob/master/Changelog.md</releaseNotes>
<!-- =============================== -->

<dependencies>
<dependency id="dotnetfx" version="4.6.2.0" />
</dependencies>
</metadata>
<files>
<file src="tools\**" target="tools" />
</files>
</package>
14 changes: 14 additions & 0 deletions choco/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$ErrorActionPreference = 'Stop';
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$fileLocation = Join-Path $toolsDir 'PinWinSetup.msi'

$packageArgs = @{
packageName = $env:ChocolateyPackageName
fileType = 'msi'
file = $fileLocation
softwareName = 'PinWin*'
silentArgs = "/qn /norestart /l*v `"$($env:TEMP)\$($packageName).$($env:chocolateyPackageVersion).MsiInstall.log`""
validExitCodes= @(0, 3010, 1641)
}

Install-ChocolateyInstallPackage @packageArgs
Binary file added img/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit da1a239

Please sign in to comment.