Difference between revisions of "Documentation/Labs/HomebrewCask"
From Slicer Wiki
(Created page with "This page was created based on the discussion [https://discourse.slicer.org/t/add-slicer-nightly-to-homebrew-macos/811 Add Slicer Nightly to Homebrew (macOS)] == Definitions...") |
(Add steps to use Homebrew and Slicer) |
||
Line 3: | Line 3: | ||
== Definitions == | == Definitions == | ||
− | + | === Homebrew === | |
− | * | + | [https://brew.sh/ Homebrew] is "the missing package manager for macOS". It is designed for installing UNIX tools and other open-source applications. It will quickly download and install them, compiling them from source. It can install stuff like: |
+ | * <code>vim</code> | ||
+ | * <code>ffmpeg</code> | ||
+ | * <code>python</code> | ||
− | == | + | === Homebrew Cask === |
+ | [https://caskroom.github.io/ Homebrew Cask] extends Homebrew with support for installing binary apps — the kind you normally drag to your Applications folder from DMG files. For example: | ||
+ | * 3D Slicer | ||
+ | * Google Chrome | ||
− | + | === Homebrew Versions === | |
+ | |||
+ | [https://github.com/caskroom/homebrew-versions Homebrew Versions] lets you install alternate versions of the apps from Homebrew Cask. For example: | ||
+ | * 3D Slicer ''Nightly'' | ||
+ | * Google Chrome ''Canary'' | ||
+ | |||
+ | |||
+ | == Steps to update Slicer cask (for maintainers) == | ||
+ | |||
+ | === Setup === | ||
+ | <pre> | ||
+ | # Install homebrew | ||
+ | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||
+ | |||
+ | # Install cask-upgrade | ||
+ | brew tap buo/cask-upgrade | ||
+ | </pre> | ||
+ | |||
+ | === Update === | ||
+ | This automatically creates a pull request in [https://github.com/caskroom/homebrew-versions/ homebrew-versions] to update the [https://github.com/caskroom/homebrew-versions/blob/master/Casks/slicer-nightly.rb <code>slicer-nightly</code> cask] (a Ruby script) with the new version. | ||
+ | <pre> | ||
+ | cask-repair --cask-version 4.7.0.26273,676538 --fail-on-error --blind-submit slicer-nightly | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | == Steps to upgrade Slicer app (for users) == | ||
+ | |||
+ | === Setup === | ||
+ | <pre> | ||
+ | # Install homebrew + homebrew-cask | ||
+ | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||
+ | |||
+ | # Install homebrew-versions | ||
+ | brew tap caskroom/versions | ||
+ | |||
+ | # Install slicer-nightly | ||
+ | brew cask install slicer-nightly | ||
+ | </pre> | ||
+ | |||
+ | === Upgrade === | ||
+ | <pre> | ||
+ | # Update brew taps and formulae | ||
+ | brew update | ||
+ | |||
+ | # Download and install nightly version | ||
+ | brew cask upgrade slicer-nightly | ||
+ | </pre> |
Revision as of 22:00, 15 August 2017
Home < Documentation < Labs < HomebrewCaskThis page was created based on the discussion Add Slicer Nightly to Homebrew (macOS)
Contents
Definitions
Homebrew
Homebrew is "the missing package manager for macOS". It is designed for installing UNIX tools and other open-source applications. It will quickly download and install them, compiling them from source. It can install stuff like:
vim
ffmpeg
python
Homebrew Cask
Homebrew Cask extends Homebrew with support for installing binary apps — the kind you normally drag to your Applications folder from DMG files. For example:
- 3D Slicer
- Google Chrome
Homebrew Versions
Homebrew Versions lets you install alternate versions of the apps from Homebrew Cask. For example:
- 3D Slicer Nightly
- Google Chrome Canary
Steps to update Slicer cask (for maintainers)
Setup
# Install homebrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" # Install cask-upgrade brew tap buo/cask-upgrade
Update
This automatically creates a pull request in homebrew-versions to update the slicer-nightly
cask (a Ruby script) with the new version.
cask-repair --cask-version 4.7.0.26273,676538 --fail-on-error --blind-submit slicer-nightly
Steps to upgrade Slicer app (for users)
Setup
# Install homebrew + homebrew-cask /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" # Install homebrew-versions brew tap caskroom/versions # Install slicer-nightly brew cask install slicer-nightly
Upgrade
# Update brew taps and formulae brew update # Download and install nightly version brew cask upgrade slicer-nightly