Ish*_*han 7 windows package-managers nuget chocolatey
我正在尝试使用名为Listary的应用程序为Chocolatey创建一个包.我遵循了Chocolatey维基上的说明以及此处的文章.
我还在http://chocolatey.org上创建了一个帐户,并使用设置API密钥
nuget setApiKey -Source http://chocolatey.org/api/v2/
其中<apiKey>替换为您的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
Run Code Online (Sandbox Code Playgroud)
这就是我在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>
Run Code Online (Sandbox Code Playgroud)
而chocolateyInstall.ps1包含以下内容.
$packageName = 'Listary'
$installerType = 'exe'
$url = 'http://www.listary.com/download/Listary.exe'
$silentArgs = '/SP /VERYSILENT /NORESTART'
Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url"
Run Code Online (Sandbox Code Playgroud)
https://github.com/chocolatey/choco/wiki/CreatePackages#testing-your-package (固定链接)
请注意,源不是 nupkg,而是找到 nupkg 文件的目录。
在 choco.exe(Chocolatey 的转世)中,您只需指向 nuspec 或 nupkg 文件即可进行安装。
| 归档时间: |
|
| 查看次数: |
3911 次 |
| 最近记录: |