Code Monkey home page Code Monkey logo

devbox-choco's Introduction

Chocolatey Devbox Package Repository

Packages in this repository are public tools, well known to everybody. We are using these packages for internal purposes in FirstBeatMedia Devbox development environment.

After researching other package managers like Npackd, CoApp or 0install, we decided to use Chocolatey as an application manager for Windows.

Install Chocolatey package manager

Chocolatey is installed with a simple copy-paste procedure from their home page. It's installed in C:\Chocolatey directory, by default. The reasoning for that is explained here, but just remember that the folder name must not contain spaces.

I decided to use more appropriate subdirectory - I want it to be installed in C:\Tools\Choco and later we will install all the Linux- like applications in sub-folders under C:\Tools.

To force that installation directory, we must set an environment variable ChocolateyInstall, so this is our complete copy-paste installation sequence:

:: Set user's permanent environment variables
set ChocolateyInstall="%SystemDrive%\Tools\Choco"
setx ChocolateyInstall "%ChocolateyInstall%"

:: Create that directory
mkdir "%ChocolateyInstall%"

:: Install Chocolatey
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ChocolateyInstall%\bin

Note that modifying environment variables can take a while, so please be patient. Chocolatey should automatically and permanently set %ChocolateyInstall% environment variable.

Basic package manipulation

Command examples are shown for package named Devbox-Vagrant.

Installing packages
cinst Devbox-Vagrant
Search for a package

Lists packages available from a remote source, containing word-phrase.

clist vagrant
Information about a package
cver Devbox-Vagrant
Uninstall a package
cuninst Devbox-Vagrant
List installed packages
cver all -localonly

or even shorter:

cver all -lo

Install Devbox stack

:: We assume that Choco is already installed

cinst Devbox-Common.extension
cinst Devbox-Common
cinst Devbox-VirtualBox
cinst Devbox-Vagrant

:: Vagrant will probably restart system without question.
:: If not, restart command shell or type 'setenv'

Install Devbox optional components

:: Tools
cinst Devbox-Wget
cinst Devbox-UnZip
cinst Devbox-Sed
cinst Devbox-RapidEE
cinst Devbox-Nano

:: Console improvements
cinst Devbox-VCRedist2010
cinst Devbox-Clink
cinst Devbox-ConEmu

:: Git
cinst Devbox-Notepad2
cinst Devbox-P4Merge
cinst Devbox-Git
cinst Devbox-GitFlow
cinst Devbox-GitSettings

Conclusion

Chicolatey could become very usable package manager for Windows.

devbox-choco's People

Contributors

cvladan avatar michfield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

devbox-choco's Issues

Devbox-GitFlow works only when started as administrator

Error is something like... can't write getopt.exe. When executed with elevated privileges, as administrator, everything works as expected.

Workaround is to start again cmd.exe but as administrator, and type cinst -force Devbox-GitFlow

DevBox-ConEmu uses Stop-OnAppIsInstalled, which is not available on first install

I can understand the need to share some common code amongst packages, but IMHO, it shouldn't be in another depedent package -- but should be a basic nuspec include, used only during installation.

As it stands, DevBox-ConEmu throws an error about missing Stop-OnAppIsInstalled (though ConEmu will completely install) because that function is not defined. Although you've included a couple of additional packages they are not yet available on a first time install.

What I do, for installation only dependencie:

  • put the code in a shared source directory like this
  • include the source in the .nuspec like this
  • use a helper to properly resolve the current directory and dot source the files like this (there are a lot of ways to attempt to resolve the current directory, many of which fail under certain circumstances -- this is the most accurate I was able to create)

This way there is no need to depend on another package, muddy a users system with additional stuff, etc.

Also, I see that your helper code is in Devbox-Common.extension as psm1 files. psm1 is intended to export functions to external callers with Export-ModuleMember and should be used with PowerShells Import-Module cmdlet. For helper functions used by packages like this, it's less ceremonious to just use a standard ps1 and dot source as I described above.

In any event, great job on the ConEmu package -- much better than the original package, which was put together quite hastily and hasn't been updated in ages.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.