使用巧克力创建你自己的包
我正在尝试为一个名为Listary的应用程序创建一个巧克力包。 我遵循巧克力维基中的说明以及这里的文章。
我也在http://chocolatey.org上创建了一个帐户,并使用了API密钥
nuget setApiKey - 来源http://chocolatey.org/api/v2/
哪里被您的API密钥替换。
当我输入命令choco pack
创建nuget包时,它表示成功创建了包 ,但是当我测试刚刚使用cinst 创建的包时Listary -source Listary.1.0.nupkg -force说:
Invalid URI: The format of the URI could not be determined.
Command 'install' failed (sometimes this indicates a partial failure). Additional info/packages: Listary
这是我在我的Listary.nuspec文件中。
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Listary</id>
<title>Listary</title>
<version>1.0</version>
<authors>Zhenheng Dai</authors>
<owners>Zhenheng Dai</owners>
<summary>Keep files at your fingertips. Listary is a unique search utility for Windows.</summary>
<description>Listary is a unique search utility for Windows. Not only does it make file browsing truly flexible -- thanks to its multi-file managers support -- but the ultra-compact UI also redefines minimalism. The lightweight design doesn't stop it from providing various advanced features however, that may fit the needs of both casual and power users alike. All you have to do is just type the file name that you’re looking for, and Listary will display the search results at breakneck speed.</description>
<projectUrl>http://www.listary.com</projectUrl>
<tags>listary search find filemanager admin</tags>
<copyright></copyright>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes></releaseNotes>
</metadata>
<files>
<file src="tools**" target="tools" />
</files>
</package>
和chocolateyInstall.ps1包含以下内容。
$packageName = 'Listary'
$installerType = 'exe'
$url = 'http://www.listary.com/download/Listary.exe'
$silentArgs = '/SP /VERYSILENT /NORESTART'
Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url"
https://github.com/chocolatey/choco/wiki/CreatePackages#testing-your-package(固定链接)
请注意,源不是nupkg,而是找到nupkg文件的目录。
在choco.exe(Chocolatey的转世)中,您可以简单地指向nuspec或nupkg文件进行安装。
链接地址: http://www.djcxy.com/p/17703.html上一篇: Creating your own packages using chocolatey
下一篇: alone Jetty be used as a reverse proxy (without Apache mod