The purpose of this Lab is to offer an alternative way to install / update Slicer for macOS users using the command line. The process is much more convenient than the traditional way, but it requires minimal computer skills that not all users might have. Therefore this alternative way is specially intended to be used by developers or engineers instead of medical staff and casual users.
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. Homebrew can install stuff like:
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 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)
Adding an SSH key to GitHub and the KeyChain might be needed.
# Install homebrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" # Install cask-repair brew install vitorgalvao/tiny-scripts/cask-repair
cask-repair --cask-version 184.108.40.206273,676538 --fail-on-error --blind-submit slicer-nightly
Steps to upgrade Slicer app (for users)
# Install homebrew + homebrew-cask /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" # Tell brew to look also in homebrew-versions brew tap caskroom/versions # Install Slicer.app (nightly) brew cask install slicer-nightly # Install cask-upgrade brew tap buo/cask-upgrade
Download and install nightly version of Slicer.app:
brew cu slicer-nightly -y