Skip to content

Commit a919b85

Browse files
update CompileHowTo.md
1 parent f521cbf commit a919b85

File tree

1 file changed

+53
-74
lines changed

1 file changed

+53
-74
lines changed

doc/development/CompileHowto.md

Lines changed: 53 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ cd $HYPERION_HOME
6161

6262
```console
6363
sudo apt-get update
64-
sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5websockets5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libasound2-dev libturbojpeg0-dev libjpeg-dev libssl-dev libftdi1-dev
64+
sudo apt-get install git cmake build-essential ninja-build qtbase5-dev libqt5serialport5-dev libqt5websockets5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libasound2-dev libturbojpeg0-dev libjpeg-dev libssl-dev libftdi1-dev
6565
```
6666

6767
**Ubuntu (22.04+) - Qt6 based**
6868

6969
```console
7070
sudo apt-get update
71-
sudo apt-get install git cmake build-essential qt6-base-dev libqt6serialport6-dev libqt6websockets6-dev libxkbcommon-dev libvulkan-dev libgl1-mesa-dev libusb-1.0-0-dev python3-dev libasound2-dev libturbojpeg0-dev libjpeg-dev libssl-dev pkg-config libftdi1-dev
71+
sudo apt-get install git cmake build-essential ninja-build qt6-base-dev libqt6serialport6-dev libqt6websockets6-dev libxkbcommon-dev libvulkan-dev libgl1-mesa-dev libusb-1.0-0-dev python3-dev libasound2-dev libturbojpeg0-dev libjpeg-dev libssl-dev pkg-config libftdi1-dev
7272
```
7373

7474
**For Linux X11/XCB grabber support**
@@ -110,43 +110,51 @@ See [AUR](https://aur.archlinux.org/packages/?O=0&SeB=nd&K=hyperion&outdated=&SB
110110
The following dependencies are needed to build hyperion.ng on fedora.
111111
```console
112112
sudo dnf -y groupinstall "Development Tools"
113-
sudo dnf install python3-devel qt-devel qt6-qtbase-devel qt6-qtserialport-devel qt6-qtwebsockets-devel xrandr xcb-util-image-devel qt5-qtx11extras-devel alsa-lib-devel turbojpeg-devel libusb-devel xcb-util-devel dbus-devel openssl-devel fedora-packager rpmdevtools gcc libcec-devel libftdi1-dev
113+
sudo dnf install ninja-build python3-devel qt-devel qt6-qtbase-devel qt6-qtserialport-devel qt6-qtwebsockets-devel xrandr xcb-util-image-devel qt5-qtx11extras-devel alsa-lib-devel turbojpeg-devel libusb-devel xcb-util-devel dbus-devel openssl-devel fedora-packager rpmdevtools gcc libcec-devel libftdi1-dev
114114
```
115115
After installing the dependencies, you can continue with the compile instructions later on this page (the more detailed way..).
116116

117117
## macOS
118118
To install on OS X you either need [Homebrew](https://brew.sh/) or [Macport](https://www.macports.org/) but Homebrew is the recommended way to install the packages. To use Homebrew, XCode is required as well, use `brew doctor` to check your install.
119119

120120
First you need to install the dependencies for either the QT5 or QT6 build:
121-
####QT5
121+
#### QT5
122122
```console
123-
brew install git qt@5 python3 cmake libusb [email protected] libftdi pkg-config
123+
brew install git qt@5 ninja python3 cmake libusb [email protected] libftdi pkg-config
124124
```
125-
####QT6
125+
#### QT6
126126
```console
127-
brew install git qt python3 cmake libusb openssl@1.1 libftdi pkg-config
127+
brew install git qt ninja python3 cmake libusb openssl@3 libftdi pkg-config
128128
```
129129

130130
## Windows
131-
We assume a 64bit Windows 10. Install the following;
131+
> [!NOTE]
132+
> When downloading, please remember whether you have an x64 or an ARM64 architecture.
133+
134+
We assume a 64bit Windows 11. Install the following:
132135
- [Git](https://git-scm.com/downloads) (Check: Add to PATH)
133-
- [CMake (Windows win64-x64 installer)](https://cmake.org/download/) (Check: Add to PATH)
136+
- [CMake (Windows Installer)](https://cmake.org/download/) (Check: Add to PATH)
134137
- [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/downloads/#visual-studio-community-2022)
135138
- Select 'Desktop development with C++'
136-
- On the right, just select `MSVC v143 VS 2022 C++ x64/x86-Buildtools`, `C++ ATL for latest v143 build tools (x86 & x64)` and latest `Windows 10 SDK`. Everything else is not needed.
137-
- [Win64 OpenSSL v1.1.1w](https://slproweb.com/products/Win32OpenSSL.html) ([direct link](https://slproweb.com/download/Win64OpenSSL-1_1_1w.exe))
138-
- [Python 3 (Windows x86-64 executable installer)](https://www.python.org/downloads/windows/) (Check: Add to PATH and Debug Symbols)
139+
- On the right, just select:
140+
- for x64 architecture: `MSVC v143 VS 2022 C++ x64/x86-Buildtools`, `C++ ATL for latest v143 build tools (x86 & x64)`
141+
- for ARM64 architecture: `MSVC v143 VS 2022 C++ ARM64/ARM64EC-Buildtools`, `C++ ATL for latest v143 build tools (ARM64/ARM64EC)`
142+
- and latest `Windows 11 SDK`.
143+
- Everything else is not needed.
144+
- [Win64 OpenSSL](https://slproweb.com/products/Win32OpenSSL.html)
145+
- [x64 direct link](https://slproweb.com/download/Win64OpenSSL-3_5_0.exe)
146+
- [ARM64 direct link](https://slproweb.com/download/Win64ARMOpenSSL-3_5_0.exe)
147+
- [Python 3 Windows installer (64-bit or ARM64)](https://www.python.org/downloads/windows/) (Check: Add to PATH and Debug Symbols)
139148
- Open a console window and execute `pip install aqtinstall`.
140-
- Now we can download Qt to _C:\Qt_ `mkdir c:\Qt && aqt install -O c:\Qt 5.15.2 windows desktop win64_msvc2019_64`
141-
- QT6.2 requires the [Vulkan SDK](https://vulkan.lunarg.com/sdk/home) to be installed
149+
- Now we can download Qt to _C:\Qt_:
150+
- for x64 architecture: `mkdir c:\Qt && aqt install-qt -O c:\Qt windows desktop 6.8.3 win64_msvc2022_64 -m qtserialport qtwebsockets`
151+
- for ARM64 architecture: `mkdir c:\Qt && aqt install-qt -O c:\Qt windows_arm64 desktop 6.8.3 win64_msvc2022_arm64 -m qtserialport qtwebsockets`
142152
- [libjpeg-turbo SDK for Visual C++](https://sourceforge.net/projects/libjpeg-turbo/files/)
143153
- Download the latest 64bit installer (currently `libjpeg-turbo-3.0.1-vc64.exe`) and install to its default location `C:\libjpeg-turbo64`.
144154

145155
### Optional:
146-
- For DirectX9 grabber:
147-
- [DirectX Software Development Kit](https://www.microsoft.com/en-us/download/details.aspx?id=6812) ([direct link](https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe))
148156
- For package creation:
149-
- [NSIS 3.x](https://sourceforge.net/projects/nsis/files/NSIS%203/) ([direct link](https://sourceforge.net/projects/nsis/files/latest/download))
157+
- [Inno Setup 6.x](https://jrsoftware.org/isinfo.php) ([direct link](https://jrsoftware.org/download.php/is.exe?site=1))
150158

151159
# Compiling and installing Hyperion
152160

@@ -165,14 +173,14 @@ git clone --recursive https://github.com/hyperion-project/hyperion.ng.git hyperi
165173
cd hyperion
166174
mkdir build
167175
cd build
168-
cmake -DCMAKE_BUILD_TYPE=Release ..
169-
make -j $(nproc)
176+
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
177+
cmake --build .
170178
if this get stucked and dmesg says out of memory try:
171-
make -j 2
179+
cmake --build . -j 2
172180
# optional: install into your system
173-
sudo make install/strip
181+
sudo cmake --build . --target install/strip
174182
# to uninstall (not very well tested, please keep that in mind)
175-
sudo make uninstall
183+
sudo cmake --build . --target uninstall
176184
# ... or run it from compile directory
177185
bin/hyperiond
178186
# webui is located on localhost:8090 or 8091
@@ -195,83 +203,54 @@ On Windows MSVC2022 set it via the CMakeSettings.json:
195203

196204
## The detailed way (with many comments)
197205

198-
**Download:**
199-
Creates hyperion directory and checkout the code from github
206+
### 1. Download:
207+
Checkout the code from GitHub
200208
```console
201-
export HYPERION_DIR="hyperion"
202-
git clone --recursive --depth 1 https://github.com/hyperion-project/hyperion.ng.git "$HYPERION_DIR"
209+
git clone --recursive --depth 1 https://github.com/hyperion-project/hyperion.ng.git hyperion
203210
```
204211

205-
**Preparations:**
212+
### 2. Prepare:
206213
Change into hyperion folder and create a build folder
207214
```console
208-
cd "$HYPERION_DIR"
215+
cd hyperion
209216
mkdir build
210217
cd build
211218
```
212219

213-
**Generate the make files:**
214-
To generate make files with automatic platform detection and default settings:
215-
This should fit to *RPI, x86, amlogic/wetek:
216-
```console
217-
cmake -DCMAKE_BUILD_TYPE=Release ..
218-
```
219-
220-
*Developers on x86* linux should use:
221-
```console
222-
cmake -DPLATFORM=x11-dev -DCMAKE_BUILD_TYPE=Release ..
223-
```
224-
225-
To use framebuffer instead of dispmanx (for example on the *cubox-i*):
226-
```console
227-
cmake -DENABLE_FB=ON -DCMAKE_BUILD_TYPE=Release ..
228-
```
220+
### 3. Configure:
229221

230-
To generate make files on OS X:
222+
> [!IMPORTANT]
223+
> **Windows** developers may need to use the "x64" or "AMR64" native build tools. \
224+
An easy way to do that is to run the shortcut "Native Tools Command
225+
Prompt" for the architecture/version of Visual Studio that you have installed.
231226

232-
Platform should be auto detected and refer to osx, you can also force osx:
227+
To generate the configuration files with automatic platform detection and default settings:
228+
This should fit to **RPI (arm), x64, Windows, macOS**:
233229
```console
234-
cmake -DPLATFORM=osx -DCMAKE_BUILD_TYPE=Release ..
235-
```
236-
237-
To generate files on Windows (Release+Debug capable):
238-
239-
Platform should be auto detected and refer to windows, you can also force windows:
240-
241-
```posh
242-
# You might need to setup MSVC env first
243-
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
244-
cmake -DPLATFORM=windows -G "Visual Studio 17 2022" ..
230+
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
245231
```
246232

247-
**Run make to build Hyperion:**
248-
The `-j $(nproc)` specifies the amount of CPU cores to use.
233+
**Developers** should use:
249234
```console
250-
make -j $(nproc)
235+
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ..
251236
```
252237

253-
On a mac you can use ``sysctl -n hw.ncpu`` to get the number of available CPU cores to use.
254-
238+
### 4. Make it:
255239
```console
256-
make -j $(sysctl -n hw.ncpu)
240+
ninja
257241
```
258242

259-
On Windows run:
260-
```posh
261-
cmake --build . --config Release -- -maxcpucount
262-
```
263-
Maintainer: To build installer, install [NSIS](https://nsis.sourceforge.io/Main_Page) and set env `VCINSTALLDIR="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC"`
243+
### 5. Additionals (Linux)
264244

265-
**Install hyperion into your system:**
266-
Copy all necessary files to ``/usr/local/share/hyperion``
245+
**Install hyperion into your system:** \
246+
Copies all required files to ``/usr/local/share/hyperion``
267247
```console
268-
sudo make install/strip
248+
sudo cmake --build . --target install/strip
269249
```
270250

271-
If you want to install into another location call this before installing
272-
251+
**If you want to install into another location call this before installing:**
273252
```console
274-
cmake -DCMAKE_INSTALL_PREFIX=/home/pi/apps ..
253+
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/home/pi/apps ..
275254
```
276255
This will install to ``/home/pi/apps/share/hyperion``
277256

0 commit comments

Comments
 (0)