diff --git a/.github/actions/download-pre-built-deps/buildspec.json b/.github/actions/download-pre-built-deps/buildspec.json index 639da0bb4..2b6571375 100644 --- a/.github/actions/download-pre-built-deps/buildspec.json +++ b/.github/actions/download-pre-built-deps/buildspec.json @@ -1,90 +1,84 @@ { - "version": "2025-05-16", + "version": "2025-06-08", "baseUrl": "https://github.com/hyperion-project/hyperion-deps/releases/download", "hashes": { - "debian_bullseye": { + "debian_bookworm": { "amd64": { "qt6": { - "debug": "afd7c86a68b27a338d79e1f4d99cac8dcfcaf1f2f2e5c37077a0f1c7028d8067", - "release": "399921e9bcf4929c0682ba435a2893c07d7a6a9f7ca25bbc7a3ad6f2a4a756aa" + "debug": "0e942549ea239c0b82125475511cc6f471e5ae6106eccd447b2657a77784aed0", + "release": "a815cf7ef9695b5cfbbf07bd1a4c65bd11fe7f1507a06ad36585c151b590fdf1" } }, "arm64": { "qt6": { - "debug": "69ea079ad0d88811b57a13622bb12e77ee2dc3522060e56ffd3a6ee4209ed165", - "release": "7da05ed817fa3f8168391f3a1fec784d6a4934f71705b0106eb1dc2b127dd8ad" + "debug": "f78dd1fedbb93232473eca6cac9c33465b0245ef36fa4ddd4beba3cddaa0b525", + "release": "616d10f849e1f2335690ee3349a656a0c610c42f47f8c4c2f2534f944c7005f5" + } + }, + "armv6": { + "qt6": { + "debug": "c5b8d6f2b8347b6f7a53e80530feec87d45196171709f257783fefb8d99b6470", + "release": "afc221f57eda8cca6929b67c5931358566886e1466741403ea622d60e2d7391b" } }, "armv7": { "qt6": { - "debug": "dc1edff1b29b2fa2fa0fabea485740972392427a2276df34a293c58d2f431c0d", - "release": "c174c779a989a577ed19ede008d430c985f284295e6555e9a1df2d8c8a74c8f0" + "debug": "64a59a230d4450dbc34707c23178ed0da2f0dad8a5b6f1aa580e750c2bdedf0e", + "release": "965e26b678dd3222f2d8d9615bee7625253d4d7acd881b4c233f1b623179e4e1" } } }, - "debian_buster": { + "debian_bullseye": { "amd64": { - "qt5": { - "debug": "3de38a5697be6ec50534e8c06eed362f6ec4a0a42270ab17f91442d2119f76bd", - "release": "899519e9bafeb8c36c67b840b8e825b4bb90ee4522f06aa89394077122a1b1e1" + "qt6": { + "debug": "d9e87d8321ec62db6eeee61177e4ca83d3e5485a9475da2633460d3dfb6d2001", + "release": "5207ae10c3351ba7b59c1d7a0ea33377996c3f8c035ad3861a6d7aa409c23476" } }, "arm64": { - "qt5": { - "debug": "3fd513e6250adf3e48f27b917bcc27bddd8717917c4ebdd3c89451b0775ca5d1", - "release": "e3d14ffa5fd73d99abd1777986a0f9fd4da03f6d91a4c4303f19476e05d3c8e0" + "qt6": { + "debug": "2e056a31fbc03221496d075c9c851779547730a6e2cc47cf7569b4790dfaef1c", + "release": "f715d0376a96f05d072b4e2d4c4e2cd4aa04790bbe9c06fe02ae83261f3bd233" } }, "armv6": { "qt5": { - "debug": "5614cd248f288f111db60dd525b56a7267fc9378a6699439518b751c74c3502f", - "release": "42401c9003a5b5fee7e922f6f3fd925703a4084b0d6fcc8d71943f6f56ba357a" + "debug": "88ac40a89707ef146453162c683f0deced478d768c50d4cba95bf2ba246d9ec2", + "release": "58d9a3fa11564347fe46d4b2c308efc63c788cad1d9f0ccaeb6ab86997b6e29f" } }, "armv7": { - "qt5": { - "debug": "5c77e12246edc9642c65f2c9da7b8039c548d9b02c02c99e18cfdd59287ac984", - "release": "00a9432a373469fc14e24c36f475e3044677b474ffa47d6bf3078e596c7d70e4" + "qt6": { + "debug": "df56203dca02c2dd8724f9ad111e105af4f46efabac6aba3f8583d48cbd6c8a3", + "release": "70ea455ad0a5ddbe74296b35a2ff4e0fe7c2acb5af9f527a9548b72b56eaaeae" } } }, "macos": { "arm64": { - "qt5": { - "debug": "95e49f2765b519a76ec70e52d318ab025340420c2f2c83290b43859087da1a80", - "release": "15f1c0ff0a88aaef341733b238ea4359eef39fd36e5694d18aa46e85562eefb0" - }, "qt6": { - "debug": "091bd2812eb262cf3d54bdfd37b4b26d9cacafc183fc34b72614943bb4d394b5", - "release": "9158afa52a1e9c335c158b99725d9fd92871323e38b1c781bd4232a6f3dae5ee" + "debug": "b850180c333e07400d9e8d525b4322c38596d2d112f70e589f0023e756e65752", + "release": "4ba3d8da0802b7d2f658fe45dfc470143987cbfd107cf75bd267f1926352041f" } }, "x64": { - "qt5": { - "debug": "788c46cc50ba6932b8b4b4e0dca2eb18bc1edcb607822a6c2b5a5a8df3a5e592", - "release": "88a9562b441e983ac3b9ef226a5da3ea676a5d180ee0b97faa17337bd860b327" - }, "qt6": { - "debug": "1fcd76ee5de41516d7e6e5ceaa0be64fd303ace8fa0c1ab09b7f99003dcb0396", - "release": "7f8e27518e9d985a8c3dad30499d9e1910039a3401930c87d5c79f4b599cdabe" + "debug": "6c759d2b63fe26bdd013375f323ffe086d7e241b22067c88c8642cfb3beec8a9", + "release": "dcd7e8ffb7c32bfc78844afc1ac7eb1f35cb1eaf3b5392f1453f9ba5eefbcf51" } } }, "windows": { "arm64": { "qt6": { - "release": "3a7423d7b305ad31526d7f72ac945b4e5325bbde3d23d47a7bb487ae67913933", - "relwithdebinfo": "d24a46ac82c612f242a21ac7caa44f7311ebaa4cf74bfefad438699d98fe261c" + "release": "74fe89d5513f7f98ad6d75518ad87415a970d0777d2c07b6e91e351a7ca28679", + "relwithdebinfo": "ae32edcd574a390e5ececc724e02850a036d2240a517ce61c18d7e3aed9f0881" } }, "x64": { - "qt5": { - "release": "a18e95f058622e2a8765da153e7ee7c6fe35a791a443cf4c8ad711b5b1fadde7", - "relwithdebinfo": "f1c8864e3ce5fe8e8a6c0794b6ff3e8259eebdac1ced86eb02ca17a7e009f26d" - }, "qt6": { - "release": "baa46cacb9b52f49d7263e72962e488ac755324bd4f133ab3c883cf77e27d889", - "relwithdebinfo": "f213f690adf200e2e03ee058b64769179f2ff8dfd9579ffe63074e14db6b87ba" + "release": "17ca40e4e38c7cf753a330f11912c3aef892413474bbe6523c4592e355cd95ea", + "relwithdebinfo": "f968de5a05eacb6cb24374879be81d01f67bc22ab00c4ee9c55ce5b9640918ca" } } } diff --git a/.github/nightly.md b/.github/nightly.md new file mode 100644 index 000000000..15241dba8 --- /dev/null +++ b/.github/nightly.md @@ -0,0 +1,40 @@ +# ๐ŸŒ™ Hyperion โ€” Nightly Build (Development Version) + +Would you like to try out new features before they are officially released? +Then the **Nightly Build** version of **Hyperion** is just right for you! + +## What to Expect +- Nightly builds often include **bug fixes for known, reproducible issues**. +- However, they may also introduce **new, untested features** that could cause occasional stability problems. +- Please use this version with **caution** if you rely on a stable setup. + + > [!WARNING] + > Note that changes to the configuration may be made which are not reverted easily. To prevent data loss or configuration conflicts, it's **strongly recommended** to: + > - **Export your existing configuration** via the [WebUI](https://docs.hyperion-project.org/user/Configuration.html#configuration-backup) + > - or the [Command Line Interface](https://docs.hyperion-project.org/user/advanced/CLI.html#command-line-interface) before upgrading. + +## Installing + +### ๐Ÿง Linux + +We recommend installing Linux nightly builds via our [APT/DNF repository](https://releases.hyperion-project.org/). +Start via [Linux -> Easy -> check "nighly version"](https://releases.hyperion-project.org). + +Note: The `*.deb` and `*.tar.gz` packages attached here are based on **Debian Bullseye** and are tailored for the platform specified in the filename. + +### ๐ŸชŸ Windows +We offer two installers for **Windows 11**: + +- `*-x64.exe` (for standard 64-bit systems) +- `*-arm64.exe` (for ARM-based systems) + +### ๐Ÿ macOS + +Choose the version based on your architecture: + +- `*-x86_64.dmg` โ€” Requires **macOS 13.5 Ventura** or newer +- `*-arm64.dmg` โ€” Requires **macOS 14.0 Sonoma** or newer + +## Help Us Improve! + +If you encounter any bugs or issues, please **let us know** โ€” your feedback helps us make Hyperion better! :wink: diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml new file mode 100644 index 000000000..a6b6c1e19 --- /dev/null +++ b/.github/workflows/debian.yml @@ -0,0 +1,103 @@ +name: Debian Builds + +on: + # Reusable from push_pull.yml + workflow_call: + inputs: + codename: + type: string + description: The Debian codename + default: 'bullseye' + required: false + event_name: + type: string + description: The event name + default: '' + required: false + pull_request_number: + type: string + description: The corresponding PR number + default: '' + required: false + nightly: + type: boolean + description: Nightly build + default: false + required: false + publish: + type: boolean + description: Package publishing + default: false + required: false + +jobs: + + debian: + name: ${{ matrix.os.description }} + runs-on: ${{ matrix.os.architecture[0] == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }} + strategy: + fail-fast: false + matrix: + os: [ + { description: Linux (x86_64), architecture: [ amd64, linux/amd64 ], platform: x11 }, + { description: Raspberry Pi 1 & Zero 1 (armv6), architecture: [ armv6, linux/arm/v6 ], platform: rpi }, + { description: Raspberry Pi 2 (armv7), architecture: [ armv7, linux/arm/v7 ], platform: rpi }, + { description: Raspberry Pi 3/4/5 & Zero 2 (arm64), architecture: [ arm64, linux/arm64 ], platform: rpi } + ] + target_lookup: [ + { 'arm64': 'arm64', 'armv6': 'armv6l', 'armv7': 'armv7l' } + ] + + steps: + - name: โฌ‡ Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: ๐Ÿ”ง Prepare + shell: bash + run: | + tr -d '\n' < .version > temp && mv temp .version + if [[ "${{ inputs.event_name }}" == "pull_request" ]]; then + echo -n "+PR${{ inputs.pull_request_number }}" >> .version + elif [[ "${{ inputs.nightly }}" = true ]]; then + echo -n "+nightly$(date '+%Y%m%d')" >> .version + fi + + - name: ๐Ÿ’พ Download Pre-Build Dependencies + id: dependencies + uses: ./.github/actions/download-pre-built-deps + with: + os: debian_${{ inputs.codename }} + architecture: ${{ matrix.os.architecture[0] }} + qt_version: ${{ inputs.codename == 'bullseye' && matrix.os.architecture[0] == 'armv6' && '5' || '6' }} + build_type: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }} + + - name: ๐Ÿ‘ท Build ${{ env.HINT }} + shell: bash + run: | + mkdir deploy + docker run --rm --platform=${{ matrix.os.architecture[1] }} ${{ env.ENTRYPOINT }} \ + -v "${{ github.workspace }}/deploy:/deploy" \ + -v "${{ github.workspace }}:/source:rw" \ + -v "/tmp/deps:/tmp/deps:rw" \ + -w "/source" \ + ghcr.io/hyperion-project/debian:${{ env.DOCKER_TAG }} \ + /bin/bash -c "cmake --preset linux-${{ env.BUILD_TYPE }} ${{ steps.dependencies.outputs.cmakeArgs }} -DPLATFORM=${{ matrix.os.platform }} ${{ env.CPACK_SYSTEM_PROCESSOR }} && + cmake --build --preset linux-${{ env.BUILD_TYPE }} --target package && + cp /source/build/Hyperion-* /deploy/ 2>/dev/null" + env: + DOCKER_TAG: ${{ inputs.codename == 'bullseye' && matrix.os.architecture[0] == 'armv6' && inputs.codename || format('{0}-qt6', inputs.codename) }} + BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }} + ENTRYPOINT: ${{ matrix.os.architecture[0] != 'amd64' && '--entrypoint /usr/bin/env' || '' }} + CPACK_SYSTEM_PROCESSOR: ${{ matrix.os.architecture[0] != 'amd64' && format('-DCPACK_SYSTEM_PROCESSOR={0}', matrix.target_lookup[format('{0}', matrix.os.architecture[0])]) || '' }} + HINT: ${{ steps.dependencies.outputs.cmakeArgs != '' && '(with pre-built dependencies)' || '(full build)' }} + + - name: ๐Ÿ“ฆ Upload + if: ${{ inputs.publish || inputs.event_name == 'pull_request' }} + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.event_name == 'pull_request' && env.NAME || format('artifact-{0}', env.NAME) }} + path: ${{ inputs.event_name == 'pull_request' && 'deploy/*.tar.gz' || 'deploy/Hyperion-*' }} + env: + NAME: ${{ format('debian_{0}_{1}', inputs.codename, matrix.os.architecture[0]) }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000..a1d3403be --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,88 @@ +name: macOS Builds + +on: + # Reusable from push_pull.yml + workflow_call: + inputs: + event_name: + type: string + description: The event name + default: '' + required: false + pull_request_number: + type: string + description: The corresponding PR number + default: '' + required: false + nightly: + type: boolean + description: Nightly build + default: false + required: false + publish: + type: boolean + description: Package publishing + default: false + required: false + +jobs: + + macos: + name: ${{ matrix.os.description }} + runs-on: ${{ matrix.os.architecture == 'arm64' && 'macos-14' || 'macos-13' }} + strategy: + fail-fast: false + matrix: + os: [ + { architecture: 'arm64', description: 'macOS 14 (arm64)' }, + { architecture: 'x64', description: 'macOS 13 (x64)' } + ] + + steps: + - name: โฌ‡ Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: ๐Ÿ”ง Prepare + shell: bash + run: | + tr -d '\n' < .version > temp && mv temp .version + if [[ "${{ inputs.event_name }}" == "pull_request" ]]; then + echo -n "+PR${{ inputs.pull_request_number }}" >> .version + elif [[ "${{ inputs.nightly }}" = true ]]; then + echo -n "+nightly$(date '+%Y%m%d')" >> .version + fi + + - name: ๐Ÿ“ฅ Install dependencies + uses: tecolicom/actions-use-homebrew-tools@v1 + with: + tools: qt@6 coreutils + key: ${{ runner.os }}-${{ matrix.os.architecture }}-homebrew-packages + + - name: ๐Ÿ’พ Download Pre-Build Dependencies + id: dependencies + uses: ./.github/actions/download-pre-built-deps + with: + os: 'macos' + architecture: ${{ matrix.os.architecture }} + build_type: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }} + + - name: ๐Ÿ‘ท Build ${{ env.HINT }} + shell: bash + run: | + # Build + cmake --preset macos-${{ env.BUILD_TYPE }} ${{ steps.dependencies.outputs.cmakeArgs }} + cmake --build --preset macos-${{ env.BUILD_TYPE }} --target package + env: + BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }} + HINT: ${{ steps.dependencies.outputs.cmakeArgs != '' && '(with pre-built dependencies)' || '(full build)' }} + + - name: ๐Ÿ“ฆ Upload + if: ${{ inputs.publish || inputs.event_name == 'pull_request' }} + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.event_name == 'pull_request' && env.NAME || format('artifact-{0}', env.NAME) }} + path: 'build/Hyperion-*' + env: + NAME: ${{ format('macOS_{0}', matrix.os.architecture) }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 000000000..573fbe2b5 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,116 @@ +name: ๐ŸŒ™ Nightly builds +run-name: | + ${{ github.event_name == 'schedule' && 'โฐ Scheduled nightly build' || '' }} + ${{ github.event_name == 'workflow_dispatch' && '๐Ÿ‘ท Triggered nightly build' || '' }} + +# Create nightly builds at the end of every day +on: + schedule: + - cron: '0 0 * * *' + # This can be used to allow manually triggering nightlies from the web interface + workflow_dispatch: + inputs: + forceRun: + type: boolean + description: Force build and publish nightly packages to GitHub + default: false + required: false + +jobs: + + # Check if latest commit is less than 1 day old + check: + name: ๐Ÿ”€ Check latest commit + runs-on: ubuntu-latest + outputs: + should_run: ${{ steps.check_latest_commit.outputs.code_changes_since_yesterday }} + steps: + - uses: actions/checkout@v4 + id: checkout + + - name: โฌ‡ Check if latest commit is less than 1 day old + id: check_latest_commit + continue-on-error: true + run: | + if [[ -n "$(git rev-list --after="24 hours" ${{ steps.checkout.outputs.commit }})" ]]; then + echo "code_changes_since_yesterday=true" >> $GITHUB_OUTPUT + else + echo "code_changes_since_yesterday=false" >> $GITHUB_OUTPUT + fi + + # Build Debian Bullseye Artifacts + linux: + name: ๐Ÿง Debian Bullseye + if: ${{ needs.check.outputs.should_run == 'true' || inputs.forceRun }} + needs: [check] + uses: ./.github/workflows/debian.yml + secrets: inherit + with: + codename: 'bullseye' + publish: true + nightly: true + + # Build macOS Artifacts + macos: + name: ๐Ÿ macOS + if: ${{ needs.check.outputs.should_run == 'true' || inputs.forceRun }} + needs: [check] + uses: ./.github/workflows/macos.yml + secrets: inherit + with: + publish: true + nightly: true + + # Build Windows Artifacts + windows: + name: ๐ŸชŸ Windows + if: ${{ needs.check.outputs.should_run == 'true' || inputs.forceRun }} + needs: [check] + uses: ./.github/workflows/windows.yml + secrets: inherit + with: + publish: true + nightly: true + + # Publish to GitHub + nightly: + name: ๐Ÿš€ Publish to GitHub + if: ${{ needs.check.outputs.should_run == 'true' || inputs.forceRun }} + needs: [check, linux, macos, windows] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: ๐Ÿ’พ Download artifacts + uses: actions/download-artifact@v4 + with: + pattern: artifact-* + merge-multiple: true + + - name: ๐Ÿ“‘ Read nightly template + uses: markpatterson27/markdown-to-output@v1 + id: nightly_template + with: + filepath: ./.github/nightly.md + + - name: ๐Ÿ“ฆ Upload Nightly builds + uses: andelf/nightly-release@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: nightly + name: 'Nightly build $$' + prerelease: true + body: ${{ steps.nightly_template.outputs.body }} + files: | + *.deb + *.tar.gz + *.exe + *.zip + *.dmg + + - name: ๐Ÿงน Cleanup + uses: geekyeggo/delete-artifact@v5 + with: + name: artifact-* + failOnError: false diff --git a/.github/workflows/push_pull.yml b/.github/workflows/push_pull.yml index f9729c93f..f29dcac0d 100644 --- a/.github/workflows/push_pull.yml +++ b/.github/workflows/push_pull.yml @@ -15,26 +15,80 @@ on: jobs: - # GitHub Push/Pull Request (Release only on tagged commits) - github_build: - name: Qt ${{ matrix.qt_version }} Build ${{ matrix.qt_version == '6' && '(Testing))' || '' }} + # Build Debian Artifacts + linux: + name: ๐Ÿง Debian ${{ matrix.debian.codename[1] }} strategy: fail-fast: false matrix: - qt_version: ['5', '6'] - uses: ./.github/workflows/qt5_6.yml + debian: [ + { codename: [ 'bullseye', 'Bullseye' ] }, + { codename: [ 'bookworm', 'Bookworm (Testing)' ] } + ] + uses: ./.github/workflows/debian.yml secrets: inherit with: - qt_version: ${{ matrix.qt_version }} + codename: ${{ matrix.debian.codename[0] }} event_name: ${{ github.event_name }} pull_request_number: ${{ github.event.pull_request.number }} - publish: ${{ startsWith(github.event.ref, 'refs/tags') && matrix.qt_version == '5' }} + publish: ${{ startsWith(github.event.ref, 'refs/tags') && matrix.debian.codename[0] == 'bullseye' }} + + # Build macOS Artifacts + macos: + name: ๐Ÿ macOS + uses: ./.github/workflows/macos.yml + secrets: inherit + with: + event_name: ${{ github.event_name }} + pull_request_number: ${{ github.event.pull_request.number }} + publish: ${{ startsWith(github.event.ref, 'refs/tags') }} + + # Build Windows Artifacts + windows: + name: ๐ŸชŸ Windows + uses: ./.github/workflows/windows.yml + secrets: inherit + with: + event_name: ${{ github.event_name }} + pull_request_number: ${{ github.event.pull_request.number }} + publish: ${{ startsWith(github.event.ref, 'refs/tags') }} + + # Publish to GitHub + github_publish: + name: ๐Ÿš€ Publish to GitHub + 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 "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV + echo "VERSION=$(tr -d '\n' < .version)" >> $GITHUB_ENV + + - name: ๐Ÿ’พ Download artifacts + uses: actions/download-artifact@v4 + with: + pattern: artifact-* + path: all-artifacts + + - name: ๐Ÿ“ฆ Upload + uses: softprops/action-gh-release@v2 + with: + name: Hyperion ${{ env.VERSION }} + tag_name: ${{ env.TAG }} + files: "all-artifacts/**" + draft: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Build DEB/RPM Packages for APT/DNF Repository (runs only on tagged commits) repo_build: name: ๐Ÿš€ Let Hyperion build its own repository (APT/DNF) if: startsWith(github.event.ref, 'refs/tags') - needs: [ github_build ] + needs: [ github_publish ] runs-on: ubuntu-latest steps: - name: ๐Ÿ“ฒ Dispatch APT/DNF build diff --git a/.github/workflows/qt5_6.yml b/.github/workflows/qt5_6.yml deleted file mode 100644 index 8073f98be..000000000 --- a/.github/workflows/qt5_6.yml +++ /dev/null @@ -1,280 +0,0 @@ -name: GitHub Qt5/6 Builds - -on: - # Reusable from push_pull.yml - workflow_call: - inputs: - qt_version: - type: string - description: Build with this Qt version - default: '5' - required: false - event_name: - type: string - description: The event name - default: '' - required: false - pull_request_number: - type: string - description: The corresponding PR number - default: '' - required: false - publish: - type: boolean - description: Package publishing - default: false - required: false - -jobs: - -###################### -###### Linux ######### -###################### - - Linux: - name: ๐Ÿง ${{ matrix.os.description }} - runs-on: ${{ matrix.os.architecture[0] == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }} - strategy: - fail-fast: false - matrix: - os: [ - { distribution: debian, codename: buster, description: Debian Buster (x86_64), architecture: [ amd64, linux/amd64 ], platform: x11 }, - { distribution: debian, codename: buster, description: Debian Buster (Raspberry Pi 1 & Zero 1), architecture: [ armv6, linux/arm/v6 ], platform: rpi }, - { distribution: debian, codename: buster, description: Debian Buster (Raspberry Pi 2), architecture: [ armv7, linux/arm/v7 ], platform: rpi }, - { distribution: debian, codename: buster, description: Debian Buster (Raspberry Pi 3/4/5 & Zero 2), architecture: [ arm64, linux/arm64 ], platform: rpi }, - { distribution: debian, codename: bullseye, description: Debian Bullseye (x86_64), architecture: [ amd64, linux/amd64 ], platform: x11 }, - { distribution: debian, codename: bullseye, description: Debian Bullseye (Raspberry Pi 2), architecture: [ armv7, linux/arm/v7 ], platform: rpi }, - { distribution: debian, codename: bullseye, description: Debian Bullseye (Raspberry Pi 3/4/5 & Zero 2), architecture: [ arm64, linux/arm64 ], platform: rpi } - ] - target_lookup: [{ 'arm64': 'arm64', 'armv6': 'armv6l', 'armv7': 'armv7l' }] - isQt5: - - ${{ inputs.qt_version == '5' }} - exclude: - - isQt5: true - os: { distribution: debian, codename: bullseye } - - isQt5: false - os: { distribution: debian, codename: buster } - - steps: - - name: โฌ‡ Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: ๐Ÿ”ง Append PR number to version (PR only) - if: ${{ inputs.event_name == 'pull_request' }} - shell: bash - run: tr -d '\n' < .version > temp && mv temp .version && echo -n "+PR${{ inputs.pull_request_number }}" >> .version - - - name: ๐Ÿ’พ Download Pre-Build Dependencies - id: dependencies - uses: ./.github/actions/download-pre-built-deps - with: - os: ${{ matrix.os.distribution }}_${{ matrix.os.codename }} - architecture: ${{ matrix.os.architecture[0] }} - qt_version: ${{ inputs.qt_version }} - build_type: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }} - - - name: ๐Ÿ‘ท Build ${{ env.HINT }} - shell: bash - run: | - mkdir deploy - docker run --rm --platform=${{ matrix.os.architecture[1] }} ${{ env.ENTRYPOINT }} \ - -v "${{ github.workspace }}/deploy:/deploy" \ - -v "${{ github.workspace }}:/source:rw" \ - -v "/tmp/deps:/tmp/deps:rw" \ - -w "/source" \ - ghcr.io/hyperion-project/${{ env.DOCKER_IMAGE }}:${{ env.DOCKER_TAG }} \ - /bin/bash -c "cmake --preset linux-${{ env.BUILD_TYPE }} ${{ steps.dependencies.outputs.cmakeArgs }} -DPLATFORM=${{ matrix.os.platform }} ${{ env.CPACK_SYSTEM_PROCESSOR }} && - cmake --build --preset linux-${{ env.BUILD_TYPE }} --target package && - cp /source/build/Hyperion-* /deploy/ 2>/dev/null" - env: - DOCKER_IMAGE: ${{ matrix.os.distribution }} - DOCKER_TAG: ${{ matrix.os.codename }}${{ inputs.qt_version == '6' && '-qt6' || '' }} - BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }} - ENTRYPOINT: ${{ matrix.os.architecture[0] != 'amd64' && '--entrypoint /usr/bin/env' || '' }} - CPACK_SYSTEM_PROCESSOR: ${{ matrix.os.architecture[0] != 'amd64' && format('-DCPACK_SYSTEM_PROCESSOR={0}', matrix.target_lookup[format('{0}', matrix.os.architecture[0])]) || '' }} - HINT: ${{ steps.dependencies.outputs.cmakeArgs != '' && '(with pre-built dependencies)' || '(full build)' }} - - - name: ๐Ÿ“ฆ Upload - if: ${{ inputs.publish || inputs.event_name == 'pull_request' }} - uses: actions/upload-artifact@v4 - with: - name: ${{ inputs.event_name == 'pull_request' && env.NAME || format('artifact-{0}', env.NAME) }} - path: ${{ inputs.event_name == 'pull_request' && 'deploy/*.tar.gz' || 'deploy/Hyperion-*' }} - env: - NAME: ${{ format('{0}_{1}_{2}{3}', matrix.os.distribution, matrix.os.codename, matrix.os.architecture[0], inputs.qt_version == '6' && '_qt6' || '') }} - -###################### -###### macOS ######### -###################### - - macOS: - name: ๐Ÿ macOS ${{ matrix.architecture }} - runs-on: ${{ matrix.architecture == 'arm64' && 'macos-14' || 'macos-13' }} - strategy: - fail-fast: false - matrix: - architecture: [ arm64, x64 ] - - steps: - - name: โฌ‡ Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: ๐Ÿ”ง Append Pull Request number to version (PR only) - if: ${{ inputs.event_name == 'pull_request' }} - shell: bash - run: tr -d '\n' < .version > temp && mv temp .version && echo -n "+PR${{ inputs.pull_request_number }}" >> .version - - - name: ๐Ÿ“ฅ Install dependencies - uses: tecolicom/actions-use-homebrew-tools@v1 - with: - tools: qt@${{ inputs.qt_version }} coreutils - key: ${{ runner.os }}-${{ matrix.architecture }}-homebrew-packages-${{ inputs.qt_version }} - - - name: ๐Ÿ’พ Download Pre-Build Dependencies - id: dependencies - uses: ./.github/actions/download-pre-built-deps - with: - os: 'macos' - architecture: ${{ matrix.architecture }} - qt_version: ${{ inputs.qt_version }} - build_type: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }} - - - name: ๐Ÿ‘ท Build ${{ env.HINT }} - shell: bash - run: | - # Build - cmake --preset macos-${{ env.BUILD_TYPE }} ${{ steps.dependencies.outputs.cmakeArgs }} - cmake --build --preset macos-${{ env.BUILD_TYPE }} --target package - env: - BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }} - HINT: ${{ steps.dependencies.outputs.cmakeArgs != '' && '(with pre-built dependencies)' || '(full build)' }} - - - name: ๐Ÿ“ฆ Upload - if: ${{ inputs.publish || inputs.event_name == 'pull_request' }} - uses: actions/upload-artifact@v4 - with: - name: ${{ inputs.event_name == 'pull_request' && env.NAME || format('artifact-{0}', env.NAME) }} - path: 'build/Hyperion-*' - env: - NAME: ${{ inputs.qt_version == '6' && format('macOS_{0}_qt6', matrix.architecture) || format('macOS_{0}', matrix.architecture) }} - -###################### -###### Windows ####### -###################### - - windows: - name: ๐ŸชŸ Windows ${{ matrix.architecture }} - runs-on: ${{ matrix.architecture == 'arm64' && 'windows-11-arm' || 'windows-2022' }} - env: - LIBJPEG_TURBO_VERSION: 3.1.0 - strategy: - fail-fast: false - matrix: - architecture: [ arm64, x64 ] - isQt5: - - ${{ inputs.qt_version == '5' }} - exclude: - - isQt5: true - architecture: arm64 - - steps: - - name: โฌ‡ Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: ๐Ÿ”ง Append Pull Request number to version (PR only) - if: ${{ inputs.event_name == 'pull_request' }} - shell: bash - run: tr -d '\n' < .version > temp && mv temp .version && echo -n "+PR${{ inputs.pull_request_number }}" >> .version - - - name: ๐Ÿ“ฅ Install Python - uses: actions/setup-python@v5 - with: - python-version: '3.13.3' - architecture: ${{ matrix.architecture }} - - - name: ๐Ÿ“ฅ Install Qt - # If the following PR is merged, you can switch back to jurplel/install-qt-action - # https://github.com/jurplel/install-qt-action/pull/273 - uses: jdpurcell/install-qt-action@v5 - with: - version: ${{ inputs.qt_version == '6' && '6.8.*' || '5.15.*' }} - target: 'desktop' - modules: ${{ inputs.qt_version == '6' && 'qtserialport qtwebsockets' || '' }} - cache: 'true' - cache-key-prefix: 'cache-qt-windows' - setup-python: 'false' - - - name: ๐Ÿ“ฅ Install latest CMake and Ninja - uses: lukka/get-cmake@latest - - - name: ๐Ÿ› ๏ธ Setup MSVC - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: ${{ matrix.architecture }} - - - name: ๐Ÿ’พ Download Pre-Build Dependencies - id: dependencies - uses: ./.github/actions/download-pre-built-deps - with: - os: 'windows' - architecture: ${{ matrix.architecture }} - qt_version: ${{ inputs.qt_version }} - build_type: ${{ inputs.event_name == 'pull_request' && 'relwithdebinfo' || 'release' }} - - - name: ๐Ÿ‘ท Build ${{ env.HINT }} - shell: cmd - run: | - cmake --preset windows-${{ env.BUILD_TYPE }} ${{ steps.dependencies.outputs.cmakeArgs }} - cmake --build --preset windows-${{ env.BUILD_TYPE }} --target package - env: - BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'relwithdebinfo' || 'release' }} - HINT: ${{ steps.dependencies.outputs.cmakeArgs != '' && '(with pre-built dependencies)' || '(full build)' }} - - - name: ๐Ÿ“ฆ Upload - if: ${{ inputs.publish || inputs.event_name == 'pull_request' }} - uses: actions/upload-artifact@v4 - with: - name: ${{ inputs.event_name == 'pull_request' && env.NAME || format('artifact-{0}', env.NAME) }} - path: ${{ inputs.event_name == 'pull_request' && 'build/*.exe' || 'build/Hyperion-*' }} - env: - NAME: ${{ inputs.qt_version == '6' && format('windows_{0}_qt6', matrix.architecture) || format('windows_{0}', matrix.architecture) }} - -##################################### -###### Publish GitHub Releases ###### -##################################### - - github_publish: - name: ๐Ÿš€ Publish GitHub Releases - if: ${{ inputs.qt_version == '5' && inputs.publish }} - needs: [Linux, macOS, windows] - runs-on: ubuntu-latest - steps: - - name: โฌ‡ Checkout - uses: actions/checkout@v4 - - - name: ๐Ÿ”ง Prepare - run: | - echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV - echo "VERSION=$(tr -d '\n' < .version)" >> $GITHUB_ENV - - - name: ๐Ÿ’พ Artifact download - uses: actions/download-artifact@v4 - with: - pattern: artifact-* - path: all-artifacts - - - name: ๐Ÿ“ฆ Upload - uses: softprops/action-gh-release@v2 - with: - name: Hyperion ${{ env.VERSION }} - tag_name: ${{ env.TAG }} - files: "all-artifacts/**" - draft: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 000000000..1e4aeffc1 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,109 @@ +name: Windows Builds + +on: + # Reusable from push_pull.yml + workflow_call: + inputs: + event_name: + type: string + description: The event name + default: '' + required: false + pull_request_number: + type: string + description: The corresponding PR number + default: '' + required: false + nightly: + type: boolean + description: Nightly build + default: false + required: false + publish: + type: boolean + description: Package publishing + default: false + required: false + +jobs: + + windows: + name: ${{ matrix.os.description }} + runs-on: ${{ matrix.os.architecture == 'arm64' && 'windows-11-arm' || 'windows-2022' }} + env: + LIBJPEG_TURBO_VERSION: 3.1.0 + strategy: + fail-fast: false + matrix: + os: [ + { architecture: 'arm64', description: 'Windows 11 (arm64)' }, + { architecture: 'x64', description: 'Windows 11 (x64)' } + ] + + steps: + - name: โฌ‡ Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: ๐Ÿ”ง Prepare + shell: bash + run: | + tr -d '\n' < .version > temp && mv temp .version + if [[ "${{ inputs.event_name }}" == "pull_request" ]]; then + echo -n "+PR${{ inputs.pull_request_number }}" >> .version + elif [[ "${{ inputs.nightly }}" = true ]]; then + echo -n "+nightly$(date '+%Y%m%d')" >> .version + fi + + - name: ๐Ÿ“ฅ Install Python + uses: actions/setup-python@v5 + with: + python-version: '3.13.3' + architecture: ${{ matrix.os.architecture }} + + - name: ๐Ÿ“ฅ Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: '6.8.*' + target: 'desktop' + modules: 'qtserialport qtwebsockets' + cache: 'true' + cache-key-prefix: 'cache-qt-windows' + setup-python: 'false' + + - name: ๐Ÿ“ฅ Install latest CMake and Ninja + uses: lukka/get-cmake@latest + + - name: ๐Ÿ› ๏ธ Setup MSVC + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.os.architecture }} + + - name: ๐Ÿ’พ Download Pre-Build Dependencies + id: dependencies + uses: ./.github/actions/download-pre-built-deps + with: + os: 'windows' + architecture: ${{ matrix.os.architecture }} + build_type: ${{ inputs.event_name == 'pull_request' && 'relwithdebinfo' || 'release' }} + + - name: ๐Ÿ‘ท Build ${{ env.HINT }} + shell: cmd + run: | + cmake --preset windows-${{ env.BUILD_TYPE }} ${{ steps.dependencies.outputs.cmakeArgs }} + cmake --build --preset windows-${{ env.BUILD_TYPE }} --target package + env: + BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'relwithdebinfo' || 'release' }} + HINT: ${{ steps.dependencies.outputs.cmakeArgs != '' && '(with pre-built dependencies)' || '(full build)' }} + + - name: ๐Ÿ“ฆ Upload + if: ${{ inputs.publish || inputs.event_name == 'pull_request' }} + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.event_name == 'pull_request' && env.NAME || format('artifact-{0}', env.NAME) }} + path: | + build/Hyperion-* + !build/*.json + env: + NAME: ${{ format('windows_{0}', matrix.os.architecture) }} diff --git a/.version b/.version index d123e8fe8..879b416e6 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.0.17-beta.3 +2.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2690b2aa9..8be68e3ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/hyperion-project/hyperion.ng/compare/2.0.16...HEAD) +## [Unreleased](https://github.com/hyperion-project/hyperion.ng/compare/2.1...HEAD) + +## [2.1](https://github.com/hyperion-project/hyperion.ng/releases/tag/2.1) - 2025-06 ### โš ๏ธ Breaking Changes @@ -153,6 +155,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Deprecated: DirectX grabber in favour of the new DXGI DDA grabber - Removed "-c" console option on Windows. Hyperion can be started via terminal to get the required console output +#### Builds +- Removed builds for following operating system LTS or software component versions, as they are End-of-Life and do not receive maintenance nor security updates any longer + - Debian Buster + - Ubuntu Focal Fossa (20.04) + - Qt5 + ## [2.0.16](https://github.com/hyperion-project/hyperion.ng/releases/tag/2.0.16) - 2024-01 ### Added diff --git a/cmake/Packaging.cmake b/cmake/Packaging.cmake index f95806f64..fb33723fb 100644 --- a/cmake/Packaging.cmake +++ b/cmake/Packaging.cmake @@ -104,7 +104,7 @@ if(CPACK_GENERATOR MATCHES "DragNDrop") set(CPACK_COMMAND_HDIUTIL "${CMAKE_SOURCE_DIR}/cmake/macos/hdiutilwrap.sh") endif() -# NSIS (Windows only) +# Inno Setup (Windows only) if(WIN32) set(CPACK_EXTERNAL_PACKAGE_SCRIPT ${CMAKE_SOURCE_DIR}/cmake/windows/inno/innosetup.cmake) set(CPACK_EXTERNAL_ENABLE_STAGING ON) diff --git a/cmake/linux/BundleLinux.cmake.in b/cmake/linux/BundleLinux.cmake.in index a4e465ece..f8aca7092 100644 --- a/cmake/linux/BundleLinux.cmake.in +++ b/cmake/linux/BundleLinux.cmake.in @@ -5,101 +5,64 @@ set(PYTHON_MODULES_DIR "@PYTHON_MODULES_DIR@") set(PYTHON_VERSION "@PYTHON_VERSION@") set(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@") -set(SYSTEM_LIBS_SKIP - "libatomic" - "libc" - "libdbus" - "libdl" - "libexpat" - "libfontconfig" - "libgcc_s" - "libgcrypt" - "libglib" - "libglib-2" - "libgpg-error" - "liblz4" - "liblzma" - "libm" - "libpcre" - "libpcre2" - "libpthread" - "librt" - "libstdc++" - "libsystemd" - "libudev" - "libusb" - "libusb-1" - "libutil" - "libuuid" - "libz" +set(SYSTEM_LIBS_SKIP "") +list(APPEND SYSTEM_LIBS_SKIP + libatomic libc libdbus libdl libexpat libfontconfig libgcc_s libgcrypt + libglib libglib-2 libgpg-error liblz4 liblzma libm libpcre libpcre2 + libpthread librt libstdc++ libsystemd libudev libusb libusb-1 libutil + libuuid libz ) -# Extract dependencies ignoring the system ones -include(GetPrerequisites) -get_prerequisites("${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME}" DEPENDENCIES 0 1 "" "") - -# Append symlink and non-symlink dependencies to the list -set(PREREQUISITE_LIBS "") -foreach(DEPENDENCY ${DEPENDENCIES}) - get_filename_component(resolved ${DEPENDENCY} NAME_WE) - list(FIND SYSTEM_LIBS_SKIP ${resolved} _index) - if(${_index} GREATER -1) - continue() # Skip system libraries - else() - gp_resolve_item("${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME}" "${DEPENDENCY}" "" "" resolved_file) +function(collect_dependencies input_file output_var) + include(GetPrerequisites) + get_prerequisites("${input_file}" LOCAL_DEPS 0 1 "" "") + foreach(DEP ${LOCAL_DEPS}) + get_filename_component(resolved ${DEP} NAME_WE) + list(FIND SYSTEM_LIBS_SKIP ${resolved} _index) + if(_index GREATER -1) + continue() + endif() + gp_resolve_item("${input_file}" "${DEP}" "" "" resolved_file) get_filename_component(resolved_file ${resolved_file} ABSOLUTE) - gp_append_unique(PREREQUISITE_LIBS ${resolved_file}) + gp_append_unique(${output_var} ${resolved_file}) get_filename_component(file_canonical ${resolved_file} REALPATH) - gp_append_unique(PREREQUISITE_LIBS ${file_canonical}) - endif() -endforeach() + gp_append_unique(${output_var} ${file_canonical}) + endforeach() + set(${output_var} "${${output_var}}" PARENT_SCOPE) +endfunction() +# Extract dependencies ignoring the system ones +set(PREREQUISITE_LIBS "") +collect_dependencies("${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME}" PREREQUISITE_LIBS) + +# Get Qt plugin path execute_process( - COMMAND - "${QMAKE_EXECUTABLE}" -query QT_INSTALL_PLUGINS - OUTPUT_VARIABLE - QT_PLUGINS_DIR + COMMAND "${QMAKE_EXECUTABLE}" -query QT_INSTALL_PLUGINS + OUTPUT_VARIABLE QT_PLUGINS_DIR OUTPUT_STRIP_TRAILING_WHITESPACE ) # Copy Qt plugins to 'share/hyperion/lib' foreach(PLUGIN "platforms" "sqldrivers" "imageformats" "tls" "wayland-shell-integration") - if(EXISTS ${QT_PLUGINS_DIR}/${PLUGIN}) - file(GLOB files "${QT_PLUGINS_DIR}/${PLUGIN}/*.so") - foreach(file ${files}) - get_prerequisites(${file} PLUGINS 0 1 "" "") - foreach(DEPENDENCY ${PLUGINS}) - get_filename_component(resolved ${DEPENDENCY} NAME_WE) - list(FIND SYSTEM_LIBS_SKIP ${resolved} _index) - if(${_index} GREATER -1) - continue() # Skip system libraries - else() - gp_resolve_item("${file}" "${DEPENDENCY}" "" "" resolved_file) - get_filename_component(resolved_file ${resolved_file} ABSOLUTE) - gp_append_unique(PREREQUISITE_LIBS ${resolved_file}) - get_filename_component(file_canonical ${resolved_file} REALPATH) - gp_append_unique(PREREQUISITE_LIBS ${file_canonical}) - endif() - endforeach() - - file(INSTALL - FILES - ${file} - DESTINATION - "${CMAKE_INSTALL_PREFIX}/share/hyperion/lib/${PLUGIN}" - ) + set(PLUGIN_DIR "${QT_PLUGINS_DIR}/${PLUGIN}") + if(EXISTS ${PLUGIN_DIR}) + file(GLOB PLUGIN_FILES "${PLUGIN_DIR}/*.so") + foreach(file ${PLUGIN_FILES}) + collect_dependencies("${file}" PREREQUISITE_LIBS) + file(INSTALL FILES ${file} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/hyperion/lib/${PLUGIN}") endforeach() endif() endforeach() + # Copy dependencies to 'share/hyperion/lib' file(INSTALL FILES ${PREREQUISITE_LIBS} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/hyperion/lib") # Create a qt.conf file in 'share/hyperion/bin' to override hard-coded search paths in Qt plugins file(WRITE "${CMAKE_INSTALL_PREFIX}/share/hyperion/bin/qt.conf" "[Paths]\nPlugins=../lib/\n") +# Copy Python modules to 'share/hyperion/lib/pythonMAJOR.MINOR' and ignore the unnecessary stuff listed below if(NOT PYTHON_MODULES_DIR STREQUAL "" AND NOT PYTHON_VERSION STREQUAL "") - # Copy Python modules to 'share/hyperion/lib/pythonMAJOR.MINOR' and ignore the unnecessary stuff listed below string(REGEX MATCHALL "[0-9]+" VERSION ${PYTHON_VERSION}) list(GET VERSION 0 PYTHON_VERSION_MAJOR) list(GET VERSION 1 PYTHON_VERSION_MINOR) diff --git a/cmake/linux/desktop/hyperion.metainfo.xml b/cmake/linux/desktop/hyperion.metainfo.xml index cca92956d..3bd60a203 100644 --- a/cmake/linux/desktop/hyperion.metainfo.xml +++ b/cmake/linux/desktop/hyperion.metainfo.xml @@ -1,5 +1,5 @@ - + com.hyperion-project.hyperion MIT @@ -22,6 +22,7 @@ https://poeditor.com/join/project/Y4F6vHRFjA + diff --git a/cmake/windows/win.rc.in b/cmake/windows/win.rc.in index 1eb305428..8c2017a04 100644 --- a/cmake/windows/win.rc.in +++ b/cmake/windows/win.rc.in @@ -1,7 +1,19 @@ +#ifndef HYPERION_VERSION_MAJOR +#define HYPERION_VERSION_MAJOR 2 +#endif + +#ifndef HYPERION_VERSION_MINOR +#define HYPERION_VERSION_MINOR 0 +#endif + +#ifndef HYPERION_VERSION_PATCH +#define HYPERION_VERSION_PATCH 0 +#endif + IDI_ICON1 ICON DISCARDABLE "${WIN_RC_ICON_PATH}" 1 VERSIONINFO - FILEVERSION ${HYPERION_VERSION_MAJOR},${HYPERION_VERSION_MINOR},${HYPERION_VERSION_PATCH},0 - PRODUCTVERSION ${HYPERION_VERSION_MAJOR},${HYPERION_VERSION_MINOR},${HYPERION_VERSION_PATCH},0 + FILEVERSION HYPERION_VERSION_MAJOR,HYPERION_VERSION_MINOR,HYPERION_VERSION_PATCH,0 + PRODUCTVERSION HYPERION_VERSION_MAJOR,HYPERION_VERSION_MINOR,HYPERION_VERSION_PATCH,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L diff --git a/src/hyperion-qt/CMakeLists.txt b/src/hyperion-qt/CMakeLists.txt index 3818676ab..4f358a881 100644 --- a/src/hyperion-qt/CMakeLists.txt +++ b/src/hyperion-qt/CMakeLists.txt @@ -1,18 +1,11 @@ cmake_minimum_required(VERSION 3.10.0) project(hyperion-qt) -if(WIN32) - # generate windows .rc file for this binary - string(REPLACE "/" "\\\\" WIN_RC_ICON_PATH ${CMAKE_SOURCE_DIR}/cmake/windows/inno/gfx/installer.ico) - configure_file(${CMAKE_SOURCE_DIR}/cmake/windows/win.rc.in ${CMAKE_BINARY_DIR}/win.rc) - set(WIN_RC_FILE ${CMAKE_BINARY_DIR}/win.rc) -endif() - add_executable(${PROJECT_NAME} QtWrapper.h QtWrapper.cpp hyperion-qt.cpp - ${WIN_RC_FILE} + $<$:${CMAKE_BINARY_DIR}/win.rc> ) target_link_libraries(${PROJECT_NAME} diff --git a/src/hyperion-remote/CMakeLists.txt b/src/hyperion-remote/CMakeLists.txt index f788a850a..cf0c21f46 100644 --- a/src/hyperion-remote/CMakeLists.txt +++ b/src/hyperion-remote/CMakeLists.txt @@ -1,18 +1,11 @@ cmake_minimum_required(VERSION 3.10.0) project(hyperion-remote) -if(WIN32) - # generate windows .rc file for this binary - string(REPLACE "/" "\\\\" WIN_RC_ICON_PATH ${CMAKE_SOURCE_DIR}/cmake/windows/inno/gfx/installer.ico) - configure_file(${CMAKE_SOURCE_DIR}/cmake/windows/win.rc.in ${CMAKE_BINARY_DIR}/win.rc) - set(WIN_RC_FILE ${CMAKE_BINARY_DIR}/win.rc) -endif() - add_executable(${PROJECT_NAME} JsonConnection.h JsonConnection.cpp hyperion-remote.cpp - ${WIN_RC_FILE} + $<$:${CMAKE_BINARY_DIR}/win.rc> ) target_link_libraries(${PROJECT_NAME} diff --git a/src/hyperiond/CMakeLists.txt b/src/hyperiond/CMakeLists.txt index baa8df9ce..b1c7ef19a 100644 --- a/src/hyperiond/CMakeLists.txt +++ b/src/hyperiond/CMakeLists.txt @@ -7,10 +7,15 @@ project(hyperiond) get_target_property(QMAKE_EXECUTABLE Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION) if(WIN32) - # generate windows .rc file for this binary + # generate windows .rc file string(REPLACE "/" "\\\\" WIN_RC_ICON_PATH ${CMAKE_SOURCE_DIR}/cmake/windows/inno/gfx/installer.ico) configure_file(${CMAKE_SOURCE_DIR}/cmake/windows/win.rc.in ${CMAKE_BINARY_DIR}/win.rc) set(WIN_RC_FILE ${CMAKE_BINARY_DIR}/win.rc) + set_property(SOURCE "${WIN_RC_FILE}" APPEND PROPERTY COMPILE_DEFINITIONS + $<$:HYPERION_VERSION_MAJOR=${HYPERION_VERSION_MAJOR}> + $<$:HYPERION_VERSION_MINOR=${HYPERION_VERSION_MINOR}> + $<$:HYPERION_VERSION_PATCH=${HYPERION_VERSION_PATCH}> + ) # Search for windeployqt target (qt6 has the target natively) otherwise create it. get_filename_component(QT_BIN_DIR ${QMAKE_EXECUTABLE} DIRECTORY)