HandBrake-docs/source/docs/en/latest/developer/build-windows.markdown
Bradley Sepos f745f3c938 docs: Remove unnecessary Windows build dependency versions.
The package names are sufficient.
2016-11-17 23:49:50 -05: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 Windows HandBrake https://handbrake.fr/ Latest English en Bradley Sepos <bradley@bradleysepos.com> (BradleyS), Scott (s55) 2016 HandBrake Team Creative Commons Attribution-ShareAlike 4.0 International CC BY-SA 4.0 https://handbrake.fr/docs/license.html

Building HandBrake for Windows

Command line interface and LibHB

Building the Windows [CLI](abbr:Command Line Interface) and LibHB (hb.dll) requires Linux and a recent MinGW-w64 toolchain. Ubuntu 16.04 LTS or later is recommended; other distros may work as well. In all cases, we recommend you build the MinGW-w64 toolchain using our instructions, as most packaged versions have issues that can produce non-functioning builds.

The following instructions are for Ubuntu 16.04 LTS.

Dependencies:

  • cmake
  • curl
  • gcc
  • git
  • libtool
  • m4
  • make
  • patch
  • python
  • tar
  • wget
  • yasm

Install all dependencies.

sudo apt-get install cmake curl gcc git intltool libtool m4 make patch python tar wget yasm

Clone the HandBrake repository.

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

Build the MinGW-w64 toolchain using the provided script, where username is your user name. Feel free to choose a different output path, if desired.

scripts/mingw-w64-build x86_64 /home/username/toolchains/

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

Build HandBrake.

./configure --cross=x86_64-w64-mingw32 --enable-x265 --enable-qsv --launch-jobs=$(nproc 2>/dev/null) --launch

When complete, you will find HandBrakeCLI.exe in the build directory and hb.dll in build/libhb.

Graphical interface

The following tools are required to build and run the [GUI](abbr:Graphical User Interface).

Clone https://github.com/HandBrake/HandBrake.git using your git client.

Source code for the GUI resides in the win\CS folder and the solution file is named HandBrake.sln. Make sure HandBrakeWPF is set as the startup project in the Solution Explorer: right-click on HandBrakeWPF and select "Set as startup project".

To build the GUI, select Build Solution from the Build menu.

When complete, locate the output folder where HandBrake.exe is created (typically in win\CS\HandBrakeWPF\bin\..., depending on the selected build profile). Copy hb.dll to this folder. This completes the build process.