mirror of
https://github.com/HandBrake/HandBrake-docs.git
synced 2025-12-13 19:48:23 -06:00
docs: Update and revise Building HandBrake for Windows.
Fixes an issue where code was treated as text, resulting in incorrect instructions due to collapsed sequential hyphens (--).
This commit is contained in:
parent
713e5dc912
commit
c63f202005
@ -7,7 +7,7 @@ Project_URL: https://handbrake.fr/
|
||||
Project_Version: Latest
|
||||
Language: English
|
||||
Language_Code: en
|
||||
Authors: Scott (s55)
|
||||
Authors: Bradley Sepos <bradley@bradleysepos.com> (BradleyS), Scott (s55)
|
||||
Copyright: 2016 HandBrake Team
|
||||
License: Creative Commons Attribution-ShareAlike 4.0 International
|
||||
License_Abbr: CC BY-SA 4.0
|
||||
@ -15,20 +15,18 @@ License_URL: https://handbrake.fr/docs/license.html
|
||||
---
|
||||
|
||||
Building HandBrake for Windows
|
||||
==========================================
|
||||
==============================
|
||||
|
||||
## Command line interface and LibHB
|
||||
|
||||
## Building HandBrake CLI and libhb (hb.dll)
|
||||
Building the Windows [CLI](abbr:Command Line Interface) and LibHB (hb.dll) requires Linux and a recent [MinGW-w64](https://mingw-w64.org/) 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 CLI and libhb are build on linux using the MinGW toolchain.
|
||||
The following instructions are for Ubuntu 16.04 LTS.
|
||||
|
||||
We typically recommend Ubuntu (16.04 LTS or later) as a base but other distro's may work as well.
|
||||
Note, we currently roll our own MinGW toolchain as there is often problems with distro provided versions.
|
||||
|
||||
Make sure the following dependencies are installed
|
||||
Dependencies:
|
||||
|
||||
- git
|
||||
- yasm (>= 1.3)
|
||||
- yasm [minimum recommended version: 1.3]
|
||||
- libtool
|
||||
- intltool
|
||||
- cmake
|
||||
@ -37,36 +35,46 @@ Make sure the following dependencies are installed
|
||||
- patch
|
||||
- tar
|
||||
- m4
|
||||
- python (>= 2.7.1)
|
||||
- wget / curl
|
||||
- python 2 [minimum recommended version: 2.7.1]
|
||||
- curl
|
||||
- wget
|
||||
|
||||
If you do not have a MinGW toolchain with at least GCC 5.x, then you must compile your own. We provide a script to do this for you.
|
||||
Install all dependencies.
|
||||
|
||||
- git clone https://github.com/HandBrake/HandBrake.git
|
||||
- cd HandBrake
|
||||
- cd scripts
|
||||
- ./mingw-w64-build x86_64 /home/<my_user>/toolchains/
|
||||
sudo apt-get install git yasm libtool intltool cmake gcc make patch tar m4 python curl wget
|
||||
|
||||
This process will take a few minutes, then provide you with a command which you can use to add the toolchain to your path.
|
||||
Clone the HandBrake repository.
|
||||
|
||||
To then compile HandBrake:
|
||||
git clone https://github.com/HandBrake/HandBrake.git && cd HandBrake
|
||||
|
||||
- git clone https://github.com/HandBrake/HandBrake.git
|
||||
- cd HandBrake
|
||||
- ./configure --cross=x86_64-w64-mingw32 --enable-x265 --enable-qsv --launch-jobs=1 --launch
|
||||
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.
|
||||
|
||||
When done, you will find HandBrakeCLI.exe in the "build" directory and a "hb.dll" in the "libhb" subdirectory under that.
|
||||
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.
|
||||
|
||||
Compile HandBrake.
|
||||
|
||||
./configure --cross=x86_64-w64-mingw32 --enable-x265 --enable-qsv --launch-jobs=1 --launch
|
||||
|
||||
When complete, you will find `HandBrakeCLI.exe` in the `build` directory and `hb.dll` in `build/libhb`.
|
||||
|
||||
|
||||
## Building the HandBrake GUI
|
||||
## Graphical interface
|
||||
|
||||
You will need the following tools to compile the GUI component of HandBrake for windows:
|
||||
The following tools are required to build and run the [GUI](abbr:Graphical User Interface).
|
||||
|
||||
- Install Microsoft Visual Studio Community edition from https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx
|
||||
- [Optional] install Source Tree https://www.sourcetreeapp.com/ (This is a nice GIT client for windows. VS 2015 does have built-in support if you prefer that though)
|
||||
Whatever Git client you use, you'll want to clone https://github.com/HandBrake/HandBrake.git The source code for the GUI is in the Win/CS folder. The solution file is named HandBrake.sln
|
||||
- [Microsoft Visual Studio Community Edition](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx)
|
||||
- *Optional* [Source Tree](https://www.sourcetreeapp.com) git client
|
||||
- Visual Studio 2015 has built-in git support, if you prefer it
|
||||
- `hb.dll` (see the LibHB build instructions preceding these, or download from https://handbrake.fr/nightly.php)
|
||||
|
||||
Please make sure HandBrakeWPF is set as the startup project in the "Solution Explorer". Right click it and choose "Set as startup project" if it is not. Now simply go to the Build Menu and click "Build Solution"
|
||||
Clone https://github.com/HandBrake/HandBrake.git using your git client.
|
||||
|
||||
Please note, you will need to copy hb.dll into the output folder where HandBrake.exe is compiled to. Depending on the build profile you select, you will find it in a folder under: win\CS\HandBrakeWPF\bin\...
|
||||
Please see the section above on how to build this, or grab a copy from the nightly build page on the main website.
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user