refactor apt/dnf repo
@ -1,20 +1,25 @@
|
||||
{
|
||||
"name": "Hyperion.ng Linux",
|
||||
"extensions": [
|
||||
"twxs.cmake",
|
||||
"ms-vscode.cpptools",
|
||||
"ms-vscode.cmake-tools",
|
||||
"spmeesseman.vscode-taskexplorer",
|
||||
"yzhang.markdown-all-in-one",
|
||||
"CoenraadS.bracket-pair-colorizer",
|
||||
"vscode-icons-team.vscode-icons",
|
||||
"editorconfig.editorconfig"
|
||||
],
|
||||
"settings": {
|
||||
"editor.formatOnSave": false,
|
||||
"cmake.environment": {
|
||||
},
|
||||
},
|
||||
"customizations": {
|
||||
// Configure properties specific to VS Code.
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"twxs.cmake",
|
||||
"ms-vscode.cpptools",
|
||||
"ms-vscode.cmake-tools",
|
||||
"spmeesseman.vscode-taskexplorer",
|
||||
"yzhang.markdown-all-in-one",
|
||||
"CoenraadS.bracket-pair-colorizer",
|
||||
"vscode-icons-team.vscode-icons",
|
||||
"editorconfig.editorconfig",
|
||||
"RVSmartPorting.rpm-spec-ext"
|
||||
],
|
||||
"settings": {
|
||||
"editor.formatOnSave": false,
|
||||
"cmake.environment": { }
|
||||
}
|
||||
}
|
||||
},
|
||||
"forwardPorts": [8090, 8092],
|
||||
"postCreateCommand": "git submodule update --recursive --init && sudo apt-get update && sudo apt-get install -y git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libcec-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libssl-dev"
|
||||
"postCreateCommand": "git submodule update --recursive --init && sudo apt-get update && sudo apt-get install -y git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libcec-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libssl-dev libasound2-dev"
|
||||
}
|
||||
|
242
.github/workflows/apt.yml
vendored
@ -1,154 +1,200 @@
|
||||
name: Hyperion APT Build
|
||||
|
||||
on:
|
||||
# Reusable from nightly and push
|
||||
workflow_call:
|
||||
inputs:
|
||||
head_sha:
|
||||
type: string
|
||||
description: The branch, tag or SHA to checkout
|
||||
required: true
|
||||
secrets:
|
||||
APT_GPG:
|
||||
required: true
|
||||
APT_USER:
|
||||
required: true
|
||||
APT_PASSWORD:
|
||||
required: true
|
||||
APT_DRAFT:
|
||||
required: true
|
||||
default: "master"
|
||||
required: false
|
||||
nightly:
|
||||
type: boolean
|
||||
description: Nightly build
|
||||
default: false
|
||||
required: false
|
||||
publish:
|
||||
type: boolean
|
||||
description: Publish packages
|
||||
default: false
|
||||
required: false
|
||||
# For running the workflow manually via GitHub Actions tab
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
head_sha:
|
||||
type: string
|
||||
description: The branch, tag or SHA to checkout
|
||||
required: true
|
||||
secrets:
|
||||
APT_GPG:
|
||||
required: true
|
||||
APT_USER:
|
||||
required: true
|
||||
APT_PASSWORD:
|
||||
required: true
|
||||
APT_DRAFT:
|
||||
required: true
|
||||
default: "master"
|
||||
required: false
|
||||
nightly:
|
||||
type: boolean
|
||||
description: Nightly build
|
||||
default: false
|
||||
required: false
|
||||
publish:
|
||||
type: boolean
|
||||
description: Publish packages
|
||||
default: false
|
||||
required: false
|
||||
|
||||
env:
|
||||
ghcr: paulchen-panther # hyperion-project
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
name: Setup APT build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set APT matrix
|
||||
id: apt-ppa
|
||||
run: |
|
||||
APT=$(jq -n '.include |= [ inputs[] | select(.["exclude"] != true)]' .github/workflows/apt/*.json --compact-output)
|
||||
echo "apt=$APT" >> $GITHUB_OUTPUT
|
||||
|
||||
outputs:
|
||||
apt-matrix: ${{ steps.apt-ppa.outputs.apt }}
|
||||
|
||||
build:
|
||||
name: ${{ matrix.description }}
|
||||
needs: [setup]
|
||||
name: 🐧 ${{ matrix.os.description }} (${{ matrix.architecture[0] }})
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.setup.outputs.apt-matrix) }}
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [
|
||||
{ distribution: ubuntu, codename: focal, description: Ubuntu 20.04 (Focal Fossa), },
|
||||
{ distribution: ubuntu, codename: jammy, description: Ubuntu 22.04 (Jammy Jellyfish), },
|
||||
{ distribution: ubuntu, codename: lunar, description: Ubuntu 23.04 (Lunar Lobster), },
|
||||
{ distribution: ubuntu, codename: mantic, description: Ubuntu 23.10 (Mantic Minotaur), },
|
||||
{ distribution: debian, codename: buster, description: Debian 10.x (Buster), },
|
||||
{ distribution: debian, codename: bullseye, description: Debian 11.x (Bullseye), },
|
||||
{ distribution: debian, codename: bookworm, description: Debian 12.x (Bookworm), },
|
||||
{ distribution: debian, codename: trixie, description: Debian 13.x (Trixie), }
|
||||
]
|
||||
architecture: [
|
||||
[ amd64, linux/amd64 ],
|
||||
[ arm64, linux/arm64 ],
|
||||
[ armhf, linux/arm/v7 ]
|
||||
]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: ⬇ Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.inputs.head_sha || github.event.client_payload.head_sha }}
|
||||
submodules: true
|
||||
submodules: recursive
|
||||
|
||||
- name: Generate environment variables
|
||||
- name: 🔧 Prepare
|
||||
run: |
|
||||
tr -d '\n' < .version > temp && mv temp .version
|
||||
VERSION=$(cat .version)
|
||||
echo VERSION=${VERSION} >> $GITHUB_ENV
|
||||
if [[ $VERSION == *"-"* ]]; then
|
||||
echo STANDARDS_VERSION=$(echo ${VERSION%-*}) >> $GITHUB_ENV
|
||||
echo TARBALL_VERSION=$(echo ${VERSION%-*}) >> $GITHUB_ENV
|
||||
echo DEBIAN_FORMAT='3.0 (quilt)' >> $GITHUB_ENV
|
||||
else
|
||||
echo STANDARDS_VERSION=$(echo ${VERSION%+*}) >> $GITHUB_ENV
|
||||
echo TARBALL_VERSION=${VERSION}~$(echo ${{ matrix.distribution }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
|
||||
echo DEBIAN_FORMAT='3.0 (native)' >> $GITHUB_ENV
|
||||
fi
|
||||
echo DISTRIBUTION=$(echo ${{ matrix.distribution }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
|
||||
echo '::group::Checking the version number'
|
||||
if [[ "${{ inputs.nightly }}" = true ]]; then
|
||||
echo "$(tr -d '\n' < .version)+nightly$(date '+%Y%m%d')$(git rev-parse --short HEAD)" > .version
|
||||
else
|
||||
tr -d '\n' < .version > temp && mv temp .version
|
||||
fi
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Build package
|
||||
echo '::group::Generate environment variables'
|
||||
VERSION=$(cat .version)
|
||||
echo VERSION=${VERSION} >> $GITHUB_ENV
|
||||
if [[ $VERSION == *"-"* ]]; then
|
||||
echo STANDARDS_VERSION=$(echo ${VERSION%-*}) >> $GITHUB_ENV
|
||||
echo DEBIAN_FORMAT='3.0 (quilt)' >> $GITHUB_ENV
|
||||
else
|
||||
echo STANDARDS_VERSION=$(echo ${VERSION%+*}) >> $GITHUB_ENV
|
||||
echo DEBIAN_FORMAT='3.0 (native)' >> $GITHUB_ENV
|
||||
fi
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: 🛠️ Setup QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: 👷 Build
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p "${GITHUB_WORKSPACE}/deploy"
|
||||
docker run --rm \
|
||||
docker run --rm --platform=${{ matrix.architecture[1] }} \
|
||||
-v "${GITHUB_WORKSPACE}/deploy:/deploy" \
|
||||
-v "${GITHUB_WORKSPACE}:/source:rw" \
|
||||
ghcr.io/hyperion-project/${{ matrix.architecture }}:${{ env.DISTRIBUTION }} \
|
||||
ghcr.io/${{ env.ghcr }}/${{ matrix.os.distribution }}:${{ matrix.os.codename }} \
|
||||
/bin/bash -c "cd /source && \
|
||||
mkdir -p debian/source && echo '${{ env.DEBIAN_FORMAT }}' > debian/source/format && \
|
||||
dch --create --distribution ${{ env.DISTRIBUTION }} --package 'hyperion' -v '${{ env.VERSION }}~${{ env.DISTRIBUTION }}' '${{ github.event.commits[0].message }}' && \
|
||||
dch --create --distribution ${{ matrix.os.codename }} --package 'hyperion' -v '${{ env.VERSION }}~${{ matrix.os.codename }}' '${{ github.event.commits[0].message }}' && \
|
||||
cp -fr LICENSE debian/copyright && \
|
||||
sed 's/@BUILD_DEPENDS@/${{ matrix.build-depends }}/g; s/@DEPENDS@/${{ matrix.package-depends }}/g; s/@ARCHITECTURE@/${{ matrix.architecture }}/g; s/@STANDARDS_VERSION@/${{ env.STANDARDS_VERSION }}/g' debian/control.in > debian/control && \
|
||||
sed 's/@CMAKE_ENVIRONMENT@/${{ matrix.cmake-environment }}/g' debian/rules.in > debian/rules && \
|
||||
tar -cJf ../hyperion_${{ env.TARBALL_VERSION }}.orig.tar.xz . && \
|
||||
debuild --no-lintian -uc -us && \
|
||||
sed 's/@ARCHITECTURE@/${{ matrix.architecture[0] }}/g; s/@STANDARDS_VERSION@/${{ env.STANDARDS_VERSION }}/g' debian/control.in > debian/control && \
|
||||
debuild -b -uc -us && \
|
||||
cp ../hyperion_*.deb /deploy"
|
||||
|
||||
- name: Upload package artifact
|
||||
if: ${{ startsWith(github.event.ref, 'refs/tags') || github.event_name == 'workflow_dispatch' }}
|
||||
- name: 📦 Upload
|
||||
if: ${{ inputs.publish }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: deploy
|
||||
retention-days: 1
|
||||
|
||||
publish:
|
||||
name: Publish APT packages
|
||||
if: ${{ startsWith(github.event.ref, 'refs/tags') || github.event_name == 'workflow_dispatch' }}
|
||||
needs: [setup, build]
|
||||
name: 🚀 Publish DEB packages
|
||||
# if: ${{ github.repository == 'hyperion-project' && inputs.publish }}
|
||||
needs: [build]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: ⬇ Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.inputs.head_sha || github.event.client_payload.head_sha }}
|
||||
|
||||
- name: Import GPG key
|
||||
uses: crazy-max/ghaction-import-gpg@v6.0.0
|
||||
- name: 🔑 GPG Import
|
||||
if: ${{ env.SECRET_GPG_KEY != null }}
|
||||
uses: crazy-max/ghaction-import-gpg@v5
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.APT_GPG }}
|
||||
gpg_private_key: ${{ secrets.GPG_KEY }}
|
||||
env:
|
||||
SECRET_GPG_KEY: ${{ secrets.GPG_KEY }}
|
||||
|
||||
- name: Install reprepro
|
||||
run: sudo apt -y install reprepro
|
||||
- name: 💾 Artifact download
|
||||
uses: actions/download-artifact@v3
|
||||
|
||||
- name: Make build folders, export public GPG key and copy distributions file
|
||||
- name: 🔧 Prepare
|
||||
if: ${{ env.SECRET_APT_REPO_NIGHTLY != null && env.SECRET_APT_REPO != null }}
|
||||
run: |
|
||||
mkdir -p apt/{conf,dists,db}
|
||||
gpg --armor --output apt/hyperion.pub.key --export 'admin@hyperion-project.org'
|
||||
cp debian/distributions apt/conf/distributions
|
||||
echo '::group::Install reprepro'
|
||||
sudo apt -y install reprepro
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Create initial structure/packages files and symbolic links
|
||||
run: |
|
||||
reprepro -Vb apt createsymlinks
|
||||
reprepro -Vb apt export
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3.0.2
|
||||
|
||||
- name: Include artifacts into the package source
|
||||
run: |
|
||||
for file in artifact/hyperion_*.deb; do
|
||||
if [ -f "$file" ]; then
|
||||
dist=${file#*~}
|
||||
dist=${dist%_*}
|
||||
reprepro -Vb apt/ includedeb "$dist" "$file"
|
||||
echo '::group::Create initial structure'
|
||||
mkdir -p deb/{conf,dists,db}
|
||||
cp debian/distributions deb/conf/distributions
|
||||
if [[ "${{ inputs.nightly }}" = true ]]; then
|
||||
touch "deb/$(git rev-parse --short HEAD)"
|
||||
fi
|
||||
done
|
||||
reprepro -Vb deb createsymlinks
|
||||
reprepro -Vb deb export
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Upload packages to APT server (DRAFT)
|
||||
echo '::group::Include artifacts into the package source'
|
||||
for file in artifact/hyperion_*.deb; do
|
||||
if [ -f "$file" ]; then
|
||||
dist=${file#*~}
|
||||
dist=${dist%_*}
|
||||
reprepro -Vb deb/ includedeb "$dist" "$file"
|
||||
fi
|
||||
done
|
||||
echo '::endgroup::'
|
||||
|
||||
echo '::group::Set server directory'
|
||||
if [[ "${{ inputs.nightly }}" = true ]]; then
|
||||
echo "SERVER_DIR=${{ secrets.APT_REPO_NIGHTLY }}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "SERVER_DIR=${{ secrets.APT_REPO }}" >> $GITHUB_ENV
|
||||
fi
|
||||
echo '::endgroup::'
|
||||
env:
|
||||
SECRET_APT_REPO_NIGHTLY: ${{ secrets.APT_REPO_NIGHTLY }}
|
||||
SECRET_APT_REPO: ${{ secrets.APT_REPO }}
|
||||
|
||||
- name: 📦 Upload
|
||||
if: ${{ env.SECRET_REPO_USER != null && env.SECRET_REPO_PASSWORD != null && env.SERVER_DIR != null }}
|
||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
|
||||
with:
|
||||
server: apt.hyperion-project.org
|
||||
username: ${{ secrets.APT_USER }}
|
||||
password: ${{ secrets.APT_PASSWORD }}
|
||||
local-dir: "./apt/"
|
||||
server-dir: ${{ secrets.APT_DRAFT }}
|
||||
server: releases.hyperion-project.org
|
||||
username: ${{ secrets.REPO_USER }}
|
||||
password: ${{ secrets.REPO_PASSWORD }}
|
||||
server-dir: ${{ env.SERVER_DIR }}
|
||||
local-dir: "./deb/"
|
||||
dangerous-clean-slate: true
|
||||
env:
|
||||
SECRET_REPO_USER: ${{ secrets.REPO_USER }}
|
||||
SECRET_REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }}
|
||||
|
||||
- name: 🧹 Cleanup
|
||||
uses: geekyeggo/delete-artifact@v2
|
||||
with:
|
||||
name: artifact
|
||||
failOnError: false
|
||||
|
58
.github/workflows/apt/amd64.json
vendored
@ -1,58 +0,0 @@
|
||||
[
|
||||
{
|
||||
"distribution": "Focal",
|
||||
"architecture": "amd64",
|
||||
"build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.8, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls12, libasound2, libturbojpeg, libcec4",
|
||||
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Ubuntu 20.04 (Focal Fossa) (amd64)"
|
||||
},
|
||||
{
|
||||
"distribution": "Jammy",
|
||||
"architecture": "amd64",
|
||||
"build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.10, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls14, libasound2, libturbojpeg, libcec6",
|
||||
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Ubuntu 22.04 (Jammy Jellyfish) (amd64)"
|
||||
},
|
||||
{
|
||||
"distribution": "Kinetic",
|
||||
"architecture": "amd64",
|
||||
"build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.10, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls14, libasound2, libturbojpeg, libcec6",
|
||||
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Ubuntu 22.10 (Kinetic Kudu) (amd64)"
|
||||
},
|
||||
{
|
||||
"distribution": "Lunar",
|
||||
"architecture": "amd64",
|
||||
"build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.11, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls14, libasound2, libturbojpeg, libcec6",
|
||||
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Ubuntu 23.04 (Lunar Lobster) (amd64)"
|
||||
},
|
||||
{
|
||||
"distribution": "Buster",
|
||||
"architecture": "amd64",
|
||||
"build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.7, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls12, libasound2, libturbojpeg0, libcec4",
|
||||
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Debian 10.x (Buster) (amd64)"
|
||||
},
|
||||
{
|
||||
"distribution": "Bullseye",
|
||||
"architecture": "amd64",
|
||||
"build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls12, libasound2, libturbojpeg0, libcec6",
|
||||
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Debian 11.x (Bullseye) (amd64)"
|
||||
},
|
||||
{
|
||||
"distribution": "Bookworm",
|
||||
"architecture": "amd64",
|
||||
"build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.11, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls14, libasound2, libturbojpeg0, libcec6",
|
||||
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Debian 12.x (Bookworm) (amd64)"
|
||||
}
|
||||
]
|
51
.github/workflows/apt/arm64.json
vendored
@ -1,51 +0,0 @@
|
||||
[
|
||||
{
|
||||
"distribution": "Focal",
|
||||
"architecture": "arm64",
|
||||
"build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.8, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls12, libasound2, libturbojpeg, libcec4",
|
||||
"cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Ubuntu 20.04 (Focal Fossa) (arm64)"
|
||||
},
|
||||
{
|
||||
"distribution": "Jammy",
|
||||
"architecture": "arm64",
|
||||
"build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.10, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls14, libasound2, libturbojpeg, libcec6",
|
||||
"cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Ubuntu 22.04 (Jammy Jellyfish) (arm64)"
|
||||
},
|
||||
{
|
||||
"distribution": "Kinetic",
|
||||
"architecture": "arm64",
|
||||
"build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.10, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls14, libasound2, libturbojpeg, libcec6",
|
||||
"cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Ubuntu 22.10 (Kinetic Kudu) (arm64)"
|
||||
},
|
||||
{
|
||||
"distribution": "Buster",
|
||||
"architecture": "arm64",
|
||||
"build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libssl-dev, libraspberrypi-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.7, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls12, libasound2, libturbojpeg0, libcec4",
|
||||
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Debian 10.x (Buster) (arm64)"
|
||||
},
|
||||
{
|
||||
"distribution": "Bullseye",
|
||||
"architecture": "arm64",
|
||||
"build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libssl-dev, libraspberrypi-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls12, libasound2, libturbojpeg0, libcec6",
|
||||
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Debian 11.x (Bullseye) (arm64)"
|
||||
},
|
||||
{
|
||||
"distribution": "Bookworm",
|
||||
"architecture": "arm64",
|
||||
"build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libssl-dev, libraspberrypi-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.11, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls14, libasound2, libturbojpeg0, libcec6",
|
||||
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Debian 12.x (Bookworm) (arm64)",
|
||||
"exclude" : true
|
||||
}
|
||||
]
|
51
.github/workflows/apt/armhf.json
vendored
@ -1,51 +0,0 @@
|
||||
[
|
||||
{
|
||||
"distribution": "Focal",
|
||||
"architecture": "armhf",
|
||||
"build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.8, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls12, libasound2, libturbojpeg, libcec4",
|
||||
"cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Ubuntu 20.04 (Focal Fossa) (armhf)"
|
||||
},
|
||||
{
|
||||
"distribution": "Jammy",
|
||||
"architecture": "armhf",
|
||||
"build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.10, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls14, libasound2, libturbojpeg, libcec6",
|
||||
"cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Ubuntu 22.04 (Jammy Jellyfish) (armhf)"
|
||||
},
|
||||
{
|
||||
"distribution": "Kinetic",
|
||||
"architecture": "armhf",
|
||||
"build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libssl-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.10, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls14, libasound2, libturbojpeg, libcec6",
|
||||
"cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Ubuntu 22.10 (Kinetic Kudu) (armhf)"
|
||||
},
|
||||
{
|
||||
"distribution": "Buster",
|
||||
"architecture": "armhf",
|
||||
"build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libssl1.0-dev, libraspberrypi-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.7, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls12, libasound2, libturbojpeg0, libcec4",
|
||||
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Debian 10.x (Buster) (armhf)"
|
||||
},
|
||||
{
|
||||
"distribution": "Bullseye",
|
||||
"architecture": "armhf",
|
||||
"build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libssl-dev, libraspberrypi-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls12, libasound2, libturbojpeg0, libcec6",
|
||||
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Debian 11.x (Bullseye) (armhf)"
|
||||
},
|
||||
{
|
||||
"distribution": "Bookworm",
|
||||
"architecture": "armhf",
|
||||
"build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libssl-dev, libraspberrypi-dev, libasound2-dev, libturbojpeg0-dev, libjpeg-dev, libmbedtls-dev",
|
||||
"package-depends": "libpython3.11, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libmbedtls14, libasound2, libturbojpeg0, libcec6",
|
||||
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
|
||||
"description": "Debian 12.x (Bookworm) (armhf)",
|
||||
"exclude" : true
|
||||
}
|
||||
]
|
2
.github/workflows/cleanup.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
||||
clean:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: cleanup
|
||||
- name: 🧹 Cleanup old workflow artifacts
|
||||
uses: kolpav/purge-artifacts-action@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
19
.github/workflows/codeql.yml
vendored
@ -10,7 +10,7 @@ on:
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
name: 📊 Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
@ -23,35 +23,35 @@ jobs:
|
||||
language: [ python, javascript, cpp ]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: ⬇ Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Packages (cpp)
|
||||
- name: 📥 Install Packages (cpp)
|
||||
if: ${{ matrix.language == 'cpp' }}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install --yes git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libcec-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libasound2-dev libturbojpeg0-dev libjpeg-dev libssl-dev
|
||||
|
||||
- name: Initialize CodeQL
|
||||
- name: 🔁 Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
queries: +security-and-quality
|
||||
config-file: ./.github/config/codeql.yml
|
||||
|
||||
- name: Autobuild
|
||||
- name: 👷 Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
- name: 🏃 Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:${{ matrix.language }}"
|
||||
upload: False
|
||||
output: sarif-results
|
||||
|
||||
- name: Filter SARIF
|
||||
- name: 🆔 Filter SARIF
|
||||
uses: advanced-security/filter-sarif@v1
|
||||
with:
|
||||
patterns: |
|
||||
@ -63,11 +63,12 @@ jobs:
|
||||
input: sarif-results/${{ matrix.language }}.sarif
|
||||
output: sarif-results/${{ matrix.language }}.sarif
|
||||
|
||||
- name: Upload SARIF
|
||||
- name: 📦 Upload SARIF
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
with:
|
||||
sarif_file: sarif-results/${{ matrix.language }}.sarif
|
||||
- name: Upload loc as a Build Artifact
|
||||
|
||||
- name: 📦 Upload loc as a Build Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: sarif-results
|
||||
|
191
.github/workflows/dnf.yml
vendored
Normal file
@ -0,0 +1,191 @@
|
||||
name: Hyperion DNF Build
|
||||
|
||||
on:
|
||||
# Reusable from nightly and push
|
||||
workflow_call:
|
||||
inputs:
|
||||
head_sha:
|
||||
type: string
|
||||
description: The branch, tag or SHA to checkout
|
||||
default: "master"
|
||||
required: false
|
||||
nightly:
|
||||
type: boolean
|
||||
description: Nightly build
|
||||
default: false
|
||||
required: false
|
||||
publish:
|
||||
type: boolean
|
||||
description: Publish packages
|
||||
default: false
|
||||
required: false
|
||||
# For running the workflow manually via GitHub Actions tab
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
head_sha:
|
||||
type: string
|
||||
description: The branch, tag or SHA to checkout
|
||||
default: "master"
|
||||
required: false
|
||||
nightly:
|
||||
type: boolean
|
||||
description: Nightly build
|
||||
default: false
|
||||
required: false
|
||||
publish:
|
||||
type: boolean
|
||||
description: Publish packages
|
||||
default: false
|
||||
required: false
|
||||
|
||||
env:
|
||||
ghcr: paulchen-panther # hyperion-project
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: 🐧 ${{ matrix.os.distribution }} ${{ matrix.os.version }} (${{ matrix.architecture[0] }})
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [
|
||||
{ distribution: Fedora, version: 37 },
|
||||
{ distribution: Fedora, version: 38 },
|
||||
{ distribution: Fedora, version: 39 },
|
||||
{ distribution: Fedora, version: 40 }
|
||||
]
|
||||
architecture: [
|
||||
[ amd64, linux/amd64 ]
|
||||
# [ arm64, linux/arm64 ] temporary disabled
|
||||
]
|
||||
|
||||
steps:
|
||||
- name: ⬇ Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.inputs.head_sha || github.event.client_payload.head_sha }}
|
||||
submodules: recursive
|
||||
|
||||
- name: 🔧 Prepare
|
||||
run: |
|
||||
echo '::group::Checking the version number'
|
||||
if [[ "${{ inputs.nightly }}" = true ]]; then
|
||||
echo VERSION=$(tr -d '\n' < .version)+nightly$(date '+%Y%m%d')$(git rev-parse --short HEAD | sed s/-/_/g) >> $GITHUB_ENV
|
||||
else
|
||||
echo VERSION=$(tr -d '\n' < .version | sed s/-/_/g) >> $GITHUB_ENV
|
||||
fi
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: 🛠️ Setup QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: 👷 Build
|
||||
shell: bash
|
||||
run: |
|
||||
DISTRIBUTION=$(echo '${{ matrix.os.distribution }}' | tr '[:upper:]' '[:lower:]')
|
||||
mkdir -p "${GITHUB_WORKSPACE}/deploy"
|
||||
docker run --rm --platform=${{ matrix.architecture[1] }} \
|
||||
-w "/root" \
|
||||
-v "${GITHUB_WORKSPACE}/deploy:/deploy" \
|
||||
-v "${GITHUB_WORKSPACE}:/root/hyperion.ng:rw" \
|
||||
ghcr.io/${{ env.ghcr }}/${DISTRIBUTION}:${{ matrix.os.version }} \
|
||||
/bin/bash -c "tar -czf rpmbuild/SOURCES/hyperion.ng.tar.gz hyperion.ng/ && \
|
||||
cp -f hyperion.ng/rpmbuild/hyperion.spec.in rpmbuild/SPECS/hyperion.spec && \
|
||||
rpmbuild -ba --define '_version ${{ env.VERSION }}' rpmbuild/SPECS/hyperion.spec --clean && \
|
||||
cp -fv rpmbuild/RPMS/$(uname -m)/hyperion* /deploy"
|
||||
env:
|
||||
ACTOR: "Hyperion Project <admin@hyperion-project.org>"
|
||||
COMMIT_MESSAGE: ${{ github.event.commits[0].message }}
|
||||
|
||||
- name: 📦 Upload
|
||||
if: ${{ inputs.publish }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: deploy
|
||||
retention-days: 1
|
||||
|
||||
publish:
|
||||
name: 🚀 Publish RPM packages
|
||||
# if: ${{ github.repository == 'hyperion-project' && inputs.publish }}
|
||||
needs: [build]
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: fedora
|
||||
steps:
|
||||
- name: ⬇ Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.inputs.head_sha || github.event.client_payload.head_sha }}
|
||||
|
||||
- name: 🔑 GPG Import
|
||||
id: import_gpg
|
||||
if: ${{ env.SECRET_GPG_KEY != null }}
|
||||
uses: crazy-max/ghaction-import-gpg@v5
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_KEY }}
|
||||
env:
|
||||
SECRET_GPG_KEY: ${{ secrets.GPG_KEY }}
|
||||
|
||||
- name: 💾 Artifact download
|
||||
uses: actions/download-artifact@v3
|
||||
|
||||
- name: 🔧 Prepare
|
||||
if: ${{ env.SECRET_DNF_REPO_NIGHTLY != null && env.SECRET_DNF_REPO != null }}
|
||||
run: |
|
||||
echo '::group::Install createrepo & rpm-sign'
|
||||
dnf install createrepo rpm-sign -y
|
||||
echo '::endgroup::'
|
||||
|
||||
echo '::group::Make folders, sign/copy packages and create metadata/manifest files'
|
||||
mkdir rpm/
|
||||
gpg --armor --output hyperion.pub.key --export 'admin@hyperion-project.org'
|
||||
rpm --import hyperion.pub.key
|
||||
channel=$([ "${{ inputs.nightly }}" = true ] && echo "Nightly" || echo "Stable")
|
||||
declare -A distArray=([fc]=fedora [el]=rhel)
|
||||
for file in artifact/hyperion-*.rpm; do
|
||||
if [ -f "$file" ]; then
|
||||
dist_ver_arch=${file##*0.}
|
||||
dist_ver_arch=${dist_ver_arch%.*}
|
||||
dist_ver=${dist_ver_arch%.*}
|
||||
[ -z "${dist_ver:0:2}" ] && continue
|
||||
rpm=rpm/${distArray[${dist_ver:0:2}]}/${dist_ver:2}/${dist_ver_arch#*.}
|
||||
mkdir -p $rpm/ && cp $file $rpm/
|
||||
rpm --define "_gpg_name ${{ steps.import_gpg.outputs.keyid }}" --addsign $rpm/*.rpm
|
||||
rpm --checksig $rpm/*.rpm
|
||||
createrepo $rpm/
|
||||
gpg --yes --detach-sign --armor $rpm/repodata/repomd.xml
|
||||
sed -r "s/@CHANNEL@/${channel}/g; s/@DIST@/${distArray[${dist_ver:0:2}]}/g; s/@ARCH@/${dist_ver_arch#*.}/g" ${GITHUB_WORKSPACE}/rpmbuild/hyperion.repo.in > rpm/${distArray[${dist_ver:0:2}]}/hyperion.repo
|
||||
fi
|
||||
done
|
||||
echo '::endgroup::'
|
||||
|
||||
echo '::group::Set server directory'
|
||||
if [[ "${{ inputs.nightly }}" = true ]]; then
|
||||
echo "SERVER_DIR=${{ secrets.DNF_REPO_NIGHTLY }}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "SERVER_DIR=${{ secrets.DNF_REPO }}" >> $GITHUB_ENV
|
||||
fi
|
||||
echo '::endgroup::'
|
||||
env:
|
||||
SECRET_DNF_REPO_NIGHTLY: ${{ secrets.DNF_REPO_NIGHTLY }}
|
||||
SECRET_DNF_REPO: ${{ secrets.DNF_REPO }}
|
||||
|
||||
- name: 📦 Upload
|
||||
if: ${{ env.SECRET_REPO_USER != null && env.SECRET_REPO_PASSWORD != null && env.SERVER_DIR != null }}
|
||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
|
||||
with:
|
||||
server: releases.hyperion-project.org
|
||||
username: ${{ secrets.REPO_USER }}
|
||||
password: ${{ secrets.REPO_PASSWORD }}
|
||||
server-dir: ${{ env.SERVER_DIR }}
|
||||
local-dir: "./rpm/"
|
||||
dangerous-clean-slate: true
|
||||
env:
|
||||
SECRET_REPO_USER: ${{ secrets.REPO_USER }}
|
||||
SECRET_REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }}
|
||||
|
||||
- name: 🧹 Cleanup
|
||||
uses: geekyeggo/delete-artifact@v2
|
||||
with:
|
||||
name: artifact
|
||||
failOnError: false
|
212
.github/workflows/nightly.yml
vendored
@ -1,33 +1,37 @@
|
||||
name: Nightly build
|
||||
name: 🌑️ Nightly builds
|
||||
|
||||
# Create nightly builds at the end of every day
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
repository_dispatch:
|
||||
types: [hyperion_nightly_push]
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
update:
|
||||
name: Update Submodule rpi_ws281x
|
||||
if: github.repository_owner == 'hyperion-project'
|
||||
|
||||
###############################################
|
||||
###### rpi_ws281x submodule update check ######
|
||||
###############################################
|
||||
|
||||
update_submodule:
|
||||
name: 🔁 Update Submodule rpi_ws281x (Nightly build only)
|
||||
if: ${{ github.repository == 'hyperion-project' && inputs.nightly }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: ⬇ Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Update Submodule rpi_ws281x
|
||||
- name: 🔁 Update Submodule rpi_ws281x
|
||||
id: update
|
||||
run: git submodule update --remote --recursive dependencies/external/rpi_ws281x
|
||||
|
||||
- name: Check git status
|
||||
- name: ✅ Check git status
|
||||
id: status
|
||||
run: echo "status=$(git status -s)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Add and commit changes
|
||||
- name: ✏️ Add/Commit changes
|
||||
if: ${{ steps.status.outputs.status }}
|
||||
run: |
|
||||
git config --local user.email "20935312+Hyperion-Bot@users.noreply.github.com"
|
||||
@ -35,153 +39,73 @@ jobs:
|
||||
git config --local diff.ignoreSubmodules dirty
|
||||
git commit -am "Update submodule rpi_ws281x"
|
||||
|
||||
- name: Push changes
|
||||
if: ${{ steps.status.outputs.status }}
|
||||
- name: 📦 Push changes
|
||||
if: ${{ env.SECRET_BOT_TOKEN != null && steps.status.outputs.status }}
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.HYPERION_BOT_TOKEN }}
|
||||
branch: ${{ github.ref }}
|
||||
env:
|
||||
SECRET_BOT_TOKEN: ${{ secrets.HYPERION_BOT_TOKEN }}
|
||||
|
||||
##################################
|
||||
###### APT/DNF commit check ######
|
||||
##################################
|
||||
|
||||
check:
|
||||
name: Compare local <-> nightly
|
||||
needs: [update]
|
||||
if: github.repository_owner == 'hyperion-project'
|
||||
name: 🔀 Compare local <-> nightly (Nightly build only)
|
||||
needs: [update_submodule]
|
||||
if: ${{ github.repository == 'hyperion-project' && inputs.nightly }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check if commit has changed
|
||||
id: build-necessary
|
||||
- name: ⬇ Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: ✅ Check if commit has changed (APT)
|
||||
id: apt-build-necessary
|
||||
run: |
|
||||
if wget --spider "https://nightly.apt.hyperion-project.org/$(git rev-parse --short HEAD)" 2>/dev/null; then
|
||||
if wget --spider "https://nightly.apt.releases.hyperion-project.org//$(git rev-parse --short HEAD)" 2>/dev/null; then
|
||||
echo "commit-has-changed=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "commit-has-changed=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: ✅ Check if commit has changed (DNF)
|
||||
id: dnf-build-necessary
|
||||
run: |
|
||||
if wget --spider "https://nightly.dnf.releases.hyperion-project.org/$(git rev-parse --short HEAD)" 2>/dev/null; then
|
||||
echo "commit-has-changed=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "commit-has-changed=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
outputs:
|
||||
build-nightly: ${{ steps.build-necessary.outputs.commit-has-changed }}
|
||||
build-apt-nightly: ${{ steps.apt-build-necessary.outputs.commit-has-changed }}
|
||||
build-dnf-nightly: ${{ steps.dnf-build-necessary.outputs.commit-has-changed }}
|
||||
|
||||
setup:
|
||||
name: Setup nightly build
|
||||
###################################
|
||||
###### APT reusable workflow ######
|
||||
###################################
|
||||
|
||||
apt_build:
|
||||
name: 👷 APT Build
|
||||
needs: [check]
|
||||
if: ${{ needs.check.outputs.build-nightly == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set nightly matrix
|
||||
id: nightly-ppa
|
||||
run: |
|
||||
NIGHTLY=$(jq -n '.include |= [ inputs[] | select(.["exclude"] != true)]' .github/workflows/apt/*.json --compact-output)
|
||||
echo "nightly=$NIGHTLY" >> $GITHUB_OUTPUT
|
||||
if: ${{ needs.check.outputs.build-apt-nightly == 'true' }}
|
||||
uses: ./.github/workflows/apt.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
nightly: true
|
||||
publish: true
|
||||
|
||||
outputs:
|
||||
nightly-matrix: ${{ steps.nightly-ppa.outputs.nightly }}
|
||||
###################################
|
||||
###### DNF reusable workflow ######
|
||||
###################################
|
||||
|
||||
build:
|
||||
name: ${{ matrix.description }}
|
||||
needs: [setup]
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.setup.outputs.nightly-matrix) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Generate environment variables
|
||||
run: |
|
||||
echo "$(tr -d '\n' < .version)+nightly$(date '+%Y%m%d')$(git rev-parse --short HEAD)" > .version
|
||||
VERSION=$(cat .version)
|
||||
echo VERSION=${VERSION} >> $GITHUB_ENV
|
||||
if [[ $VERSION == *"-"* ]]; then
|
||||
echo STANDARDS_VERSION=$(echo ${VERSION%-*}) >> $GITHUB_ENV
|
||||
echo TARBALL_VERSION=$(echo ${VERSION%-*}) >> $GITHUB_ENV
|
||||
echo DEBIAN_FORMAT='3.0 (quilt)' >> $GITHUB_ENV
|
||||
else
|
||||
echo STANDARDS_VERSION=$(echo ${VERSION%+*}) >> $GITHUB_ENV
|
||||
echo TARBALL_VERSION=${VERSION}~$(echo ${{ matrix.distribution }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
|
||||
echo DEBIAN_FORMAT='3.0 (native)' >> $GITHUB_ENV
|
||||
fi
|
||||
echo DISTRIBUTION=$(echo ${{ matrix.distribution }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
|
||||
|
||||
- name: Build package
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p "${GITHUB_WORKSPACE}/deploy"
|
||||
docker run --rm \
|
||||
-v "${GITHUB_WORKSPACE}/deploy:/deploy" \
|
||||
-v "${GITHUB_WORKSPACE}:/source:rw" \
|
||||
ghcr.io/hyperion-project/${{ matrix.architecture }}:${{ env.DISTRIBUTION }} \
|
||||
/bin/bash -c "cd /source && \
|
||||
mkdir -p debian/source && echo '${{ env.DEBIAN_FORMAT }}' > debian/source/format && \
|
||||
dch --create --distribution ${{ env.DISTRIBUTION }} --package 'hyperion' -v '${{ env.VERSION }}~${{ env.DISTRIBUTION }}' '${{ github.event.commits[0].message }}' && \
|
||||
cp -fr LICENSE debian/copyright && \
|
||||
sed 's/@BUILD_DEPENDS@/${{ matrix.build-depends }}/g; s/@DEPENDS@/${{ matrix.package-depends }}/g; s/@ARCHITECTURE@/${{ matrix.architecture }}/g; s/@STANDARDS_VERSION@/${{ env.STANDARDS_VERSION }}/g' debian/control.in > debian/control && \
|
||||
sed 's/@CMAKE_ENVIRONMENT@/${{ matrix.cmake-environment }}/g' debian/rules.in > debian/rules && \
|
||||
tar -cJf ../hyperion_${{ env.TARBALL_VERSION }}.orig.tar.xz . && \
|
||||
debuild --no-lintian -uc -us && \
|
||||
cp ../hyperion_*.deb /deploy"
|
||||
|
||||
- name: Upload package artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: deploy
|
||||
retention-days: 1
|
||||
|
||||
publish:
|
||||
name: Publish nightly packages
|
||||
needs: [setup, build]
|
||||
if: github.repository_owner == 'hyperion-project'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Import GPG key
|
||||
uses: crazy-max/ghaction-import-gpg@v6.0.0
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.APT_GPG }}
|
||||
|
||||
- name: Install reprepro
|
||||
run: sudo apt -y install reprepro
|
||||
|
||||
- name: Make build folders, export public GPG key, copy distributions file and create short sha file for nightly build check
|
||||
run: |
|
||||
mkdir -p nightly/{conf,dists,db}
|
||||
gpg --armor --output nightly/hyperion.pub.key --export 'admin@hyperion-project.org'
|
||||
cp debian/distributions nightly/conf/distributions
|
||||
touch "nightly/$(git rev-parse --short HEAD)"
|
||||
|
||||
- name: Create initial structure/packages files and symbolic links
|
||||
run: |
|
||||
reprepro -Vb nightly createsymlinks
|
||||
reprepro -Vb nightly export
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3.0.2
|
||||
|
||||
- name: Include artifacts into the package source
|
||||
run: |
|
||||
for file in artifact/*.deb; do
|
||||
if [ -f "$file" ]; then
|
||||
dist=${file#*~}
|
||||
dist=${dist%_*}
|
||||
reprepro -Vb nightly/ includedeb "$dist" "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Upload packages to nightly server
|
||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
|
||||
with:
|
||||
server: nightly.apt.hyperion-project.org
|
||||
username: ${{ secrets.NIGHTLY_USER }}
|
||||
password: ${{ secrets.NIGHTLY_PASSWORD }}
|
||||
local-dir: "./nightly/"
|
||||
server-dir: "./"
|
||||
dangerous-clean-slate: true
|
||||
|
||||
- name: Remove intermediate artifacts
|
||||
uses: geekyeggo/delete-artifact@v2
|
||||
with:
|
||||
name: artifact
|
||||
failOnError: false
|
||||
dnf_build:
|
||||
name: 👷 DNF Build
|
||||
needs: [check]
|
||||
if: ${{ needs.check.outputs.build-dnf-nightly == 'true' }}
|
||||
uses: ./.github/workflows/dnf.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
nightly: true
|
||||
publish: true
|
||||
|
162
.github/workflows/pull-request.yml
vendored
@ -4,6 +4,11 @@ on:
|
||||
branches:
|
||||
- master
|
||||
|
||||
# Cancel running actions when a new action on the same PR is started
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
######################
|
||||
@ -11,57 +16,63 @@ jobs:
|
||||
######################
|
||||
|
||||
Linux:
|
||||
name: ${{ matrix.dockerName }}
|
||||
name: 🐧 ${{ matrix.dockerName }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
dockerImage: [ x86_64, armv6l, armv7l, aarch64 ]
|
||||
include:
|
||||
- dockerImage: x86_64
|
||||
dockerName: Debian Buster (x86_64)
|
||||
dockerName: Debian Buster (x86_64)
|
||||
platform: x11
|
||||
- dockerImage: armv6l
|
||||
dockerName: Debian Buster (Raspberry Pi v1 & ZERO)
|
||||
dockerName: Debian Buster (Raspberry Pi v1 & ZERO)
|
||||
platform: rpi
|
||||
- dockerImage: armv7l
|
||||
dockerName: Debian Buster (Raspberry Pi 2 & 3)
|
||||
dockerName: Debian Buster (Raspberry Pi 2 & 3)
|
||||
platform: rpi
|
||||
- dockerImage: aarch64
|
||||
dockerName: Debian Buster (Generic AARCH64)
|
||||
dockerName: Debian Buster (Generic AARCH64)
|
||||
platform: amlogic
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: ⬇ Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: recursive
|
||||
|
||||
# Append PR number to .version
|
||||
- name: Append PR number to version
|
||||
- name: 🔧 Prepare
|
||||
shell: bash
|
||||
run: |
|
||||
tr -d '\n' < .version > temp && mv temp .version
|
||||
echo -n "+PR${{ github.event.pull_request.number }}" >> .version
|
||||
echo '::group::Append PR number to version'
|
||||
tr -d '\n' < .version > temp && mv temp .version
|
||||
echo -n "+PR${{ github.event.pull_request.number }}" >> .version
|
||||
echo '::endgroup::'
|
||||
|
||||
# Build packages
|
||||
- name: Build packages
|
||||
- name: 👷 Build
|
||||
env:
|
||||
DOCKER_IMAGE: ${{ matrix.dockerImage }}
|
||||
DOCKER_TAG: buster
|
||||
DOCKER_TAG: buster
|
||||
DOCKER_NAME: ${{ matrix.dockerName }}
|
||||
PLATFORM: ${{ matrix.platform }}
|
||||
shell: bash
|
||||
run: ./.ci/ci_build.sh
|
||||
|
||||
# Collecting deployable artifacts
|
||||
- name: Collecting deployable artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ${{ matrix.dockerImage }}
|
||||
mv deploy/*.tar.gz ${{ matrix.dockerImage }}
|
||||
echo '::group::Build packages'
|
||||
./.ci/ci_build.sh
|
||||
echo '::endgroup::'
|
||||
|
||||
# Upload artifacts
|
||||
- name: Upload artifacts
|
||||
echo '::group::Collecting deployable artifacts'
|
||||
mkdir -p ${{ matrix.dockerImage }}
|
||||
mv deploy/*.tar.gz ${{ matrix.dockerImage }}
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: 📦 Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.dockerImage }}
|
||||
@ -72,42 +83,42 @@ jobs:
|
||||
######################
|
||||
|
||||
macOS:
|
||||
name: macOS
|
||||
name: 🍏 macOS
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: ⬇ Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: recursive
|
||||
|
||||
# Append PR number to .version
|
||||
- name: Append PR number to version
|
||||
- name: 🔧 Prepare
|
||||
shell: bash
|
||||
run: |
|
||||
tr -d '\n' < .version > temp && mv temp .version
|
||||
echo -n "+PR${{ github.event.pull_request.number }}" >> .version
|
||||
echo '::group::Append PR number to version'
|
||||
tr -d '\n' < .version > temp && mv temp .version
|
||||
echo -n "+PR${{ github.event.pull_request.number }}" >> .version
|
||||
echo '::endgroup::'
|
||||
|
||||
# Install dependencies
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: ./.ci/ci_install.sh
|
||||
echo '::group::Install dependencies'
|
||||
./.ci/ci_install.sh
|
||||
echo '::endgroup::'
|
||||
|
||||
# Build packages
|
||||
- name: Build packages
|
||||
- name: 👷 Build
|
||||
env:
|
||||
PLATFORM: osx
|
||||
shell: bash
|
||||
run: ./.ci/ci_build.sh
|
||||
|
||||
# Collecting deployable artifacts
|
||||
- name: Collecting deployable artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p macOS
|
||||
mv build/*.dmg macOS
|
||||
echo '::group::Build packages'
|
||||
./.ci/ci_build.sh
|
||||
echo '::endgroup::'
|
||||
|
||||
# Upload artifacts
|
||||
- name: Upload artifacts
|
||||
echo '::group::Collecting deployable artifacts'
|
||||
mkdir -p macOS
|
||||
mv build/*.dmg macOS
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: 📦 Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macOS
|
||||
@ -118,25 +129,41 @@ jobs:
|
||||
######################
|
||||
|
||||
windows:
|
||||
name: Windows
|
||||
name: 🪟 Windows
|
||||
runs-on: windows-2022
|
||||
env:
|
||||
VCINSTALLDIR: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC'
|
||||
QT_VERSION: 5.15.2
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: ⬇ Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: recursive
|
||||
|
||||
# Append PR number to .version
|
||||
- name: Append PR number to version
|
||||
- name: 🔧 Prepare
|
||||
shell: bash
|
||||
run: |
|
||||
tr -d '\n' < .version > temp && mv temp .version
|
||||
echo -n "+PR${{ github.event.pull_request.number }}" >> .version
|
||||
echo '::group::Append PR number to version'
|
||||
tr -d '\n' < .version > temp && mv temp .version
|
||||
echo -n "+PR${{ github.event.pull_request.number }}" >> .version
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Install Qt
|
||||
- name: 💾 Cache/Restore
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
|
||||
key: ${{ runner.os }}-chocolatey
|
||||
|
||||
- name: 📥 Install OpenSSL, DirectX SDK, libjpeg-turbo
|
||||
shell: powershell
|
||||
run: |
|
||||
choco install --no-progress openssl --version=1.1.1.2100 -y
|
||||
choco install --no-progress directx-sdk -y
|
||||
Invoke-WebRequest https://netcologne.dl.sourceforge.net/project/libjpeg-turbo/2.0.6/libjpeg-turbo-2.0.6-vc64.exe -OutFile libjpeg-turbo.exe -UserAgent NativeHost
|
||||
.\libjpeg-turbo /S
|
||||
|
||||
- name: 📥 Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: ${{env.QT_VERSION}}
|
||||
@ -145,48 +172,25 @@ jobs:
|
||||
cache: 'true'
|
||||
cache-key-prefix: 'cache-qt-windows'
|
||||
|
||||
- name: Cache Chocolatey downloads
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
|
||||
key: ${{ runner.os }}-chocolatey
|
||||
|
||||
# - name: Install Python
|
||||
# shell: powershell
|
||||
# run: |
|
||||
# choco install --no-progress python -y
|
||||
|
||||
- name: Install OpenSSL, DirectX SDK
|
||||
shell: powershell
|
||||
run: |
|
||||
choco install --no-progress openssl --version=1.1.1.2100 -y
|
||||
choco install --no-progress directx-sdk -y
|
||||
|
||||
- name: Install libjpeg-turbo
|
||||
run: |
|
||||
Invoke-WebRequest https://netcologne.dl.sourceforge.net/project/libjpeg-turbo/2.0.6/libjpeg-turbo-2.0.6-vc64.exe -OutFile libjpeg-turbo.exe -UserAgent NativeHost
|
||||
.\libjpeg-turbo /S
|
||||
|
||||
- name: Set up x64 build architecture environment
|
||||
- name: 🛠️ Setup MSVC
|
||||
shell: cmd
|
||||
run: call "${{env.VCINSTALLDIR}}\Auxiliary\Build\vcvars64.bat"
|
||||
|
||||
# Build packages
|
||||
- name: Build packages
|
||||
- name: 👷 Build
|
||||
env:
|
||||
PLATFORM: windows
|
||||
shell: bash
|
||||
run: ./.ci/ci_build.sh
|
||||
|
||||
# Collecting deployable artifacts
|
||||
- name: Collecting deployable artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p windows
|
||||
mv build/*.exe windows
|
||||
echo '::group::Build packages'
|
||||
./.ci/ci_build.sh
|
||||
echo '::endgroup::'
|
||||
|
||||
# Upload artifacts
|
||||
- name: Upload artifacts
|
||||
echo '::group::Collecting deployable artifacts'
|
||||
mkdir -p windows
|
||||
mv build/*.exe windows
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: 📦 Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: windows
|
||||
|
201
.github/workflows/push-master.yml
vendored
@ -1,201 +0,0 @@
|
||||
name: Hyperion CI Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
|
||||
###################
|
||||
###### Linux ######
|
||||
###################
|
||||
|
||||
Linux:
|
||||
name: ${{ matrix.dockerName }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
dockerImage: [ x86_64, armv6l, armv7l, aarch64 ]
|
||||
include:
|
||||
- dockerImage: x86_64
|
||||
dockerName: Debian Buster (x86_64)
|
||||
platform: x11
|
||||
- dockerImage: armv6l
|
||||
dockerName: Debian Buster (Raspberry Pi v1 & ZERO)
|
||||
platform: rpi
|
||||
- dockerImage: armv7l
|
||||
dockerName: Debian Buster (Raspberry Pi 2 & 3)
|
||||
platform: rpi
|
||||
- dockerImage: aarch64
|
||||
dockerName: Debian Buster (Generic AARCH64)
|
||||
platform: amlogic
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
# Build process
|
||||
- name: Build packages
|
||||
env:
|
||||
DOCKER_IMAGE: ${{ matrix.dockerImage }}
|
||||
DOCKER_TAG: buster
|
||||
DOCKER_NAME: ${{ matrix.dockerName }}
|
||||
PLATFORM: ${{ matrix.platform }}
|
||||
shell: bash
|
||||
run: ./.ci/ci_build.sh
|
||||
|
||||
# Upload artifacts (only on tagged commit)
|
||||
- name: Upload artifacts
|
||||
if: startsWith(github.event.ref, 'refs/tags')
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: deploy/Hyperion-*
|
||||
|
||||
###################
|
||||
###### macOS ######
|
||||
###################
|
||||
|
||||
macOS:
|
||||
name: macOS
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
# Install dependencies
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: ./.ci/ci_install.sh
|
||||
|
||||
# Build process
|
||||
- name: Build packages
|
||||
env:
|
||||
PLATFORM: osx
|
||||
shell: bash
|
||||
run: ./.ci/ci_build.sh
|
||||
|
||||
# Upload artifacts (only on tagged commit)
|
||||
- name: Upload artifacts
|
||||
if: startsWith(github.event.ref, 'refs/tags')
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: build/Hyperion-*
|
||||
|
||||
#####################
|
||||
###### Windows ######
|
||||
#####################
|
||||
|
||||
windows:
|
||||
name: Windows
|
||||
runs-on: windows-2022
|
||||
env:
|
||||
VCINSTALLDIR: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC'
|
||||
QT_VERSION: 5.15.2
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: ${{env.QT_VERSION}}
|
||||
target: 'desktop'
|
||||
arch: 'win64_msvc2019_64'
|
||||
cache: 'true'
|
||||
cache-key-prefix: 'cache-qt-windows'
|
||||
|
||||
- name: Cache Chocolatey downloads
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
|
||||
key: ${{ runner.os }}-chocolatey
|
||||
|
||||
# - name: Install Python
|
||||
# shell: powershell
|
||||
# run: |
|
||||
# choco install --no-progress python -y
|
||||
|
||||
- name: Install OpenSSL, DirectX SDK
|
||||
shell: powershell
|
||||
run: |
|
||||
choco install --no-progress openssl --version=1.1.1.2100 -y
|
||||
choco install --no-progress directx-sdk -y
|
||||
|
||||
- name: Install libjpeg-turbo
|
||||
run: |
|
||||
Invoke-WebRequest https://netcologne.dl.sourceforge.net/project/libjpeg-turbo/2.0.6/libjpeg-turbo-2.0.6-vc64.exe -OutFile libjpeg-turbo.exe -UserAgent NativeHost
|
||||
.\libjpeg-turbo /S
|
||||
|
||||
- name: Set up x64 build architecture environment
|
||||
shell: cmd
|
||||
run: call "${{env.VCINSTALLDIR}}\Auxiliary\Build\vcvars64.bat"
|
||||
|
||||
# Build packages
|
||||
- name: Build packages
|
||||
env:
|
||||
PLATFORM: windows
|
||||
shell: bash
|
||||
run: ./.ci/ci_build.sh
|
||||
|
||||
# Upload artifacts (only on tagged commit)
|
||||
- name: Upload artifacts
|
||||
if: startsWith(github.event.ref, 'refs/tags')
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: build/Hyperion-*
|
||||
retention-days: 1
|
||||
|
||||
#####################################
|
||||
###### Publish GitHub Releases ######
|
||||
#####################################
|
||||
|
||||
github_publish:
|
||||
name: Publish GitHub Releases
|
||||
if: startsWith(github.event.ref, 'refs/tags')
|
||||
needs: [Linux, macOS, windows]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Generate environment variables
|
||||
- name: Generate environment variables from .version and tag
|
||||
run: |
|
||||
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
||||
echo "VERSION=$(tr -d '\n' < .version)" >> $GITHUB_ENV
|
||||
|
||||
# Download artifacts from previous build process
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3.0.2
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
# Create draft release and upload artifacts
|
||||
- name: Create draft release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: Hyperion ${{ env.VERSION }}
|
||||
tag_name: ${{ env.TAG }}
|
||||
files: "artifacts/**"
|
||||
draft: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
##########################
|
||||
###### APT workflow ######
|
||||
##########################
|
||||
|
||||
apt_build:
|
||||
name: APT Build GitHub Releases
|
||||
if: startsWith(github.event.ref, 'refs/tags')
|
||||
needs: [Linux, macOS, windows]
|
||||
uses: ./.github/workflows/apt.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
head_sha: master
|
208
.github/workflows/push.yml
vendored
Normal file
@ -0,0 +1,208 @@
|
||||
name: Hyperion CI Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
|
||||
###################
|
||||
###### Linux ######
|
||||
###################
|
||||
|
||||
# Linux:
|
||||
# name: 🐧 ${{ matrix.dockerName }}
|
||||
# runs-on: ubuntu-latest
|
||||
# strategy:
|
||||
# matrix:
|
||||
# dockerImage: [ x86_64, armv6l, armv7l, aarch64 ]
|
||||
# include:
|
||||
# - dockerImage: x86_64
|
||||
# dockerName: Debian Buster (x86_64)
|
||||
# platform: x11
|
||||
# - dockerImage: armv6l
|
||||
# dockerName: Debian Buster (Raspberry Pi v1 & ZERO)
|
||||
# platform: rpi
|
||||
# - dockerImage: armv7l
|
||||
# dockerName: Debian Buster (Raspberry Pi 2 & 3)
|
||||
# platform: rpi
|
||||
# - dockerImage: aarch64
|
||||
# dockerName: Debian Buster (Generic AARCH64)
|
||||
# platform: amlogic
|
||||
|
||||
# steps:
|
||||
# - name: ⬇ Checkout
|
||||
# uses: actions/checkout@v4
|
||||
# with:
|
||||
# submodules: recursive
|
||||
|
||||
# - name: 👷 Build
|
||||
# env:
|
||||
# DOCKER_IMAGE: ${{ matrix.dockerImage }}
|
||||
# DOCKER_TAG: buster
|
||||
# DOCKER_NAME: ${{ matrix.dockerName }}
|
||||
# PLATFORM: ${{ matrix.platform }}
|
||||
# shell: bash
|
||||
# run: ./.ci/ci_build.sh
|
||||
|
||||
# - name: 📦 Upload
|
||||
# if: startsWith(github.event.ref, 'refs/tags')
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# path: deploy/Hyperion-*
|
||||
|
||||
# ###################
|
||||
# ###### macOS ######
|
||||
# ###################
|
||||
|
||||
# macOS:
|
||||
# name: 🍏 macOS
|
||||
# runs-on: macos-latest
|
||||
# steps:
|
||||
# - name: ⬇ Checkout
|
||||
# uses: actions/checkout@v4
|
||||
# with:
|
||||
# submodules: recursive
|
||||
|
||||
# - name: 🔧 Prepare
|
||||
# shell: bash
|
||||
# run: |
|
||||
# echo '::group::Install dependencies'
|
||||
# ./.ci/ci_install.sh
|
||||
# echo '::endgroup::'
|
||||
|
||||
# - name: 👷 Build
|
||||
# env:
|
||||
# PLATFORM: osx
|
||||
# shell: bash
|
||||
# run: ./.ci/ci_build.sh
|
||||
|
||||
# - name: 📦 Upload
|
||||
# if: startsWith(github.event.ref, 'refs/tags')
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# path: build/Hyperion-*
|
||||
|
||||
# #####################
|
||||
# ###### Windows ######
|
||||
# #####################
|
||||
|
||||
# windows:
|
||||
# name: 🪟 Windows
|
||||
# runs-on: windows-2022
|
||||
# env:
|
||||
# VCINSTALLDIR: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC'
|
||||
# QT_VERSION: 5.15.2
|
||||
# steps:
|
||||
# - name: ⬇ Checkout
|
||||
# uses: actions/checkout@v4
|
||||
# with:
|
||||
# submodules: recursive
|
||||
|
||||
# - name: 💾 Cache/Restore
|
||||
# uses: actions/cache@v3
|
||||
# with:
|
||||
# path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
|
||||
# key: ${{ runner.os }}-chocolatey
|
||||
|
||||
# - name: 📥 Install OpenSSL, DirectX SDK, libjpeg-turbo
|
||||
# shell: powershell
|
||||
# run: |
|
||||
# choco install --no-progress openssl --version=1.1.1.2100 -y
|
||||
# choco install --no-progress directx-sdk -y
|
||||
# Invoke-WebRequest https://netcologne.dl.sourceforge.net/project/libjpeg-turbo/2.0.6/libjpeg-turbo-2.0.6-vc64.exe -OutFile libjpeg-turbo.exe -UserAgent NativeHost
|
||||
# .\libjpeg-turbo /S
|
||||
|
||||
# - name: 📥 Install Qt
|
||||
# uses: jurplel/install-qt-action@v3
|
||||
# with:
|
||||
# version: ${{env.QT_VERSION}}
|
||||
# target: 'desktop'
|
||||
# arch: 'win64_msvc2019_64'
|
||||
# cache: 'true'
|
||||
# cache-key-prefix: 'cache-qt-windows'
|
||||
|
||||
# - name: 🛠️ Setup
|
||||
# shell: cmd
|
||||
# run: call "${{env.VCINSTALLDIR}}\Auxiliary\Build\vcvars64.bat"
|
||||
|
||||
# - name: 👷 Build
|
||||
# env:
|
||||
# PLATFORM: windows
|
||||
# shell: bash
|
||||
# run: |
|
||||
# echo '::group::Build packages'
|
||||
# ./.ci/ci_build.sh
|
||||
# echo '::endgroup::'
|
||||
|
||||
# - name: 📦 Upload
|
||||
# if: startsWith(github.event.ref, 'refs/tags')
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# path: build/Hyperion-*
|
||||
# retention-days: 1
|
||||
|
||||
# #####################################
|
||||
# ###### Publish GitHub Releases ######
|
||||
# #####################################
|
||||
|
||||
# github_publish:
|
||||
# name: 🚀 Publish GitHub Releases
|
||||
# if: startsWith(github.event.ref, 'refs/tags')
|
||||
# needs: [Linux, macOS, windows]
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: ⬇ Checkout
|
||||
# uses: actions/checkout@v4
|
||||
|
||||
# - name: 🔧 Prepare
|
||||
# run: |
|
||||
# echo '::group::Generate environment variables from .version and tag'
|
||||
# echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
||||
# echo "VERSION=$(tr -d '\n' < .version)" >> $GITHUB_ENV
|
||||
# echo '::endgroup::'
|
||||
|
||||
# - name: 💾 Artifact download
|
||||
# uses: actions/download-artifact@v3.0.2
|
||||
# with:
|
||||
# path: artifacts
|
||||
|
||||
# - name: 📦 Upload
|
||||
# uses: softprops/action-gh-release@v1
|
||||
# with:
|
||||
# name: Hyperion ${{ env.VERSION }}
|
||||
# tag_name: ${{ env.TAG }}
|
||||
# files: "artifacts/**"
|
||||
# draft: true
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
###################################
|
||||
###### APT reusable workflow ######
|
||||
###################################
|
||||
|
||||
apt_build:
|
||||
name: APT Build
|
||||
# if: startsWith(github.event.ref, 'refs/tags')
|
||||
# needs: [Linux, macOS, windows]
|
||||
uses: ./.github/workflows/apt.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
nightly: false
|
||||
publish: true
|
||||
|
||||
###################################
|
||||
###### DNF reusable workflow ######
|
||||
###################################
|
||||
|
||||
dnf_build:
|
||||
name: DNF Build
|
||||
# if: startsWith(github.event.ref, 'refs/tags')
|
||||
# needs: [Linux, macOS, windows]
|
||||
uses: ./.github/workflows/dnf.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
nightly: false
|
||||
publish: true
|
34
.github/workflows/release.yml
vendored
@ -1,18 +1,48 @@
|
||||
name: Release Actions
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
|
||||
hyperbian:
|
||||
name: Let HyperBian create
|
||||
name: 🚀 Let HyperBian create
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Dispatch event to build new HyperBian image
|
||||
- name: Dispatch HyperBian build
|
||||
- name: 📲 Dispatch HyperBian build
|
||||
uses: peter-evans/repository-dispatch@v2.1.2
|
||||
if: ${{ github.repository_owner == 'hyperion-project'}}
|
||||
with:
|
||||
repository: hyperion-project/HyperBian
|
||||
token: ${{ secrets.HYPERION_BOT_TOKEN }}
|
||||
event-type: hyperion_push
|
||||
|
||||
|
||||
# TODO FOR APT/DNF:
|
||||
|
||||
# dnf_release:
|
||||
# name: Release DNF repository
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Create Backup and Release draft files on DNF repository
|
||||
# run: |
|
||||
# sudo apt-get install -y ncftp
|
||||
# mkdir backup draft_folder
|
||||
# ncftpget -R -T -V -u ${{ secrets.YUM_USER }} -p ${{ secrets.YUM_PASSWORD }} yum.hyperion-project.org ./backup/ ./
|
||||
# cd backup/ && mv ${{ secrets.DRAFT_FOLDER }}* ../draft_folder/ && rm -f backup.tar.gz
|
||||
# tar -zcf ../backup.tar.gz .
|
||||
# find -maxdepth 1 $(printf "! -name %s " ${{ secrets.EXCLUDED_FTP_FILES }})
|
||||
# find -maxdepth 1 $(printf "! -name %s " ${{ secrets.EXCLUDED_FTP_FILES }}) -exec rm -rf {} \;
|
||||
# mv ../draft_folder/* . && mv ../backup.tar.gz .
|
||||
|
||||
# - name: Update DNF Package Repository (Release)
|
||||
# uses: SamKirkland/FTP-Deploy-Action@4.3.3
|
||||
# with:
|
||||
# server: yum.hyperion-project.org
|
||||
# username: ${{ secrets.YUM_USER }}
|
||||
# password: ${{ secrets.YUM_PASSWORD }}
|
||||
# local-dir: "./backup/"
|
||||
# server-dir: ./
|
||||
# dangerous-clean-slate: true
|
||||
|
@ -164,11 +164,14 @@ MACRO(FIRSTSUBDIR result curdir)
|
||||
ENDMACRO()
|
||||
|
||||
if ( "${PLATFORM}" MATCHES "osx" )
|
||||
# specify the min version of the target platform
|
||||
SET ( CMAKE_OSX_DEPLOYMENT_TARGET "10.15" )
|
||||
# specify the min version of the target platform (only GitHub Actions)
|
||||
if( DEFINED ENV{GITHUB_ACTIONS} AND DEFINED ENV{GITHUB_WORKSPACE} )
|
||||
SET ( CMAKE_OSX_DEPLOYMENT_TARGET "10.15" )
|
||||
endif()
|
||||
|
||||
# add specific prefix paths
|
||||
FIRSTSUBDIR(SUBDIRPY "/usr/local/opt/python3/Frameworks/Python.framework/Versions")
|
||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${SUBDIRPY})
|
||||
SET ( CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${SUBDIRPY} )
|
||||
|
||||
include_directories("/opt/X11/include/")
|
||||
SET ( DEFAULT_OSX ON )
|
||||
@ -477,15 +480,10 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
# Search for DirectX9
|
||||
if (ENABLE_DX)
|
||||
find_package(DirectX9 REQUIRED)
|
||||
endif(ENABLE_DX)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
# Use GNU gold linker if available
|
||||
if (NOT WIN32 AND NOT APPLE)
|
||||
include (${CMAKE_CURRENT_SOURCE_DIR}/cmake/LDGold.cmake)
|
||||
endif()
|
||||
|
||||
# Don't create new dynamic tags (RUNPATH) and setup -rpath to search for shared libs in BINARY/../lib folder (only for Unix)
|
||||
if (ENABLE_DEPLOY_DEPENDENCIES AND UNIX AND NOT APPLE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--disable-new-dtags")
|
||||
|
@ -1,5 +1,5 @@
|
||||
[Unit]
|
||||
Description=Hyperion ambient light systemd service for user %i
|
||||
Description=Hyperion ambient light systemd service for user %i
|
||||
Documentation=https://docs.hyperion-project.org
|
||||
Requisite=network.target
|
||||
Wants=network-online.target
|
||||
|
22
bin/service/hyperion.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<service>
|
||||
<short>Hyperion</short>
|
||||
<description>Hyperion.NG firewall rules</description>
|
||||
|
||||
<!-- HTTP -->
|
||||
<port protocol="tcp" port="8090"/>
|
||||
<!-- HTTPS -->
|
||||
<port protocol="tcp" port="8892"/>
|
||||
<!-- JSON Server -->
|
||||
<port protocol="tcp" port="19444"/>
|
||||
<!-- Flatbuffers Server -->
|
||||
<port protocol="tcp" port="19400"/>
|
||||
<!-- Protocol Buffers Server -->
|
||||
<port protocol="tcp" port="19445"/>
|
||||
<!-- Boblight Server -->
|
||||
<port protocol="tcp" port="19333"/>
|
||||
|
||||
<include service="ssdp"/>
|
||||
<include service="mdns"/>
|
||||
|
||||
</service>
|
@ -1,17 +0,0 @@
|
||||
option(ENABLE_LDGOLD "Use GNU gold linker" ON)
|
||||
|
||||
set(LDGOLD_FOUND FALSE)
|
||||
if(ENABLE_LDGOLD)
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
|
||||
if(LD_VERSION MATCHES "GNU gold")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
set(LDGOLD_FOUND TRUE)
|
||||
message(STATUS "Linker: GNU gold")
|
||||
else()
|
||||
message(STATUS "GNU gold linker is not available, falling back to default system linker")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Linker: Default system linker")
|
||||
endif()
|
@ -1,8 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=Hyperion
|
||||
GenericName=Hyperion Ambient Lighting
|
||||
Comment=Hyperion mimics the well known Ambilight from Philips
|
||||
Icon=/usr/share/pixmaps/hyperion/hyperiond_128.png
|
||||
Comment=Hyperion is an opensource Bias or Ambient Lighting implementation
|
||||
Icon=hyperion
|
||||
Terminal=false
|
||||
TryExec=hyperiond
|
||||
Exec=hyperiond
|
59
cmake/desktop/hyperion.metainfo.xml
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (c) 2014-2023 Hyperion Project -->
|
||||
<component type="desktop-application">
|
||||
<id>com.hyperion-project.hyperion</id>
|
||||
<metadata_license>MIT</metadata_license>
|
||||
<project_license>MIT</project_license>
|
||||
<name>Hyperion</name>
|
||||
<summary>The successor to Hyperion aka Hyperion Next Generation.</summary>
|
||||
|
||||
<description>
|
||||
<p>
|
||||
Hyperion is an opensource Bias or Ambient Lighting implementation which you might know from TV manufacturers.
|
||||
It supports many LED devices and video grabbers.
|
||||
</p>
|
||||
</description>
|
||||
|
||||
<url type="homepage">https://hyperion-project.org</url>
|
||||
<url type="bugtracker">https://github.com/hyperion-project/hyperion.ng/issues</url>
|
||||
<url type="help">https://hyperion-project.org</url>
|
||||
<url type="faq">https://docs.hyperion-project.org/</url>
|
||||
<url type="donation">https://www.paypal.me/HyperionAmbi</url>
|
||||
<url type="translate">https://poeditor.com/join/project/Y4F6vHRFjA</url>
|
||||
|
||||
<releases>
|
||||
<release version="2.0.15" date="2022-02-19" />
|
||||
<release version="2.0.14" date="2022-11-27" />
|
||||
<release version="2.0.13" date="2022-05-22" />
|
||||
<release version="2.0.12" date="2021-11-21" />
|
||||
<release version="2.0.0-alpha.11" date="2021-10-06" />
|
||||
<release version="2.0.0-alpha.10" date="2021-07-18" />
|
||||
<release version="2.0.0-alpha.9" date="2020-11-19" />
|
||||
<release version="2.0.0-alpha.8" date="2020-09-15" />
|
||||
<release version="2.0.0-alpha.7" date="2020-07-24" />
|
||||
<release version="2.0.0-alpha.6" date="2020-05-28" />
|
||||
<release version="2.0.0-alpha.5" date="2020-04-17" />
|
||||
<release version="2.0.0-alpha.4" date="2020-03-27" />
|
||||
<release version="2.0.0-alpha.3" date="2020-03-01" />
|
||||
<release version="2.0.0-alpha.2" date="2020-02-20" />
|
||||
<release version="2.0.0-alpha.1" date="2020-02-16" />
|
||||
</releases>
|
||||
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<caption>The multi language web interface</caption>
|
||||
<image>https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/doc/screenshot.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
|
||||
<categories>
|
||||
<category>Application</category>
|
||||
</categories>
|
||||
|
||||
<launchable type="desktop-id">com.hyperion-project.hyperion.desktop</launchable>
|
||||
|
||||
<developer_name>Hyperion Project</developer_name>
|
||||
<update_contact>admin@hyperion-project.org</update_contact>
|
||||
|
||||
<content_rating type="oars-1.0" />
|
||||
</component>
|
Before Width: | Height: | Size: 17 KiB |
@ -105,9 +105,9 @@ ln -fs $BINSP/scripts/updateHyperionUser.sh $BINTP/updateHyperionUser 2>/dev/nul
|
||||
if [ "$IS_UPGRADE" = false ]; then
|
||||
if hash desktop-file-install 2>/dev/null; then
|
||||
echo "---> Install Hyperion desktop icons"
|
||||
mkdir /usr/share/pixmaps/hyperion 2>/dev/null
|
||||
cp /usr/share/hyperion/desktop/*.png /usr/share/pixmaps/hyperion 2>/dev/null
|
||||
desktop-file-install /usr/share/hyperion/desktop/hyperiond.desktop 2>/dev/null
|
||||
cp -R /usr/share/hyperion/icons /usr/share/icons/hicolor 2>/dev/null
|
||||
cp /usr/share/hyperion/desktop/hyperion.metainfo.xml /usr/share/metainfo/hyperion.metainfo.xml 2>/dev/null
|
||||
desktop-file-install /usr/share/hyperion/desktop/hyperion.desktop 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -149,7 +149,7 @@ $REBOOTMESSAGE
|
||||
echo "-----------------------------------------------------------------------------"
|
||||
echo "Webpage: www.hyperion-project.org"
|
||||
echo "Forum: www.hyperion-project.org"
|
||||
echo "Documenation: docs.hyperion-project.org"
|
||||
echo "Documentation: docs.hyperion-project.org"
|
||||
echo "-----------------------------------------------------------------------------"
|
||||
|
||||
|
||||
|
@ -59,11 +59,29 @@ fi
|
||||
# In case we don't use a service kill all instances
|
||||
killall hyperiond 2> /dev/null
|
||||
|
||||
# delete desktop icons; desktop-file-edit is a workaround to hide the entry and delete it afterwards manual.
|
||||
# TODO Better way for deletion and keep the desktop in sync without logout/login or desktop dependend cmds?
|
||||
echo "---> Delete Hyperion desktop icons"
|
||||
desktop-file-edit --set-key=NoDisplay --set-value=true /usr/share/applications/hyperiond.desktop 2> /dev/null
|
||||
# remove desktop/appstream file
|
||||
rm -v /usr/share/applications/hyperion* 2> /dev/null
|
||||
rm -rv /usr/share/pixmaps/hyperion 2> /dev/null
|
||||
rm -v /usr/share/metainfo/hyperion* 2> /dev/null
|
||||
|
||||
# update desktop-database (if exists)
|
||||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
update-desktop-database -q /usr/share/applications
|
||||
fi
|
||||
|
||||
# remove Hyperion icons
|
||||
for i in 16x16 22x22 24x24 32x32 36x36 48x48 64x64 72x72 96x96 128x128 192x192 256x256 512x512
|
||||
rm -v usr/share/icons/hicolor/$i/apps/hyperion.png 2> /dev/null
|
||||
done
|
||||
|
||||
# update icon-cache
|
||||
if [ -e /usr/share/icons/hicolor/icon-theme.cache ] ; then
|
||||
# touch it, just in case we cannot find the binary...
|
||||
touch --no-create /usr/share/icons/hicolor
|
||||
if hash gtk-update-icon-cache 2>/dev/null; then
|
||||
gtk-update-icon-cache /usr/share/icons/hicolor
|
||||
fi
|
||||
# ignore errors
|
||||
true
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -52,7 +52,7 @@ SET ( CPACK_PACKAGE_CONTACT "packages@hyperion-project.org")
|
||||
SET ( CPACK_PACKAGE_VENDOR "hyperion-project")
|
||||
SET ( CPACK_PACKAGE_EXECUTABLES "hyperiond;Hyperion" )
|
||||
SET ( CPACK_PACKAGE_INSTALL_DIRECTORY "Hyperion" )
|
||||
SET ( CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/resources/icons/hyperion-icon-32px.png" )
|
||||
SET ( CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/resources/icons/hyperion-32px.png" )
|
||||
|
||||
SET ( CPACK_PACKAGE_VERSION_MAJOR "${HYPERION_VERSION_MAJOR}")
|
||||
SET ( CPACK_PACKAGE_VERSION_MINOR "${HYPERION_VERSION_MINOR}")
|
||||
|
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
||||
10
|
3
debian/control.in
vendored
@ -1,12 +1,11 @@
|
||||
Source: hyperion
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Build-Depends: @BUILD_DEPENDS@
|
||||
Standards-Version: @STANDARDS_VERSION@
|
||||
Maintainer: Hyperion Project <admin@hyperion-project.org>
|
||||
Homepage: https://hyperion-project.org/
|
||||
|
||||
Package: hyperion
|
||||
Architecture: @ARCHITECTURE@
|
||||
Depends: @DEPENDS@
|
||||
Depends: ${dist:Depends}
|
||||
Description: Hyperion is an opensource Bias or Ambient Lighting implementation which you might know from TV manufactures. It supports many LED devices and video grabbers.
|
||||
|
17
debian/distributions
vendored
@ -16,7 +16,7 @@ SignWith: yes
|
||||
|
||||
Origin: Hyperion-Project
|
||||
Label: apt.hyperion-project.org
|
||||
Codename: kinetic
|
||||
Codename: lunar
|
||||
Architectures: amd64 armhf arm64
|
||||
Components: main
|
||||
Description: Official APT Repository by Hyperion Project
|
||||
@ -24,8 +24,8 @@ SignWith: yes
|
||||
|
||||
Origin: Hyperion-Project
|
||||
Label: apt.hyperion-project.org
|
||||
Codename: lunar
|
||||
Architectures: amd64
|
||||
Codename: mantic
|
||||
Architectures: amd64 armhf arm64
|
||||
Components: main
|
||||
Description: Official APT Repository by Hyperion Project
|
||||
SignWith: yes
|
||||
@ -52,7 +52,16 @@ Origin: Hyperion-Project
|
||||
Label: apt.hyperion-project.org
|
||||
Suite: unstable
|
||||
Codename: bookworm
|
||||
Architectures: amd64
|
||||
Architectures: amd64 armhf arm64
|
||||
Components: main
|
||||
Description: Official APT Repository by Hyperion Project
|
||||
SignWith: yes
|
||||
|
||||
Origin: Hyperion-Project
|
||||
Label: apt.hyperion-project.org
|
||||
Suite: testing
|
||||
Codename: trixie
|
||||
Architectures: amd64 armhf arm64
|
||||
Components: main
|
||||
Description: Official APT Repository by Hyperion Project
|
||||
SignWith: yes
|
||||
|
58
debian/rules
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
SHELL := /bin/bash
|
||||
|
||||
BUILDDIR := build
|
||||
TARGET := debian/tmp
|
||||
|
||||
# libcec currently not linked in hyperion therefore not recognizable but hardcoded in FIND_DEPENDS
|
||||
REQUIRED_DEPS := libusb libasound libmbedtls libturbojpeg libcec
|
||||
QT5_DEPS := libqt5widgets5,libqt5x11extras5,libqt5sql5,libqt5serialport5,libqt5sql5-sqlite,
|
||||
|
||||
FIND_DEPENDS = $(shell \
|
||||
PACKAGES=(); \
|
||||
PACKAGES+=("$$(dpkg -S "libcec.so" 2>/dev/null | cut -d : -f 1 | sed '/-dev/d' | head -1)"); \
|
||||
for SHARED_LIB in $$(objdump -p $(BUILDDIR)/bin/hyperiond | awk '/NEEDED/{ print $$2 }'); do \
|
||||
PACKAGES+=("$$(dpkg -S $$(basename "$$SHARED_LIB") 2>/dev/null | cut -d : -f 1 | sed '/-dev/d' | head -1)"); \
|
||||
done; \
|
||||
RESULT=(); \
|
||||
for LIB in $(REQUIRED_DEPS); do \
|
||||
for i in "$${PACKAGES[@]}"; do \
|
||||
if [[ $$i = *"$$LIB"* ]]; then \
|
||||
RESULT+=("$$i"); \
|
||||
break; \
|
||||
fi; \
|
||||
done; \
|
||||
done; \
|
||||
printf '%s,' "$${RESULT[@]}" \
|
||||
)
|
||||
|
||||
CMAKE_ENVIRONMENT := -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
ifeq ($(shell dpkg-vendor --query Vendor),Ubuntu)
|
||||
ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),arm64)
|
||||
CMAKE_ENVIRONMENT+= -DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON
|
||||
else ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),armhf)
|
||||
CMAKE_ENVIRONMENT+= -DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON
|
||||
endif
|
||||
endif
|
||||
|
||||
build:
|
||||
[ -d $(BUILDDIR) ] || mkdir -p $(BUILDDIR)
|
||||
cd $(BUILDDIR); cmake $(CMAKE_ENVIRONMENT) -DCMAKE_INSTALL_PREFIX=../$(TARGET)/usr ..
|
||||
make -j$(shell nproc) -C $(BUILDDIR)
|
||||
|
||||
binary:
|
||||
$(eval DETERMINED_DEPS=$(FIND_DEPENDS))
|
||||
cd $(BUILDDIR); cmake -P cmake_install.cmake
|
||||
rm -rf $(TARGET)/usr/include $(TARGET)/usr/lib $(TARGET)/usr/bin/flatc
|
||||
[ -d $(TARGET)/DEBIAN ] || mkdir -p $(TARGET)/DEBIAN
|
||||
cp -rf cmake/package-scripts/* $(TARGET)/DEBIAN/
|
||||
chmod 0775 $(TARGET)/DEBIAN/*
|
||||
dpkg-gencontrol -phyperion "-Vdist:Depends=$(QT5_DEPS)$(DETERMINED_DEPS)"
|
||||
dpkg-deb --build $(TARGET) ..
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) $(BUILDDIR)
|
||||
|
||||
.PHONY: build binary clean
|
32
debian/rules.in
vendored
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
export DH_VERBOSE = 1
|
||||
|
||||
BUILDDIR = build
|
||||
|
||||
build:
|
||||
mkdir $(BUILDDIR);
|
||||
cd $(BUILDDIR); cmake @CMAKE_ENVIRONMENT@ -DCMAKE_INSTALL_PREFIX=../debian/tmp/usr ..
|
||||
make -j4 -C $(BUILDDIR)
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
|
||||
binary-indep:
|
||||
|
||||
binary-arch:
|
||||
cd $(BUILDDIR); cmake -P cmake_install.cmake
|
||||
rm -rf debian/tmp/usr/include debian/tmp/usr/lib debian/tmp/usr/bin/flatc
|
||||
mkdir debian/tmp/DEBIAN
|
||||
cp cmake/package-scripts/postinst debian/tmp/DEBIAN
|
||||
chmod 0775 debian/tmp/DEBIAN/postinst
|
||||
cp cmake/package-scripts/preinst debian/tmp/DEBIAN
|
||||
chmod 0775 debian/tmp/DEBIAN/preinst
|
||||
cp cmake/package-scripts/prerm debian/tmp/DEBIAN
|
||||
chmod 0775 debian/tmp/DEBIAN/prerm
|
||||
dpkg-gencontrol -phyperion
|
||||
dpkg --build debian/tmp ..
|
||||
rm -rf debian/tmp $(BUILDDIR)
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)
|
||||
|
||||
.PHONY: build binary binary-arch binary-indep clean
|
14
dependencies/CMakeLists.txt
vendored
@ -75,8 +75,18 @@ if(ENABLE_FLATBUF_SERVER OR ENABLE_FLATBUF_CONNECT)
|
||||
|
||||
if (USE_SYSTEM_FLATBUFFERS_LIBS)
|
||||
find_program(FLATBUFFERS_FLATC_EXECUTABLE NAMES flatc REQUIRED)
|
||||
find_package(Flatbuffers REQUIRED)
|
||||
else ()
|
||||
find_package(Flatbuffers QUIET)
|
||||
if (NOT Flatbuffers_FOUND)
|
||||
find_package(FlatBuffers QUIET)
|
||||
if (NOT FlatBuffers_FOUND)
|
||||
message(STATUS "Could not find Flatbuffers system library, build static Flatbuffers library")
|
||||
set(DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS OFF PARENT_SCOPE)
|
||||
set(USE_SYSTEM_FLATBUFFERS_LIBS OFF)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT USE_SYSTEM_FLATBUFFERS_LIBS)
|
||||
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared flatbuffers library")
|
||||
set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "Build Flatbuffers with tests")
|
||||
add_subdirectory(external/flatbuffers)
|
||||
|
@ -18,74 +18,69 @@ class AudioGrabberLinux : public AudioGrabber
|
||||
AudioGrabberLinux();
|
||||
~AudioGrabberLinux() override;
|
||||
|
||||
///
|
||||
///
|
||||
/// Process audio buffer
|
||||
///
|
||||
void processAudioBuffer(snd_pcm_sframes_t frames);
|
||||
|
||||
///
|
||||
///
|
||||
/// Is Running Flag
|
||||
///
|
||||
std::atomic<bool> _isRunning;
|
||||
|
||||
///
|
||||
///
|
||||
/// Current capture device
|
||||
///
|
||||
snd_pcm_t * _captureDevice;
|
||||
|
||||
public slots:
|
||||
|
||||
///
|
||||
///
|
||||
/// Start audio capturing session
|
||||
///
|
||||
/// @returns true if successful
|
||||
bool start() override;
|
||||
|
||||
///
|
||||
///
|
||||
/// Stop audio capturing session
|
||||
///
|
||||
void stop() override;
|
||||
|
||||
///
|
||||
///
|
||||
/// Discovery audio devices
|
||||
///
|
||||
QJsonArray discover(const QJsonObject& params) override;
|
||||
|
||||
private:
|
||||
///
|
||||
///
|
||||
/// Refresh audio devices
|
||||
///
|
||||
void refreshDevices();
|
||||
|
||||
///
|
||||
///
|
||||
/// Configure current audio capture interface
|
||||
///
|
||||
bool configureCaptureInterface();
|
||||
|
||||
///
|
||||
///
|
||||
/// Get device name from path
|
||||
///
|
||||
QString getDeviceName(const QString& devicePath) const;
|
||||
|
||||
///
|
||||
///
|
||||
/// Current sample rate
|
||||
///
|
||||
unsigned int _sampleRate;
|
||||
|
||||
///
|
||||
///
|
||||
/// Audio capture thread
|
||||
///
|
||||
pthread_t _audioThread;
|
||||
|
||||
///
|
||||
///
|
||||
/// ALSA device configuration parameters
|
||||
///
|
||||
snd_pcm_hw_params_t * _captureDeviceConfig;
|
||||
};
|
||||
|
||||
///
|
||||
/// Audio processing thread function
|
||||
///
|
||||
static void* AudioThreadRunner(void* params);
|
||||
|
||||
#endif // AUDIOGRABBERLINUX_H
|
||||
|
@ -555,7 +555,7 @@ namespace hyperion
|
||||
if (pixelNum > 0)
|
||||
{
|
||||
// initial cluster with different colors
|
||||
auto clusters = std::unique_ptr< ColorCluster<ColorRgbScalar> >(new ColorCluster<ColorRgbScalar>[_clusterCount]);
|
||||
std::unique_ptr<ColorCluster<ColorRgbScalar>[]> clusters(new ColorCluster<ColorRgbScalar>[_clusterCount]);
|
||||
for(int k = 0; k < _clusterCount; ++k)
|
||||
{
|
||||
clusters.get()[k].newColor = DEFAULT_CLUSTER_COLORS[k];
|
||||
|
@ -5,7 +5,27 @@
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
|
||||
typedef void* (*THREADFUNCPTR)(void*);
|
||||
static void * AudioThreadRunner(void* params)
|
||||
{
|
||||
AudioGrabberLinux* This = static_cast<AudioGrabberLinux*>(params);
|
||||
|
||||
Debug(This->getLog(), "Audio Thread Started");
|
||||
|
||||
snd_pcm_sframes_t framesAvailable = 0;
|
||||
|
||||
while (This->_isRunning.load(std::memory_order_acquire))
|
||||
{
|
||||
snd_pcm_wait(This->_captureDevice, 1000);
|
||||
|
||||
if ((framesAvailable = snd_pcm_avail(This->_captureDevice)) > 0)
|
||||
This->processAudioBuffer(framesAvailable);
|
||||
|
||||
sched_yield();
|
||||
}
|
||||
|
||||
Debug(This->getLog(), "Audio Thread Shutting Down");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AudioGrabberLinux::AudioGrabberLinux()
|
||||
: AudioGrabber()
|
||||
@ -121,7 +141,7 @@ bool AudioGrabberLinux::configureCaptureInterface()
|
||||
snd_pcm_close(_captureDevice);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if ((error = snd_pcm_hw_params_set_access(_captureDevice, _captureDeviceConfig, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0)
|
||||
{
|
||||
Error(_log, "Failed to configure interleaved mode: %s", snd_strerror(error));
|
||||
@ -129,7 +149,7 @@ bool AudioGrabberLinux::configureCaptureInterface()
|
||||
snd_pcm_close(_captureDevice);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if ((error = snd_pcm_hw_params_set_format(_captureDevice, _captureDeviceConfig, SND_PCM_FORMAT_S16_LE)) < 0)
|
||||
{
|
||||
Error(_log, "Failed to configure capture format: %s", snd_strerror(error));
|
||||
@ -169,7 +189,7 @@ bool AudioGrabberLinux::configureCaptureInterface()
|
||||
snd_pcm_close(_captureDevice);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -189,10 +209,10 @@ bool AudioGrabberLinux::start()
|
||||
_isRunning.store(true, std::memory_order_release);
|
||||
|
||||
pthread_attr_t threadAttributes;
|
||||
int threadPriority = 1;
|
||||
// int threadPriority = 1;
|
||||
|
||||
sched_param schedulerParameter;
|
||||
schedulerParameter.sched_priority = threadPriority;
|
||||
// sched_param schedulerParameter;
|
||||
// schedulerParameter.sched_priority = threadPriority;
|
||||
|
||||
if (pthread_attr_init(&threadAttributes) != 0)
|
||||
{
|
||||
@ -201,7 +221,7 @@ bool AudioGrabberLinux::start()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (pthread_create(&_audioThread, &threadAttributes, static_cast<THREADFUNCPTR>(&AudioThreadRunner), static_cast<void*>(this)) != 0)
|
||||
if (pthread_create(&_audioThread, &threadAttributes, &AudioThreadRunner, static_cast<void*>(this)) != 0)
|
||||
{
|
||||
Debug(_log, "Failed to create audio capture thread");
|
||||
stop();
|
||||
@ -239,7 +259,7 @@ void AudioGrabberLinux::processAudioBuffer(snd_pcm_sframes_t frames)
|
||||
ssize_t bytes = snd_pcm_frames_to_bytes(_captureDevice, frames);
|
||||
|
||||
int16_t * buffer = static_cast<int16_t*>(calloc(static_cast<size_t>(bytes / 2), sizeof(int16_t)));
|
||||
|
||||
|
||||
if (frames == 0)
|
||||
{
|
||||
buffer[0] = 0;
|
||||
@ -293,25 +313,3 @@ QString AudioGrabberLinux::getDeviceName(const QString& devicePath) const
|
||||
|
||||
return _deviceProperties.value(devicePath).name;
|
||||
}
|
||||
|
||||
static void * AudioThreadRunner(void* params)
|
||||
{
|
||||
AudioGrabberLinux* This = static_cast<AudioGrabberLinux*>(params);
|
||||
|
||||
Debug(This->getLog(), "Audio Thread Started");
|
||||
|
||||
snd_pcm_sframes_t framesAvailable = 0;
|
||||
|
||||
while (This->_isRunning.load(std::memory_order_acquire))
|
||||
{
|
||||
snd_pcm_wait(This->_captureDevice, 1000);
|
||||
|
||||
if ((framesAvailable = snd_pcm_avail(This->_captureDevice)) > 0)
|
||||
This->processAudioBuffer(framesAvailable);
|
||||
|
||||
sched_yield();
|
||||
}
|
||||
|
||||
Debug(This->getLog(), "Audio Thread Shutting Down");
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -1018,7 +1018,7 @@ bool V4L2Grabber::process_image(const void *p, int size)
|
||||
}
|
||||
else if (_threadManager != nullptr)
|
||||
{
|
||||
for (int i = 0; i < _threadManager->_threadCount; i++)
|
||||
for (unsigned long i = 0; i < _threadManager->_threadCount; i++)
|
||||
{
|
||||
if (!_threadManager->_threads[i]->isBusy())
|
||||
{
|
||||
|
BIN
resources/icons/hyperion-128px.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
resources/icons/hyperion-16px.png
Normal file
After Width: | Height: | Size: 717 B |
BIN
resources/icons/hyperion-192px.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
resources/icons/hyperion-22px.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
resources/icons/hyperion-24px.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
resources/icons/hyperion-256px.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
resources/icons/hyperion-32px.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
resources/icons/hyperion-36px.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
resources/icons/hyperion-48px.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
resources/icons/hyperion-512px.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
resources/icons/hyperion-64px.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
resources/icons/hyperion-72px.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
resources/icons/hyperion-96px.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 68 KiB |
6
rpmbuild/hyperion.repo.in
Normal file
@ -0,0 +1,6 @@
|
||||
[hyperion]
|
||||
name=Hyperion - @ARCH@ - @CHANNEL@ Release
|
||||
baseurl=https://dnf.releases.hyperion-project.org/@DIST@/$releasever/$basearch/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://releases.hyperion-project.org/hyperion.pub.key
|
268
rpmbuild/hyperion.spec.in
Normal file
@ -0,0 +1,268 @@
|
||||
# disable debuginfo subpackage generation
|
||||
%define debug_package %{nil}
|
||||
|
||||
# disable build-id symlinks
|
||||
%define _build_id_links none
|
||||
|
||||
# don't use changelog date
|
||||
%global source_date_epoch_from_changelog 0
|
||||
|
||||
Name: hyperion
|
||||
Version: %{_version}
|
||||
Release: 0%{?dist}
|
||||
Summary: The successor to Hyperion aka Hyperion Next Generation
|
||||
|
||||
License: MIT
|
||||
URL: https://github.com/hyperion-project/%{name}.ng
|
||||
Source: %{name}.ng.tar.gz
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}.ng-build
|
||||
Vendor: Hyperion Project
|
||||
Packager: Hyperion-Project <admin@hyperion-project.org>
|
||||
|
||||
# common build dependencies
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: libappstream-glib
|
||||
BuildRequires: qt5-qtbase-devel qt5-qtserialport-devel qt5-qtx11extras-devel
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: turbojpeg-devel libjpeg-turbo-devel
|
||||
BuildRequires: protobuf-devel protobuf-compiler
|
||||
BuildRequires: flatbuffers-devel flatbuffers-compiler
|
||||
BuildRequires: mbedtls-devel
|
||||
BuildRequires: libcec-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: libusb1-devel
|
||||
BuildRequires: avahi-libs avahi-compat-libdns_sd-devel
|
||||
BuildRequires: libXrandr-devel
|
||||
BuildRequires: xcb-util-image-devel xcb-util-devel
|
||||
BuildRequires: dbus-devel
|
||||
BuildRequires: alsa-lib-devel
|
||||
BuildRequires: systemd
|
||||
|
||||
%if 0%{?suse_version} >= 1210
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%endif
|
||||
|
||||
Requires: desktop-file-utils
|
||||
Requires: qt5-qtbase qt5-qtserialport qt5-qtx11extras
|
||||
Requires: python3-libs
|
||||
Requires: turbojpeg
|
||||
Requires: libusb
|
||||
Requires: avahi-libs
|
||||
Requires: dbus-libs
|
||||
Requires: libXrandr
|
||||
Requires: openssl
|
||||
Requires: protobuf
|
||||
Requires: flatbuffers
|
||||
Requires: mbedtls
|
||||
Requires: libcec
|
||||
Requires: alsa-lib
|
||||
Requires: firewalld
|
||||
|
||||
BuildArch: %(uname -m)
|
||||
|
||||
%description
|
||||
Hyperion is an opensource Bias or Ambient Lighting implementation
|
||||
which you might know from TV manufacturers.
|
||||
It supports many LED devices and video grabbers.
|
||||
|
||||
%prep
|
||||
%setup -qn %{name}.ng
|
||||
|
||||
%build
|
||||
cmake \
|
||||
-S . -B build \
|
||||
-DUSE_SYSTEM_PROTO_LIBS=ON \
|
||||
-DUSE_SYSTEM_FLATBUFFERS_LIBS=ON \
|
||||
-DUSE_SYSTEM_MBEDTLS_LIBS=ON \
|
||||
-DENABLE_DEPLOY_DEPENDENCIES=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix}
|
||||
|
||||
make -C build -j 4
|
||||
|
||||
%install
|
||||
%make_install -C build
|
||||
|
||||
# remove user entry (line 12) from systemd file (also in description)
|
||||
# sed -i '12d' %{buildroot}%{_datadir}/%{name}/service/%{name}.systemd
|
||||
# sed -i 's/ for user \%i//g' %{buildroot}%{_datadir}/%{name}/service/%{name}.systemd
|
||||
|
||||
%check
|
||||
# check Desktop/AppStream file
|
||||
desktop-file-validate %{buildroot}%{_datadir}/%{name}/desktop/%{name}.desktop
|
||||
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/%{name}/desktop/%{name}.metainfo.xml
|
||||
|
||||
%pre
|
||||
# stop running daemon before we install/upgrade
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
if %{_bindir}/pgrep 'hyperiond' &>/dev/null; then
|
||||
CURRENT_SERVICE=$(systemctl --type service | { grep -o "hyperion.*\.service" || true; });
|
||||
if [ ! -z "${CURRENT_SERVICE}" ]; then
|
||||
systemctl stop ${CURRENT_SERVICE} &>/dev/null || :
|
||||
else
|
||||
killall hyperiond &>/dev/null || :
|
||||
fi
|
||||
fi
|
||||
# else TODO SUSE
|
||||
%endif
|
||||
|
||||
%post
|
||||
# initial installation (postun is run when updating)
|
||||
if [ $1 -eq 1 ]; then
|
||||
echo "-----------------------------------------------------------------------------"
|
||||
|
||||
# service registration if no GUI OS is present
|
||||
if [ -z "${DISPLAY}" ] && [ -z "${WAYLAND_DISPLAY}" ] && [ -z "${XDG_CURRENT_DESKTOP}" ]; then
|
||||
%__install -D -m 644 %{_datadir}/%{name}/service/%{name}.systemd %{_unitdir}/%{name}@.service
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
USERNAME=$(logname)
|
||||
%systemd_post %{name}@.service
|
||||
systemctl -q enable %{name}@${USERNAME}.service &>/dev/null || :
|
||||
systemctl start %{name}@${USERNAME} &>/dev/null || :
|
||||
|
||||
if [[ "$(type firewall-cmd &>/dev/null; echo $?)" -eq 0 && "$(systemctl is-active firewalld)" == "active" ]]; then
|
||||
ZONE=$(firewall-cmd --get-default-zone)
|
||||
firewall-cmd --permanent --zone=${ZONE} --new-service-from-file=%{_datadir}/%{name}/service/%{name}.xml --add-service=%{name} &>/dev/null || :
|
||||
firewall-cmd --permanent --zone=${ZONE} --add-service=%{name} &>/dev/null || :
|
||||
firewall-cmd --complete-reload &>/dev/null || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%service_add_post %{name}.service
|
||||
%endif
|
||||
|
||||
echo "---> Hyperion has been installed as service, it will start on each system startup"
|
||||
|
||||
else
|
||||
if test -d /usr/share/icons/hicolor; then
|
||||
# copy Hyperion icons to the proper freedesktop location
|
||||
mkdir -p %{_datadir}/icons/hicolor/
|
||||
cp -rp %{_datadir}/%{name}/icons/* %{_datadir}/icons/hicolor/
|
||||
|
||||
# update icon-cache
|
||||
%if 0%{?suse_version}
|
||||
%icon_theme_cache_post
|
||||
%else
|
||||
# touch it, just in case we cannot find the binary...
|
||||
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
if hash gtk-update-icon-cache 2>/dev/null; then
|
||||
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
fi
|
||||
%endif
|
||||
fi
|
||||
|
||||
if hash desktop-file-install 2>/dev/null ; then
|
||||
# install Desktop/AppStream file
|
||||
%__install -D -m 644 %{_datadir}/%{name}/desktop/%{name}.metainfo.xml %{_metainfodir}/%{name}.metainfo.xml
|
||||
desktop-file-install --dir=%{_datadir}/applications %{_datadir}/%{name}/desktop/%{name}.desktop
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%desktop_database_post
|
||||
%endif
|
||||
fi
|
||||
|
||||
echo "---> You can start Hyperion from your menu now"
|
||||
fi
|
||||
fi
|
||||
|
||||
%preun
|
||||
# package uninstall
|
||||
if [ $1 -eq 0 ]; then
|
||||
if [ -z "${DISPLAY}" ] && [ -z "${WAYLAND_DISPLAY}" ] && [ -z "${XDG_CURRENT_DESKTOP}" ]; then
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
CURRENT_SERVICE=$(systemctl --type service | { grep -o "hyperion.*\.service" || true; });
|
||||
if [ ! -z "${CURRENT_SERVICE}" ]; then
|
||||
%systemd_preun ${CURRENT_SERVICE}
|
||||
fi
|
||||
|
||||
rm -v %{_unitdir}/%{name}@.service &>/dev/null || :
|
||||
systemctl daemon-reload &>/dev/null
|
||||
|
||||
if [[ "$(type firewall-cmd &>/dev/null; echo $?)" -eq 0 && "$(systemctl is-active firewalld)" == "active" ]]; then
|
||||
ZONE=$(firewall-cmd --get-default-zone)
|
||||
firewall-cmd --permanent --zone=${ZONE} --remove-service=%{name} &>/dev/null || :
|
||||
rm -v /etc/firewalld/services/%{name}.xml &>/dev/null || :
|
||||
firewall-cmd --complete-reload &>/dev/null || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%service_del_preun %{name}.service
|
||||
%endif
|
||||
|
||||
else
|
||||
if test -d /usr/share/icons/hicolor; then
|
||||
# remove Hyperion icons
|
||||
for i in 16x16 22x22 24x24 32x32 36x36 48x48 64x64 72x72 96x96 128x128 192x192 256x256 512x512; do
|
||||
rm -v %{_datadir}/icons/hicolor/${i}/apps/%{name}.png &>/dev/null || :
|
||||
done
|
||||
|
||||
# update icon-cache
|
||||
%if 0%{?suse_version}
|
||||
%icon_theme_cache_post
|
||||
%else
|
||||
# touch it, just in case we cannot find the binary...
|
||||
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
if hash gtk-update-icon-cache 2>/dev/null; then
|
||||
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
fi
|
||||
%endif
|
||||
fi
|
||||
|
||||
if hash desktop-file-install 2>/dev/null ; then
|
||||
# remove desktop/appstream file
|
||||
rm -v /usr/share/applications/%{name}* &>/dev/null || :
|
||||
rm -v /usr/share/metainfo/%{name}* &>/dev/null || :
|
||||
|
||||
# update desktop-database
|
||||
%if 0%{?suse_version}
|
||||
%desktop_database_post
|
||||
%else
|
||||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
update-desktop-database -q /usr/share/applications &>/dev/null || :
|
||||
fi
|
||||
%endif
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
%postun
|
||||
# package upgrade
|
||||
if [ $1 -ge 1 ] ; then
|
||||
if [ -z "${DISPLAY}" ] && [ -z "${WAYLAND_DISPLAY}" ] && [ -z "${XDG_CURRENT_DESKTOP}" ]; then
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
CURRENT_SERVICE=$(systemctl --type service | { grep -o "hyperion.*\.service" || true; });
|
||||
if [ ! -z "${CURRENT_SERVICE}" ]; then
|
||||
%systemd_postun_with_restart ${CURRENT_SERVICE}
|
||||
fi
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%service_del_postun %{name}.service
|
||||
%endif
|
||||
fi
|
||||
fi
|
||||
|
||||
%posttrans
|
||||
# get current system ip
|
||||
NET_IP="$( hostname -I | cut -d " " -f1 )"
|
||||
|
||||
echo "---> For configuration, visit with your browser: ${NET_IP}:8090"
|
||||
echo "---> or if already used by another service try: ${NET_IP}:8091"
|
||||
echo "-----------------------------------------------------------------------------"
|
||||
echo "Webpage: www.hyperion-project.org"
|
||||
echo "Forum: www.hyperion-project.org"
|
||||
echo "Documentation: docs.hyperion-project.org"
|
||||
echo "-----------------------------------------------------------------------------"
|
||||
|
||||
%files
|
||||
%defattr(-,-,root)
|
||||
%{_bindir}/*
|
||||
%{_datadir}/%{name}/
|
||||
%exclude %{_datadir}/%{name}/service/%{name}.init
|
||||
%exclude %{_datadir}/%{name}/service/%{name}.initctl
|
||||
|
||||
%changelog
|
@ -6,7 +6,7 @@ description: |
|
||||
It supports many LED devices and video grabbers.
|
||||
|
||||
license: MIT
|
||||
icon: resources/icons/hyperion-icon-512px.png
|
||||
icon: resources/icons/hyperion-512px.png
|
||||
adopt-info: hyperion-ng
|
||||
architectures:
|
||||
- build-on: amd64
|
||||
@ -59,7 +59,7 @@ parts:
|
||||
apps:
|
||||
hyperion-ng:
|
||||
command: usr/local/bin/hyperiond
|
||||
desktop: usr/local/share/hyperion/desktop/hyperiond.desktop
|
||||
desktop: /usr/share/applications/hyperion.desktop
|
||||
plugs:
|
||||
- camera
|
||||
- framebuffer
|
||||
|
@ -170,21 +170,25 @@ if (APPLE)
|
||||
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION . COMPONENT "Hyperion")
|
||||
elseif(NOT WIN32)
|
||||
# install Hyperion/service files/effect folder
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin" COMPONENT "Hyperion" )
|
||||
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/bin/service DESTINATION "share/hyperion/" COMPONENT "Hyperion" )
|
||||
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/bin/service DESTINATION "share/hyperion" COMPONENT "Hyperion" )
|
||||
install ( FILES ${CMAKE_SOURCE_DIR}/effects/readme.txt DESTINATION "share/hyperion/effects" COMPONENT "Hyperion" )
|
||||
install ( FILES ${CMAKE_SOURCE_DIR}/resources/icons/hyperion-icon-32px.png DESTINATION "share/hyperion/icons" COMPONENT "Hyperion" )
|
||||
|
||||
# Desktop file for Hyperion
|
||||
install ( FILES ${CMAKE_SOURCE_DIR}/cmake/desktop/hyperiond_128.png DESTINATION "share/hyperion/desktop" COMPONENT "Hyperion" )
|
||||
install ( FILES ${CMAKE_SOURCE_DIR}/cmake/desktop/hyperiond.desktop DESTINATION "share/hyperion/desktop" COMPONENT "Hyperion" )
|
||||
# install Hyperion icons
|
||||
set( ICON_SIZES 16 22 24 32 36 48 64 72 96 128 192 256 512 )
|
||||
foreach(size ${ICON_SIZES})
|
||||
set( ICONS_FROM "${CMAKE_SOURCE_DIR}/resources/icons/hyperion-${size}px.png" )
|
||||
set( ICONS_TO "share/hyperion/icons/${size}x${size}/apps/" )
|
||||
install( FILES ${ICONS_FROM} DESTINATION ${ICONS_TO} RENAME "hyperion.png" COMPONENT "Hyperion" )
|
||||
endforeach(size)
|
||||
|
||||
# install desktop/appstream file
|
||||
install ( FILES ${CMAKE_SOURCE_DIR}/cmake/desktop/hyperion.metainfo.xml DESTINATION "share/hyperion/desktop" COMPONENT "Hyperion" )
|
||||
install ( FILES ${CMAKE_SOURCE_DIR}/cmake/desktop/hyperion.desktop DESTINATION "share/hyperion/desktop" COMPONENT "Hyperion" )
|
||||
else()
|
||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT "Hyperion" )
|
||||
install ( FILES ${CMAKE_SOURCE_DIR}/effects/readme.txt DESTINATION "effects" COMPONENT "Hyperion" )
|
||||
|
||||
#set( CMAKE_INSTALL_UCRT_LIBRARIES TRUE )
|
||||
#set( CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE )
|
||||
#include( InstallRequiredSystemLibraries )
|
||||
endif()
|
||||
|
||||
if (CMAKE_HOST_UNIX AND NOT APPLE)
|
||||
|
@ -211,8 +211,8 @@ private:
|
||||
OsxWrapper* _osxGrabber;
|
||||
QtWrapper* _qtGrabber;
|
||||
DirectXWrapper* _dxGrabber;
|
||||
AudioWrapper* _audioGrabber;
|
||||
SSDPHandler* _ssdp;
|
||||
AudioWrapper* _audioGrabber;
|
||||
#ifdef ENABLE_CEC
|
||||
CECHandler* _cecHandler;
|
||||
#endif
|
||||
|
@ -115,7 +115,7 @@ QCoreApplication* createApplication(int &argc, char *argv[])
|
||||
app->addLibraryPath(QApplication::applicationDirPath() + "/../lib");
|
||||
app->setApplicationDisplayName("Hyperion");
|
||||
#ifndef __APPLE__
|
||||
app->setWindowIcon(QIcon(":/hyperion-icon-32px.png"));
|
||||
app->setWindowIcon(QIcon(":/hyperion-32px.png"));
|
||||
#endif
|
||||
return app;
|
||||
}
|
||||
|
@ -33,8 +33,8 @@ SysTray::SysTray(HyperionDaemon *hyperiond)
|
||||
, _hyperiond(hyperiond)
|
||||
, _hyperion(nullptr)
|
||||
, _instanceManager(HyperionIManager::getInstance())
|
||||
, _suspendHandler (hyperiond->getSuspendHandlerInstance())
|
||||
, _webPort(8090)
|
||||
, _suspendHandler (hyperiond->getSuspendHandlerInstance())
|
||||
{
|
||||
Q_INIT_RESOURCE(resources);
|
||||
|
||||
@ -281,7 +281,7 @@ void SysTray::handleInstanceStateChange(InstanceState state, quint8 instance, co
|
||||
connect(quitAction, &QAction::triggered, _trayIcon, &QSystemTrayIcon::hide, Qt::DirectConnection);
|
||||
connect(&_colorDlg, &QColorDialog::currentColorChanged, this, &SysTray::setColor);
|
||||
|
||||
QIcon icon(":/hyperion-icon-32px.png");
|
||||
QIcon icon(":/hyperion-32px.png");
|
||||
_trayIcon->setIcon(icon);
|
||||
_trayIcon->show();
|
||||
setWindowIcon(icon);
|
||||
|