bahkoo / chocolatestore Goto Github PK
View Code? Open in Web Editor NEWCache chocolatey packages to efficiently provision multiple machines or VMs on a LAN
License: Apache License 2.0
Cache chocolatey packages to efficiently provision multiple machines or VMs on a LAN
License: Apache License 2.0
Download Failed: http://download.skype.com/3694814915aaa38100bfa0933f948e65/partner/59/SkypeSetup.exe
System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at ChocolateStore.PackageCacher.DownloadFile(String url, String destination) in C:\temp\ChocStore\src\ChocolateStore
PackageCacher.cs:line 72
Download Failed: http://download.skype.com/SkypeSetupFull.exe
System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at ChocolateStore.PackageCacher.DownloadFile(String url, String destination) in C:\temp\ChocStore\src\ChocolateStore
PackageCacher.cs:line 72
Is it reading commented out lines?
The msi package is downloaded OK however and it does install OK.
Note: but when you run Skype it reports a MSVCP140.dll errors - but this happens even when you install online. Adding the vcredist2017 package fixes the DLL errors.
It'd be nice to have an option to only download the 64bit (or only 32bit) version installers.
I am using ChocolateStore on the python2-x86_32 and python3-x86_32. In both the output package has lines that should look like this:
$win32ProductName = $('^Python' + ' ' + [regex]::escape($version) + '$')
changed into:
$win32ProductName = $('^Python' ' ' [regex]::escape($version) '$')
I had a look at the source, but I can't see any reason for this to be happening.
Hi BahKoo!
I created a new application based on your idea.
https://github.com/robertZaufall/ChocolateStoreCore
Please let me know, what you think about it.
Kind regards
Sorry for opening a lot of "can't download " issues but I'm trying to open separate issues for what I think might be due to different reasons.
This one I think is because there's variables in the URL that aren't expanded before downloading
Conemu uses a $version
variable:
chocolateyInstall.ps1
$version = '18.02.06'
...
$url = "https://github.com/Maximus5/ConEmu/releases/download/v$version/ConEmuSetup.$($version.replace('.','')).exe"
Firefox uses a $locale
variable:
chocolateyInstall.ps1
$locale = GetLocale -localeFile "$toolsPath\LanguageChecksums.csv" -product $softwareName
...
Url = "https://download-installer.cdn.mozilla.net/pub/firefox/releases/58.0.2/win32/${locale}/Firefox%20Setup%2058.0.2.exe"
I mean, I tried running the example, but it won't download the chrome installer. So does it still works, and if yes what am I doing wrong ?
Executing with:
ChocolateStore D:\Store http://chocolatey.org/api/v2/package/GoogleChrome/
Downloaded the latest adoptopenjdk8 version today:
.\ChocolateStore.exe D:\Store https://chocolatey.org/api/v2/package/adoptopenjdk8/
which worked - then tried to install it:
S C:\Users\x> cinst adoptopenjdk8 --params="/ADDLOCAL=FeatureIcedTeaWeb,FeatureJavaHome,FeatureJNLPFileRunWith" -source D:\Store
Chocolatey v0.10.15
Installing the following packages:
adoptopenjdk8
By installing you accept licenses for the packages.
AdoptOpenJDK8 v8.262.10
adoptopenjdk8 package files install completed. Performing other installation steps.
The package AdoptOpenJDK8 wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): A
WARNING: Using Addlocal
WARNING: No InstallLevel detected. Defaulting to AddLocal
WARNING: Installing only Get-OSArchitectureWidth
Attempt to use original download file name failed for 'D:\Store\adoptopenjdk8.8.262.10\8a5c7f80-c76a-11ea-920f-111b5ac1df8e'.
Copying AdoptOpenJDK8
from 'D:\Store\adoptopenjdk8.8.262.10\8a5c7f80-c76a-11ea-920f-111b5ac1df8e'
Hashes match.
Installing AdoptOpenJDK8...
WARNING: FileType '' is unrecognized, using 'exe' instead.
ERROR: Exception calling "Start" with "0" argument(s): "The specified executable is not a valid application for this OS platform."
The install of adoptopenjdk8 was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\AdoptOpenJDK8\tools\chocolateyInstall.ps1'.
See log for details.
Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- adoptopenjdk8 (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\AdoptOpenJDK8\tools\chocolateyInstall.ps1'.
Did not work, could you help :)?
I don't think the URL is a problem one, so I am reporting it just in case.
https://chocolatey.org/packages/vlc
The script first tries just 'vlc' and got the .nupkg but then found that no .exe was downloaded so tries vlc.install.
So problem seems to be that a Setup.exe package was not made.
Should there be one to go with the .nupkg?
It mentions two letter language, but I can't see where it is used??
I get this error when downloading mpc-be
Reading package 'mpc-be'
package URL: 'https://chocolatey.org/api/v2/package/mpc-be/1.5.1.171106'
Skipped: mpc-be.1.5.1.171106.nupkg - File already exists on disk.
Download Failed: https://sourceforge.net/projects/mpcbe/files/MPC-BE/Release%20builds/1.5.1/MPC-BE.1.5.1.x86-installer.zip/download
System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.GetResponse()
at ChocolateStore.PackageCacher.DownloadFile(String url, String destination) in C:\...\ChocolateStore\PackageCacher.cs:line 83
Download Failed: https://sourceforge.net/projects/mpcbe/files/MPC-BE/Release%20builds/1.5.1/MPC-BE.1.5.1.x64-installer.zip/download
System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.GetResponse()
at ChocolateStore.PackageCacher.DownloadFile(String url, String destination) in C:\...\ChocolateStore\PackageCacher.cs:line 83
Installs ok when installed directly
Chocolatey v0.10.8
Installing the following packages:
mpc-be
By installing you accept licenses for the packages.
Progress: Downloading mpc-be 1.5.1.171106... 100%
mpc-be v1.5.1.171106 [Approved]
mpc-be package files install completed. Performing other installation steps.
Downloading mpc-be 64 bit
from 'https://sourceforge.net/projects/mpcbe/files/MPC-BE/Release%20builds/1.5.1/MPC-BE.1.5.1.x64-installer.zip/download'
Progress: 100% - Completed download of C:\Users\...\AppData\Local\Temp\chocolatey\mpc-be\1.5.1.171106\MPC-BE.1.5.1.x64-installer.zip (12.33 MB).
Download of MPC-BE.1.5.1.x64-installer.zip (12.33 MB) completed.
Hashes match.
Extracting C:\Users\...\AppData\Local\Temp\chocolatey\mpc-be\1.5.1.171106\MPC-BE.1.5.1.x64-installer.zip to C:\ProgramData\chocolatey\lib\mpc-be\tools...
C:\ProgramData\chocolatey\lib\mpc-be\tools
Installing mpc-be...
mpc-be has been installed.
PATH environment variable does not have "C:\Program Files\MPC-BE x64\" in it. Adding...
mpc-be can be automatically uninstalled.
Environment Vars (like PATH) have changed. Close/reopen your shell to
see the changes (or in powershell/cmd.exe just type `refreshenv`).
The install of mpc-be was successful.
Software installed to 'C:\Program Files\MPC-BE x64\'
##And can you let me know where do I need to put this “ChocolateStore ” and what are the parameters do I need to insert (especially for )
These two packages only download and make .nupkg files but no setup.exe is downloaded/made.
I have only tried about 6 different packages so far.
Hey, nice work! I loved it - and I need that for our company. I don't want do download everything from internet. :|
So, I read the readme but it's not that complete. Can you improve with a step-by-step kind of thing? Or maybe explain a little better to me. I can improve the readme after I try it!
v6.0.5 does not download the .msi file
libreoffice 5.4.4 gives no error but cannot see .msi file.
Running ChocolateStore to make package...
Downloading: libreoffice-fresh.6.0.5.nupkg
Download Failed: https://download.documentfoundation.org/libreoffice/stable/6.0.5/win/x86/LibreOffice_6.0.5_Win_x86.msi
System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the
transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibl
y closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.TlsStream.CallProcessAuthentication(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at ChocolateStore.PackageCacher.DownloadFile(String url, String destination) in C:\temp\ChocStore\src\ChocolateStore\PackageCacher.cs:line 72
Download Failed: https://download.documentfoundation.org/libreoffice/stable/6.0.5/win/x86_64/LibreOffice_6.0.5_Win_x64.msi
System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the
transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibl
y closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.TlsStream.CallProcessAuthentication(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at ChocolateStore.PackageCacher.DownloadFile(String url, String destination) in C:\temp\ChocStore\src\ChocolateStore\PackageCacher.cs:line 72
For example, the following package is not able to download the installer for "sublime text 3":
http://chocolatey.org/api/v2/package/SublimeText3/3.0.0.3065
For example, the following package "gitextensions" depend on "git" and therefore wouldn't install:
http://chocolatey.org/api/v2/package/gitextensions
For a more complete solution I would have expected it to find dependencies for me (I'm trying to fix it myself, but as I'm new to the whole idea of chocolatey and nuget, and I'm not 100% positive that the only place to store dependencies is the *.nuspec file).
Please consider providing a built exe for windows
I get this error when downloading audacity-lame
Reading package 'audacity-lame'
package URL: 'https://chocolatey.org/api/v2/package/audacity-lame/3.99.3.20171217'
Downloading: audacity-lame.3.99.3.20171217.nupkg
Download Failed: https://lame.buanzo.org/Lame_v3.99.3_for_Windows.exe
System.Net.WebException: The remote server returned an error: (403) Forbidden.
at System.Net.HttpWebRequest.GetResponse()
at ChocolateStore.PackageCacher.DownloadFile(String url, String destination) in C:\...\ChocolateStore\src\ChocolateStore\PackageCacher.cs:line 83
Downloading:
Download Failed: https://lame.buanzo.org/
System.UnauthorizedAccessException: Access to the path 'D:\...\source\audacity-lame' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.IO.File.Create(String path)
at ChocolateStore.PackageCacher.DownloadFile(String url, String destination) in C:\...\ChocolateStore\src\ChocolateStore\PackageCacher.cs:line 94
It seems like it requires some headers to be acquired from their homepage before downloading the installer otherwise it results in a 403. This seems to be specified in it's install file:
chocolateyInstall.ps1
$options =
@{
Headers = @{
Accept = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
Referer = 'https://lame.buanzo.org/';
}
}
When installing directly there's an error at first but it tries again and downloads correctly
Installing the following packages:
audacity-lame
By installing you accept licenses for the packages.
Progress: Downloading audacity-lame 3.99.3.20171217... 100%
audacity-lame v3.99.3.20171217 [Approved]
audacity-lame package files install completed. Performing other installation steps.
Attempt to get headers for https://lame.buanzo.org/Lame_v3.99.3_for_Windows.exe failed.
The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://lame.buanzo.org/Lame_v3.99.3_for_Windows.exe'. Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (403) Forbidden."
Downloading audacity-lame
from 'https://lame.buanzo.org/Lame_v3.99.3_for_Windows.exe'
Progress: 100% - Completed download of C:\Users\x\AppData\Local\Temp\chocolatey\audacity-lame\3.99.3.20171217\audacity-lameInstall.EXE (515.06 KB).
Download of audacity-lameInstall.EXE (515.06 KB) completed.
Hashes match.
Installing audacity-lame...
audacity-lame has been installed.
audacity-lame can be automatically uninstalled.
The install of audacity-lame was successful.
Software installed to 'C:\Program Files (x86)\Lame For Audacity\'
If I cache packages in my network with ChocolateStore, how should I approach downloading new versions? Should you simply run ChocolateStore again? Will it wipe all existing data of the old version? Or is it necessary to manually remove old versions?
I got this error in powershell & CMD !
I'm the oner of folder and give modify permition to everyone !
[D:]# .\ChocolateStore.exe d:\choco https://chocolatey.org/packages/DellCommandUpdate/
Downloading:
Download Failed: https://chocolatey.org/packages/DellCommandUpdate/
System.UnauthorizedAccessException: Access to the path 'd:\choco' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at ChocolateStore.PackageCacher.DownloadFile(String url, String destination)
System.NotSupportedException: The given path's format is not supported.
at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Ionic.Zip.ZipFile.get_ReadStream()
at Ionic.Zip.ZipFile.ReadIntoInstance(ZipFile zf)
at Ionic.Zip.ZipFile.Read(String fileName, TextWriter statusMessageWriter, Encoding encoding, EventHandler`1 readProgress)
at ChocolateStore.PackageCacher.CachePackage(String dir, String url)
at ChocolateStore.Program.Main(String[] args)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.