Skip to content
Browse files
adding chocolatey
  • Loading branch information
ferventcoder committed Mar 21, 2011
1 parent 1a5fee1 commit d16ed7ac675395b3bb8ecee90fb13efb03d4b619
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<package xmlns:xsi="" xmlns:xsd="">
<authors>Rob Reynolds</authors>
<owners>Rob Reynolds</owners>
<summary>Chocolatey is for machine level packages, like application nuggets.</summary>
<description>Chocolatey is for machine level packages, like application nuggets.
You would create a package and install it to C:\NuGet\lib\yourpackagename and also a bat file in
C:\NuGet\bin to point to your executable. Once the batch file is there, your executable will run from the command line.</description>
<tags>maven machine repository nuget</tags>
@@ -0,0 +1,14 @@
WarmuP has been installed to C:\NuGet\lib\warmup. The path to C:\Nuget\bin has been added to your PATH environment variable.
Uninstalling will only remove the local reference to this repository.

Next Steps
Please edit the configuration located at C:\NuGet\lib\warmup.

You should now be able to execute warmup nameOfSubDirectory replacementName.

Please see & for more information.
@@ -0,0 +1,42 @@
param($installPath, $toolsPath, $package, $project)

#Chocolatey - NuGet local machine repo

#set up variables to add
$statementTerminator = ";"
$nugetPath = "C:\NuGet"
$nugetExePath = [System.IO.Path]::Combine($nuGetPath, "bin")
$nugetLibPath = [System.IO.Path]::Combine($nuGetPath, "lib")

$nugetYourPkgPath = [System.IO.Path]::Combine($nugetLibPath,"yourPackageName")
Write-Host We are setting up the Chocolatey repository for NuGet packages that should be at the machine level
Write-Host The repository is set up at $nugetPath.
Write-Host The packages themselves go to $nugetLibPath '(i.e.' $nugetYourPkgPath ').'
Write-Host A batch file for the command line goes to $nugetExePath and points to an executable in $nugetYourPkgPath.

#create the base structure if it doesn't exist
if (![System.IO.Directory]::Exists($nugetExePath)) {[System.IO.Directory]::CreateDirectory($nugetExePath)}
if (![System.IO.Directory]::Exists($nugetLibPath)) {[System.IO.Directory]::CreateDirectory($nugetLibPath)}

#get the PATH variable
$envPath = $env:PATH

#if you do not find C:\NuGet\bin, add it
if ($envPath.ToLower().Contains($nugetExePath.ToLower()))
#does the path end in ';'?
$hasStatementTerminator= $envPath.EndsWith($statementTerminator)
# if the last digit is not ;, then we are adding it
If (!$hasStatementTerminator) {$nugetExePath = $statementTerminator + $nugetExePath}
#now we update the path
$envPath = $envPath + $nugetExePath + $statementTerminator
[Environment]::SetEnvironmentVariable( "Path", $envPath, [System.EnvironmentVariableTarget]::Machine )

write-host Removing this package...
#uninstall-package $package.Name -ProjectName $project.Name
uninstall-package chocolatey -ProjectName $project.Name

1 comment on commit d16ed7a

Copy link
Owner Author

@ferventcoder ferventcoder commented on d16ed7a Mar 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chocolatey's first commit! Exact time was Mon Mar 21 17:33:53 2011 -0500

Please sign in to comment.