Bradley Sepos 850fc6fa30
docs: Update Mac build instructions.
Update CMake version for latest, add more explicit Xcode installation instructions. Command Line Tools for Xcode are technically required to provide Apple git and build HandBrake from the command line, which is what the articles advocate.
2017-08-03 15:08:07 -04:00

3.0 KiB

Type, Title, Project, Project_URL, Project_Version, Language, Language_Code, Authors, Copyright, License, License_Abbr, License_URL
Type Title Project Project_URL Project_Version Language Language_Code Authors Copyright License License_Abbr License_URL
article Building HandBrake for Mac HandBrake https://handbrake.fr/ Latest English en
Bradley Sepos <bradley@bradleysepos.com> (BradleyS)
Scott (s55)
2017 HandBrake Team Creative Commons Attribution-ShareAlike 4.0 International CC BY-SA 4.0 https://handbrake.fr/docs/license.html

Building HandBrake for Mac

Building HandBrake for Mac requires an Apple computer with a 64-bit Intel processor running OS X 10.11.5 El Capitan or later, and the following dependencies.

  • Xcode 8.2.1 or later
    • free Apple Developer registration required, or install from the Mac App Store
  • Command Line Tools for Xcode
    • free Apple Developer registration required, or install using xcode-select --install

Additional dependencies (may be built via included script):

  • autoconf
  • automake
  • cmake (3.8.2 or later recommended)
  • libtool
  • pkg-config
  • yasm 1.2.0 or later (1.3.0 or later recommended)

Install Xcode1 and open it once. You may quit Xcode after it has finished loading.

Install Command Line Tools for Xcode2.

xcode-select --install

Clone the HandBrake repository.

git clone https://github.com/HandBrake/HandBrake.git && cd HandBrake

You may build and install the additional dependencies using the included script. Feel free to choose a different output path, if desired.

scripts/mac-toolchain-build /usr/local

This process will take a few minutes. If necessary, the script will provide you with instructions for adding the resulting binaries location to your environment's PATH3. Do this now.

Build HandBrake. To build the command line interface only, disable the graphical interface by appending --disable-xcode.

./configure --launch-jobs=$(sysctl -n hw.ncpu) --launch

When complete, you will find HandBrakeCLI in the build/xroot directory. If the graphical interface is enabled, you will also find HandBrake.app in this directory.

Install HandBrake (optional).

cd build && sudo make install

To start over, simply remove the build directory.

if [[ "$(basename $(pwd))" == "build" ]]; then cd ..; fi
rm -rf build

  1. Make sure Xcode is installed at /Applications/Xcode.app. When using an Xcode Beta release, you may need to rename Xcode-beta.app to Xcode.app. ↩︎

  2. When installing Command Line Tools for Xcode using the package installer (instead of xcode-select --install), make sure to install the package that corresponds to the installed Xcode version. A mismatch between the installed Xcode and Command Line Tools versions may cause problems. ↩︎

  3. /usr/local/bin is included in the system's PATH by default. It is not necessary to add it to your environment's PATH when installing the additional dependencies to /usr/local. ↩︎