ChocolateStore is a free and open source software that allows caching of Chocolatey packages for easy offline installation
Also cache chocolatey packages to efficiently provision multiple machines or VMs on a LAN
Using Visual Studio
- Visual Studio 2015
- .NET Framework 4.0
- NuGet Package Manager with "Allow NuGet to download missing packages" setting enabled (see also https://developercommunity.visualstudio.com/t/missing-default-nuget-package-source/1453751 if it does not work)
Using command line
Install these tools
Clone repository to your machine:
git clone https://github.com/sr258/ChocolateStore.git
Restore NuGet packages with NuGet Commandline:
cd .\ChocolateStore\src\ChocolateStore
nuget restore .\ChocolateStore.csproj -OutputDirectory ..\..\packages
Compile application:
- Default build
dotnet build
- Debug build
dotnet build -c Debug
- Release build
dotnet build -c Release
After completing the compilation, it is possible to merge compiled files as a single standalone executable using ILMerge (or ILMerge GUI)
ChocolateStore <directory> <package/version> variable1=value1,value2 variable2=value3
In this example, we will store the latest version of GoogleChrome on a network share and install it from a client on the LAN. We will also store a specific version of Python, and the latest version of Firefox as an example for using variables.
-
In a command prompt, browse to the ChocolateStore executable folder.
-
Execute the following command. Note that the first argument is a network share for which the current user has "write" permissions. This will download the GoogleChrome package, download the installer and modify the package to point to the local installer.
ChocolateStore M:\Store GoogleChrome
If you need a specific version, add it after the package name and a
/
.ChocolateStore M:\Store python/3.8.2
For packages containing variables, add a third argument to the syntax, which is the name of the variable followed by the value to be assigned. This is mandatory in packages that use variables in the download url.
This argument support multiple variables and values.ChocolateStore M:\Store Firefox locale=en-US
-
From a computer that would like to have GoogleChrome installed and from which the current user has "read" permissions to the network share execute the following command:
cinst GoogleChrome -source M:\Store
- Note that installing the package with variables is no different from packages that do not contain variables.