Search code examples
windowspowershellnugetchocolatey

How do I recompile Chocolatey virtual packages?


I'm reading the tutorial on recompiling packages so I can use them in my own repo, but when I get to this part:

Next, open tools\chocolateyInstall.ps1.

Install-ChocolateyZipPackage 'notepadplusplus.commandline' 'https://notepad-plus-plus.org/repository/6.x/6.8.7/npp.6.8.7.bin.zip' "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"

All I see in the chocolateyInstall.ps1 file is this:

#Install-VirtualPackage 'notepadplusplus.commandline' 'notepadplusplus.install'

There is no URL. How do I locate the URL this package goes to, to download the software?


Solution

  • I am going to go out on a limb and say that you have used this package:

    https://chocolatey.org/packages/notepadplusplus

    As you have been following the step in the article.

    The article wants you to use this package:

    https://chocolatey.org/packages/notepadplusplus.commandline

    The first is what we refer to as a meta, or virtual package, in that it ONLY takes a dependency on another package. As a result, there is nothing in the chocolateyInstall.ps1 file.

    If you go through the same process for the package that I linked to, you should see the URL that you need to change.