大佬教程收集整理的这篇文章主要介绍了windows – 使用Chocolatey创建自己的包,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我还在http://chocolatey.org创建了一个帐户并使用设置了API密钥
其中& ltapiKey>将替换为您的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://scheR_970_11845@as.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"
请注意,源不是nupkg,而是找到nupkg文件的目录.
在choco.exe(Chocolatey的转世)中,您只需指向一个nuspec或nupkg文件进行安装即可.
以上是大佬教程为你收集整理的windows – 使用Chocolatey创建自己的包全部内容,希望文章能够帮你解决windows – 使用Chocolatey创建自己的包所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。