Skip to content

Commit

Permalink
Update Instructions (Docker Compile, Supported platforms, License yea…
Browse files Browse the repository at this point in the history
…r) (hyperion-project#1682)

Correct docker compile to load repository
  • Loading branch information
Lord-Grey authored Jan 15, 2024
1 parent eb09640 commit 5cd21f5
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 53 deletions.
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ The amount of "%" must match with following arguments
If you want to use VSCode for development follow the steps.
- Install [VSCode](https://code.visualstudio.com/). On Ubuntu 16.04+ you can also use the [Snapcraft VSCode](https://snapcraft.io/code) package.
- Linux: Install gdb `sudo apt-get install gdb`
- Mac: ?
- Install gdb:
- Linux: `sudo apt-get install gdb`
- Mac: `brew install gdb`
- Open VSCode and click on _File_ -> _Open Workspace_ and select the file `hyperion.ng/.vscode/hyperion.code-workspace`
- Install recommended extensions
- If you installed the Task Explorer you can now use the defined vscode tasks to build Hyperion and configure cmake
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2014-2023 Hyperion Project
Copyright (c) 2014-2024 Hyperion Project

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
[![Forum](https://img.shields.io/website/https/hyperion-project.org.svg?label=Forum&down_color=red&down_message=offline&up_color=4bc51d&up_message=online&logo=homeadvisor&logoColor=white)](https://www.hyperion-project.org)
[![Documentation](https://img.shields.io/website/https/docs.hyperion-project.org.svg?label=Documentation&down_color=red&down_message=offline&up_color=4bc51d&up_message=online&logo=read-the-docs)](https://docs.hyperion-project.org)
[![Discord](https://img.shields.io/discord/785578322167463937?label=Discord&logo=discord&logoColor=white&color=4bc51d)](https://discord.gg/XtVTb3HEKS)
[![Package-Repository](https://img.shields.io/badge/Package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i4zNyw2OC43MkwxNC44Nyw1My43MkwwLjM2LDQwQzAuMTE3LDM5LjcyNyAtMC4wMTcsMzkuMzc0IC0wLjAxNywzOS4wMDlDLTAuMDE3LDM4LjU3NSAwLjE3MiwzOC4xNjMgMC41LDM3Ljg4QzAuNTksMzcuODA4IDAuNjg3LDM3Ljc0NCAwLjc5LDM3LjY5TDIxLjczLDI1Ljg0QzIxLjgyNywyNy4yODcgMjIuMTM0LDI4LjcxMSAyMi42NCwzMC4wN0w1LjY5LDM5LjcxTDE3LjUyLDUwLjcxTDMyLjYxLDQzLjI0TDM1LjQ2LDQ2LjM1TDM1LjQzLDQ2LjM0Wk05OS41OSw1Ny4yOEw2MS4wNSw3Ny41TDY4LjU2LDkwLjgyTDEwOS4xMSw2OC44Mkw5OS41OSw1Ny4yOFoiIHN0eWxlPSJmaWxsOndoaXRlO2ZpbGwtcnVsZTpub256ZXJvOyIvPjwvc3ZnPg==)](https://releases.hyperion-project.org)
![made-with-love](https://img.shields.io/badge/Made%20With-♥-ff0000.svg)

## About Hyperion
Expand Down Expand Up @@ -66,7 +67,7 @@ See [CompileHowto.md](doc/development/CompileHowto.md).
See [Documentation](https://docs.hyperion-project.org/en/user/Installation.html) or on the [Release Repository](https://releases.hyperion-project.org).

## Download
Releases available from the [Hyperion release page](https://github.com/hyperion-project/hyperion.ng/releases).
GitHub Releases are available on the [Hyperion release page](https://github.com/hyperion-project/hyperion.ng/releases).

## Privacy Policy
See [PRIVACY.md](PRIVACY.md).
Expand Down
2 changes: 1 addition & 1 deletion bin/scripts/docker-compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ log "---> BASE_PATH = ${BASE_PATH}"
CODE_PATH=${BASE_PATH};

# get Hyperion source, cleanup previous folder
if [ ${BUILD_LOCAL} == 0 ]; then
if [ ${BUILD_LOCAL} == false ]; then
CODE_PATH="${CODE_PATH}/hyperion/"

echo "---> Downloading Hyperion source code from ${GIT_REPO_URL}"
Expand Down
68 changes: 35 additions & 33 deletions doc/development/CompileHowto.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,54 @@
If you are using [Docker](https://www.docker.com/), you can compile Hyperion inside a docker container. This keeps your system clean and with a simple script it's easy to use. Supported is also cross compiling for Raspberry Pi (Debian Buster or higher). To compile Hyperion just execute one of the following commands.

The compiled binaries and packages will be available at the deploy folder next to the script.<br/>
Note: call the script with `./docker-compile.sh -h` for more options.

## Cross compilation on x86_64 for:
> [!NOTE]
> Call the script with `./docker-compile.sh --help` for more options.
**x86_64 (Debian Buster):**
```console
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i x86_64 -t buster
```
**x86_64 (Debian Bullseye):**
```console
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i x86_64 -t bullseye
```
**x86_64 (Debian Bookworm):**
## Cross compilation on amd64 (aka x86_64), sample commands

### Debian

**amd64 (Bookworm):**
```console
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i x86_64 -t bookworm
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh --name bookworm
```
**Raspberry Pi v1 & ZERO (Debian Buster)**
**arm64 or Raspberry Pi 5 (Bookworm)**
```console
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i armv6l -t buster
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh --architecture arm64 --name bookworm
```
**Raspberry Pi v1 & ZERO (Debian Bullseye)**
**Raspberry Pi 2/3/4 (Bookworm)**
```console
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i armv6l -t bullseye
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh --architecture arm/v7 --name bookworm
```
**Raspberry Pi v1 & ZERO (Debian Bookworm)**
**Raspberry Pi v1 & ZERO (Bookworm)**
```console
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i armv6l -t bookworm
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh --architecture arm/v6 --name bookworm
```
**Raspberry Pi 2/3/4 (Debian Buster)**

### Ubuntu

**amd64 (Jammy):**
```console
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i armv7l -t buster
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh --name jammy
```
**Raspberry Pi 2/3/4 (Debian Bullseye)**

### Fedora

**amd64 (39):**
```console
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i armv7l -t bullseye
wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh --name 39
```

## Cross compilation on x86_64 for developers
## Cross compilation on amd64 for developers
Using additional options you can cross compile locally
-l: use a local hyperion source code directory rather than cloning from GitHub
-c: do incremental compiles, Note: you need to keep the image and tag stable
--local: use a local hyperion source code directory rather than cloning from GitHub
--incremental: do incremental compiles, Note: you need to keep the image and tag stable

**Compile code in $HYPERION_HOME incrementally for Raspberry Pi 2/3/4 (Debian Bullseye)**
**Compile code in $HYPERION_HOME incrementally for Raspberry Pi 2/3/4 (Debian Bookworm)**
```console
cd $HYPERION_HOME
./bin/scripts/docker-compile.sh -l -c -i armv7l -t bullseye
./bin/scripts/docker-compile.sh --local --incremental --architecture arm/v7 --name bookworm
```

# The usual way
Expand Down Expand Up @@ -113,11 +115,11 @@ sudo dnf install python3-devel qt-devel qt5-qtbase-devel qt5-qtserialport-devel
After installing the dependencies, you can continue with the compile instructions later on this page (the more detailed way..).

## OSX
To install on OS X you either need Homebrew or Macport 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.
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.

First you need to install the dependencies:
```console
brew install qt5 python3 cmake libusb doxygen
brew install git qt@5 python3 cmake libusb [email protected]
```

## Windows
Expand All @@ -127,13 +129,13 @@ We assume a 64bit Windows 10. Install the following;
- [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/downloads/#visual-studio-community-2022)
- Select 'Desktop development with C++'
- On the right, just select `MSVC v143 VS 2022 C++ x64/x86-Buildtools` and latest `Windows 10 SDK`. Everything else is not needed.
- [Win64 OpenSSL v1.1.1k](https://slproweb.com/products/Win32OpenSSL.html) ([direct link](https://slproweb.com/download/Win64OpenSSL-1_1_1k.exe))
- [Win64 OpenSSL v1.1.1w](https://slproweb.com/products/Win32OpenSSL.html) ([direct link](https://slproweb.com/download/Win64OpenSSL-1_1_1w.exe))
- [Python 3 (Windows x86-64 executable installer)](https://www.python.org/downloads/windows/) (Check: Add to PATH and Debug Symbols)
- Open a console window and execute `pip install aqtinstall`.
- Now we can download Qt to _C:\Qt_ `mkdir c:\Qt && aqt install -O c:\Qt 5.15.2 windows desktop win64_msvc2019_64`
- QT6.2 requires the [Vulkan SDK](https://vulkan.lunarg.com/sdk/home) to be installed
- [libjpeg-turbo SDK for Visual C++](https://sourceforge.net/projects/libjpeg-turbo/files/)
- Download the latest 64bit installer (currently `libjpeg-turbo-2.1.3-vc64.exe`) and install to its default location `C:\libjpeg-turbo64`.
- Download the latest 64bit installer (currently `libjpeg-turbo-3.0.1-vc64.exe`) and install to its default location `C:\libjpeg-turbo64`.

### Optional:
- For DirectX9 grabber:
Expand Down Expand Up @@ -171,7 +173,7 @@ bin/hyperiond
# webui is located on localhost:8090 or 8091
```

In case you would like to build with a dedicated Qt version, Either supply ``QTDIR`` as ``-DQTDIR=<path>`` to cmake or set and environment variable ``QTDIR`` pointing to the Qt installation.
In case you would like to build with a dedicated Qt version, Either supply ``QTDIR`` as ``-DQTDIR=<path>`` to CMake or set an environment variable ``QTDIR`` pointing to the Qt installation.

On Windows MSVC2022 set it via the CMakeSettings.json:
```posh
Expand All @@ -180,7 +182,7 @@ On Windows MSVC2022 set it via the CMakeSettings.json:
...
"environments": [
{
"QTDIR": "C:/Qt/6.2.2/msvc2019_64/"
"QTDIR": "C:/Qt/6.5.3/msvc2019_64/"
}
]
},
Expand Down
Loading

0 comments on commit 5cd21f5

Please sign in to comment.