首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用巧克力制作自己的套餐

用巧克力制作自己的套餐
EN

Stack Overflow用户
提问于 2013-12-06 09:35:58
回答 1查看 4.3K关注 0票数 7

我正在尝试为一个名为李斯特的应用程序创建一个带有巧克力的包。我遵循了巧克力维基上的说明以及这里一文。

我还在http://chocolatey.org上创建了一个帐户,并使用

nuget setApiKey -Source http://chocolatey.org/api/v2/

将替换为您的API键。

当我输入命令choco pack来创建NuGet包时,它说成功地创建了包,但是当我测试刚才使用cinst Listary -source Listary.1.0.nupkg -force创建的包时,它说

代码语言:javascript
复制
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文件中的内容。

代码语言:javascript
复制
<?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包含以下内容。

代码语言:javascript
复制
$packageName = 'Listary'
$installerType = 'exe'
$url = 'http://www.listary.com/download/Listary.exe'
$silentArgs = '/SP /VERYSILENT /NORESTART'
Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url"
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-12-07 05:58:13

https://github.com/chocolatey/choco/wiki/CreatePackages#testing-your-package (固定链路)

注意,源不是nupkg,而是找到nupkg文件的目录。

在choco.exe (巧克力的转世)中,您只需指向nuspec或nupkg文件即可安装。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20420495

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档