-
Notifications
You must be signed in to change notification settings - Fork 173
Building Hydrogen from source (Windows)
Since Hydrogen 1.1, the easiest way to build Hydrogen from source is by using msys2. Msys2 is "Software Distribution and Building Platform for Windows" which provides all necessary packages for Hydrogen's dependencies. The packages already contain binaries, so the time-consuming compilation of dependencies can be omitted.
We're providing a powershell build script which automates the process of building Hydrogen (including the installation of most of the necessary dependencies). By using the script, the build process can also be done by non-developers and requires (in the best case..) only very basic skills.
In addition, this pages describes how to Debug Hydrogen on windows.
Limitation of this approach: There is currently no support for the Jack Audio Driver if you build Hydrogen via msys2.
Go to https://www.msys2.org/ and download the Installer. Run the installer on your system. Run the msys2 application afterwards. A terminal window will open.
In the next step we will install git. Note: It is not necessary to do that inside msys2, you may also use an already installed git client. If you feel unsure about this, just use the following steps.
Install git:
pacman -S git
Create a directory (whereever you want) and clone the Hydrogen git repository:
mkdir /c/hydrogen-src
cd /c/hydrogen-src
git clone https://github.com/hydrogen-music/hydrogen.git
You can close the msys2 terminal window if the repository has been cloned sucessfully.
Install python from https://www.python.org/downloads/. The most recent version should be fine.
If you use the "Install now" feature, please memorize or write down the installation directory of Python. If you choose "Customize installation", make sure that pip support is enabled.
First of all, we have to prepare the build script itself. Open the file windows\Build-WinNative.ps1
in your favourite text editor and set the variable $python_exe
to the path of the Python interpreter. This is the path of your Python installation + "\python" (the filename of the python binary itself). In the end, it should look similiar to this line:
$python_exe=C:\python39\python
Now start the Windows Powershell and change to the windows
directory in your copy of the Hydrogen git repository. Adjust the path names to whatever location you have chosen earlier for your git repository.
cd C:\hydrogen-src\hydrogen\windows
Now use our build skript to install all the required packages from msys2:
./Build-WinNative.ps1 --install-deps
If you're getting a permission error and haven't run any powershell script before, have a look here.