Difference between revisions of "Documentation/Labs/HomebrewCask"

From Slicer Wiki
Jump to: navigation, search
m
(3 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
=== Homebrew ===
 
=== 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:
+
[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. Homebrew can install stuff like:
 
* <code>vim</code>
 
* <code>vim</code>
 
* <code>ffmpeg</code>
 
* <code>ffmpeg</code>
Line 23: Line 23:
  
 
== Steps to update Slicer cask (for maintainers) ==
 
== Steps to update Slicer cask (for maintainers) ==
 +
 +
Adding an [https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ SSH key] to GitHub and the KeyChain might be needed.
  
 
=== Setup ===
 
=== Setup ===
Line 29: Line 31:
 
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
 
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  
# Install cask-upgrade
+
# Install cask-repair
brew tap buo/cask-upgrade
+
brew install vitorgalvao/tiny-scripts/cask-repair
 
</pre>
 
</pre>
  
Line 38: Line 40:
 
cask-repair --cask-version 4.7.0.26273,676538 --fail-on-error --blind-submit slicer-nightly
 
cask-repair --cask-version 4.7.0.26273,676538 --fail-on-error --blind-submit slicer-nightly
 
</pre>
 
</pre>
 
  
 
== Steps to upgrade Slicer app (for users) ==
 
== Steps to upgrade Slicer app (for users) ==
Line 52: Line 53:
 
# Install Slicer.app (nightly)
 
# Install Slicer.app (nightly)
 
brew cask install slicer-nightly
 
brew cask install slicer-nightly
 +
 +
# Install cask-upgrade
 +
brew tap buo/cask-upgrade
 
</pre>
 
</pre>
  
Line 57: Line 61:
 
Download and install nightly version of Slicer.app:
 
Download and install nightly version of Slicer.app:
 
<pre>
 
<pre>
brew cask upgrade slicer-nightly
+
brew cu slicer-nightly
 
</pre>
 
</pre>

Revision as of 00:02, 19 August 2017

Home < Documentation < Labs < HomebrewCask

This page was created based on the discussion Add Slicer Nightly to Homebrew (macOS)

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. Homebrew 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)

Adding an SSH key to GitHub and the KeyChain might be needed.

Setup

# 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

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)"

# 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

Upgrade

Download and install nightly version of Slicer.app:

brew cu slicer-nightly