diff --git a/.github/autobuild/android.sh b/.github/autobuild/android.sh index f03af98f13..3b9ba1d841 100755 --- a/.github/autobuild/android.sh +++ b/.github/autobuild/android.sh @@ -49,7 +49,7 @@ set -eu # Some of the following version pinnings are semi-automatically checked for -# updates. Update .github/workflows/bump-dependencies.yaml when renaming those: +# updates. Update .github/workflows/bump-dependencies.yml when renaming those: COMMANDLINETOOLS_VERSION=6858069 ANDROID_NDK_VERSION=r21d ANDROID_PLATFORM=android-30 diff --git a/.github/autobuild/ios-dependencies.sh b/.github/autobuild/ios-dependencies.sh new file mode 100644 index 0000000000..ada76cbba3 --- /dev/null +++ b/.github/autobuild/ios-dependencies.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# The following version pinnings are semi-automatically checked for updates. +# Verify .github/workflows/bump-dependencies.yml when changing those manually: + +# Values are consumed by ios.sh and the dependency cache key. +# shellcheck disable=SC2034 +AQTINSTALL_VERSION=3.3.0 +QT_VERSION=5.15.2 diff --git a/.github/autobuild/ios.sh b/.github/autobuild/ios.sh index 952b88935f..98105e7fd8 100755 --- a/.github/autobuild/ios.sh +++ b/.github/autobuild/ios.sh @@ -48,10 +48,12 @@ set -eu -QT_DIR=/opt/qt -# The following version pinnings are semi-automatically checked for -# updates. Verify .github/workflows/bump-dependencies.yaml when changing those manually: -AQTINSTALL_VERSION=3.3.0 +PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" +readonly PROJECT_DIR +# shellcheck disable=SC1091 +source "${PROJECT_DIR}/.github/autobuild/ios-dependencies.sh" + +QT_DIR=${HOME}/qt if [[ ! ${QT_VERSION:-} =~ [0-9]+\.[0-9]+\..* ]]; then echo "Environment variable QT_VERSION must be set to a valid Qt version" @@ -63,13 +65,13 @@ if [[ ! ${JAMULUS_BUILD_VERSION:-} =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then fi setup() { - if [[ -d "${QT_DIR}" ]]; then + # We may need to create the Qt installation directory and chown it to the runner user to fix permissions + sudo mkdir -p "${QT_DIR}" + sudo chown -R "$(whoami)" "${QT_DIR}" + if [[ -x "${QT_DIR}/${QT_VERSION}/ios/bin/qmake" ]]; then echo "Using Qt installation from previous run (actions/cache)" else echo "Installing Qt" - # We may need to create the Qt installation directory and chown it to the runner user to fix permissions - sudo mkdir -p "${QT_DIR}" - sudo chown "$(whoami)" "${QT_DIR}" # Create and enter virtual environment python3 -m venv venv # Must hide directory as it just gets created during execution of the previous command and cannot be found by shellcheck diff --git a/.github/autobuild/mac-dependencies_qt5.sh b/.github/autobuild/mac-dependencies_qt5.sh new file mode 100644 index 0000000000..1e11b5dff6 --- /dev/null +++ b/.github/autobuild/mac-dependencies_qt5.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# The following version pinnings are semi-automatically checked for updates. +# Verify .github/workflows/bump-dependencies.yml when changing those manually: + +# Values are consumed by .github/autobuild/mac.sh, mac/deploy_mac.sh and the dependency cache key. +# shellcheck disable=SC2034 +AQTINSTALL_VERSION=3.3.0 +QT_VERSION=5.15.2 +CREATEDMG_VERSION=1.3.0 diff --git a/.github/autobuild/mac-dependencies_qt6.sh b/.github/autobuild/mac-dependencies_qt6.sh new file mode 100644 index 0000000000..4db1329329 --- /dev/null +++ b/.github/autobuild/mac-dependencies_qt6.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# The following version pinnings are semi-automatically checked for updates. +# Verify .github/workflows/bump-dependencies.yml when changing those manually: + +# Values are consumed by .github/autobuild/mac.sh, mac/deploy_mac.sh and the dependency cache key. +# shellcheck disable=SC2034 +AQTINSTALL_VERSION=3.3.0 +QT_VERSION=6.10.2 +CREATEDMG_VERSION=1.3.0 diff --git a/.github/autobuild/mac.sh b/.github/autobuild/mac.sh index a70cedc9e9..2cba53f124 100755 --- a/.github/autobuild/mac.sh +++ b/.github/autobuild/mac.sh @@ -48,10 +48,13 @@ set -eu +QT=${QT:-6} +PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" +readonly PROJECT_DIR +# shellcheck disable=SC1090 +source "${PROJECT_DIR}/.github/autobuild/mac-dependencies_qt${QT}.sh" + QT_DIR=~/qt -# The following version pinnings are semi-automatically checked for -# updates. Verify .github/workflows/bump-dependencies.yaml when changing those manually: -AQTINSTALL_VERSION=3.3.0 TARGET_ARCHS="${TARGET_ARCHS:-}" @@ -65,7 +68,8 @@ if [[ ! ${JAMULUS_BUILD_VERSION:-} =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then fi setup() { - if [[ -d "${QT_DIR}" ]]; then + if [[ -x "${QT_DIR}/${QT_VERSION}/macos/bin/qmake" && + -x "${QT_DIR}/${QT_VERSION}/macos/bin/macdeployqt" ]]; then echo "Using Qt installation from previous run (actions/cache)" else echo "Installing Qt..." @@ -194,7 +198,7 @@ build_app_as_dmg_installer() { if prepare_signing; then BUILD_ARGS=("-s" "${MACOS_CERTIFICATE_DEV_ID_APPLICATION_ID}" "-a" "${MAC_STORE_APP_CERT_ID}" "-i" "${MACOS_CERTIFICATE_INST_DISTRIBUTION_ID}" "-k" "${KEYCHAIN_PASSWORD}") fi - TARGET_ARCHS="${TARGET_ARCHS}" ./mac/deploy_mac.sh "${BUILD_ARGS[@]}" + QT=${QT} TARGET_ARCHS="${TARGET_ARCHS}" ./mac/deploy_mac.sh "${BUILD_ARGS[@]}" } pass_artifact_to_job() { diff --git a/.github/autobuild/windows-dependencies.ps1 b/.github/autobuild/windows-dependencies.ps1 new file mode 100644 index 0000000000..28dba4c747 --- /dev/null +++ b/.github/autobuild/windows-dependencies.ps1 @@ -0,0 +1,19 @@ +# The following version pinnings are semi-automatically checked for updates. +# Verify .github/workflows/bump-dependencies.yml when changing those manually: + +# Values are consumed by .github/autobuild/windows.ps1, windows/deploy_windows.ps1 and the dependency cache key. +$Qt32Version = "5.15.2" +$Qt64Version = "6.10.2" +$QtCompile32 = "msvc2019" +$QtCompile64 = "msvc2022" +$AqtinstallVersion = "3.3.0" +$JackVersion = "1.9.22" +$JomVersion = "1.1.2" + +# Important: +# - Do not update ASIO SDK without checking for license-related changes. +# - Do not copy (parts of) the ASIO SDK into the Jamulus source tree without +# further consideration as it would make the license situation more complicated. +$AsioSDKVersion = "ASIO-SDK_2.3.4_2025-10-15" + +$NsisVersion = "3.12" diff --git a/.github/autobuild/windows.ps1 b/.github/autobuild/windows.ps1 index 263fdc20d6..80d48c5d75 100644 --- a/.github/autobuild/windows.ps1 +++ b/.github/autobuild/windows.ps1 @@ -68,15 +68,11 @@ $ProgressPreference = 'SilentlyContinue' $QtDir = 'C:\Qt' $ChocoCacheDir = 'C:\ChocoCache' $DownloadCacheDir = 'C:\AutobuildCache' -# The following version pinnings are semi-automatically checked for -# updates. Verify .github/workflows/bump-dependencies.yaml when changing those manually: -$Qt32Version = "5.15.2" -$Qt64Version = "6.10.2" -$AqtinstallVersion = "3.3.0" -$JackVersion = "1.9.22" -$Msvc32Version = "win32_msvc2019" -$Msvc64Version = "win64_msvc2022_64" -$JomVersion = "1.1.2" +$DependencySuffix = '' +. "$PSScriptRoot\windows-dependencies.ps1" + +$Msvc32Version = "${QtCompile32}" +$Msvc64Version = "${QtCompile64}_64" # Compose JACK download urls $JackBaseUrl = "https://github.com/jackaudio/jack2-releases/releases/download/v${JackVersion}/jack2-win" @@ -150,7 +146,8 @@ Function Install-Qt Function Ensure-Qt { - if ( Test-Path -Path $QtDir ) + if ( (Test-Path -Path "$QtDir\$Qt32Version\${Msvc32Version}\bin\qmake.exe" -PathType Leaf) -and + (Test-Path -Path "$QtDir\$Qt64Version\${Msvc64Version}\bin\qmake.exe" -PathType Leaf) ) { echo "Using Qt installation from previous run (actions/cache)" return @@ -165,10 +162,10 @@ Function Ensure-Qt } echo "Get Qt 64 bit..." - Install-Qt "${Qt64Version}" "${Msvc64Version}" + Install-Qt "${Qt64Version}" "win64_${Msvc64Version}" echo "Get Qt 32 bit..." - Install-Qt "${Qt32Version}" "${Msvc32Version}" + Install-Qt "${Qt32Version}" "win32_${Msvc32Version}" } Function Ensure-jom @@ -238,7 +235,7 @@ Function Build-App-With-Installer { $ExtraArgs += ("-BuildOption", $BuildOption) } - powershell ".\windows\deploy_windows.ps1" "C:\Qt\${Qt32Version}" "C:\Qt\${Qt64Version}" @ExtraArgs + powershell ".\windows\deploy_windows.ps1" @ExtraArgs if ( !$? ) { throw "deploy_windows.ps1 failed with exit code $LastExitCode" diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 0d4abb439b..4fa0c1fcd7 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -226,40 +226,44 @@ jobs: - config_name: MacOS (artifacts) target_os: macos building_on_os: macos-15 - base_command: QT_VERSION=6.10.2 SIGN_IF_POSSIBLE=1 TARGET_ARCHS="x86_64 arm64" ./.github/autobuild/mac.sh + base_command: QT=6 SIGN_IF_POSSIBLE=1 TARGET_ARCHS="x86_64 arm64" ./.github/autobuild/mac.sh # Disable CodeQL on mac as it interferes with signing the binaries (signing hangs, see #2563 and #2564) run_codeql: false xcode_version: 16.3.0 + dependency_cache_key: qt6 is_main_build_target: true # Reminder: If Legacy is removed, be sure to add a dedicated job for CodeQL again. - config_name: MacOS Legacy (artifacts+CodeQL) target_os: macos building_on_os: macos-15-intel - base_command: QT_VERSION=5.15.2 SIGN_IF_POSSIBLE=0 ARTIFACT_SUFFIX=_legacy ./.github/autobuild/mac.sh + base_command: QT=5 SIGN_IF_POSSIBLE=0 ARTIFACT_SUFFIX=_legacy ./.github/autobuild/mac.sh # Enable CodeQL on mac legacy as this version does not get signed run_codeql: true # macos-15-intel ships with Xcode 16.x; while Qt5 is older, Xcode 16 still supports building it # https://developer.apple.com/support/xcode/ # https://xcodereleases.com/ xcode_version: 16.3.0 + dependency_cache_key: qt5 is_main_build_target: true - config_name: iOS (artifacts) target_os: ios building_on_os: macos-15 - base_command: QT_VERSION=5.15.2 ./.github/autobuild/ios.sh + base_command: ./.github/autobuild/ios.sh # Build failed with CodeQL enabled when last tested 03/2022 (#2490). # There are no hints that iOS is supposed to be supported by CodeQL. # Therefore, disable it: run_codeql: false xcode_version: 26.2 + dependency_cache_key: ios - config_name: Windows (artifact+codeQL) target_os: windows building_on_os: windows-2025 base_command: powershell .\.github\autobuild\windows.ps1 -Stage run_codeql: true + dependency_cache_key: asio is_main_build_target: true - config_name: Windows JACK (artifact) @@ -267,6 +271,7 @@ jobs: building_on_os: windows-2025 base_command: powershell .\.github\autobuild\windows.ps1 -BuildOption jackonwindows -Stage run_codeql: false + dependency_cache_key: jack # This injects the build_all_targets information into each matrix output: build_all_targets: @@ -294,13 +299,29 @@ jobs: fetch-depth: ${{ matrix.config.checkout_fetch_depth || '1' }} - name: Cache Mac dependencies - if: matrix.config.target_os == 'macos' + if: matrix.config.target_os == 'macos' && matrix.config.dependency_cache_key == 'qt6' uses: actions/cache@v6 with: path: | ~/qt ~/Library/Cache/jamulus-dependencies - key: ${{ matrix.config.target_os }}-${{ hashFiles('.github/workflows/autobuild.yml', '.github/autobuild/mac.sh', 'mac/deploy_mac.sh') }}-${{ matrix.config.base_command }} + key: ${{ matrix.config.target_os }}-${{ hashFiles('.github/autobuild/mac-dependencies_qt6.sh') }}-${{ matrix.config.dependency_cache_key }} + + - name: Cache Mac Legacy dependencies + if: matrix.config.target_os == 'macos' && matrix.config.dependency_cache_key == 'qt5' + uses: actions/cache@v6 + with: + path: | + ~/qt + ~/Library/Cache/jamulus-dependencies + key: ${{ matrix.config.target_os }}-${{ hashFiles('.github/autobuild/mac-dependencies_qt5.sh') }}-${{ matrix.config.dependency_cache_key }} + + - name: Cache iOS dependencies + if: matrix.config.target_os == 'ios' + uses: actions/cache@v6 + with: + path: ~/qt + key: ${{ matrix.config.target_os }}-${{ hashFiles('.github/autobuild/ios-dependencies.sh') }}-${{ matrix.config.dependency_cache_key }} - name: Cache Windows dependencies if: matrix.config.target_os == 'windows' @@ -312,7 +333,7 @@ jobs: C:\AutobuildCache ${{ github.workspace }}\libs\NSIS\NSIS-source ${{ github.workspace }}\libs\ASIOSDK2 - key: ${{ matrix.config.target_os }}-${{ hashFiles('.github/workflows/autobuild.yml', '.github/autobuild/windows.ps1', 'windows/deploy_windows.ps1') }}-${{ matrix.config.base_command }} + key: ${{ matrix.config.target_os }}-${{ hashFiles('.github/autobuild/windows-dependencies.ps1') }}-${{ matrix.config.dependency_cache_key }} - name: Cache Android dependencies if: matrix.config.target_os == 'android' @@ -359,6 +380,7 @@ jobs: NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }} KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} MACOS_CA_PUBLICKEY: ${{ secrets.MACOS_CA_PUBKEY }} + - name: Post-Build for ${{ matrix.config.config_name }} id: get-artifacts run: ${{ matrix.config.base_command }} get-artifacts diff --git a/.github/workflows/bump-dependencies.yml b/.github/workflows/bump-dependencies.yml index a59eca3398..33df9ed9b5 100644 --- a/.github/workflows/bump-dependencies.yml +++ b/.github/workflows/bump-dependencies.yml @@ -36,51 +36,50 @@ jobs: fail-fast: false matrix: components: + - name: aqt # not Changelog-worthy get_upstream_version: GH_REPO=miurahr/aqtinstall gh release view --json tagName --jq .tagName | sed -re 's/^v//' - # The following regexps capture both the *nix and the Windows variable syntax (different case, underscore): - local_version_regex: (.*AQTINSTALL_?VERSION\s*=\s*"?)([0-9.]*)("?.*) + # Capture the POSIX-style and PowerShell assignments used by the dependency files. + local_version_regex: ^(AQTINSTALL_VERSION=|\$AqtinstallVersion = \")([0-9.]+)(|\")$ + - name: create-dmg changelog_name: create-dmg (macOS) get_upstream_version: GH_REPO=create-dmg/create-dmg gh release view --json tagName --jq .tagName | sed -re 's/^v//' - local_version_regex: (.*CREATEDMG_VERSION\s*=\s*"?)([0-9.]*)("?.*) + local_version_regex: ^(CREATEDMG_VERSION=)([0-9.]+)()$ + - name: Qt6 changelog_name: bundled Qt6 get_upstream_version: | latest_minor="$(curl -s https://download.qt.io/official_releases/qt/ | grep -oP 'href="\K[0-9.]+(?=/")' | sort --reverse --version-sort | head -n1)"; curl -s https://download.qt.io/official_releases/qt/"${latest_minor}"/ | grep -oP 'href="\K[0-9.]+(?=/")' | sort --reverse --version-sort | head -n1 - # The following regex captures both the *nix and the Windows variable syntax (different case, underscore): - local_version_regex: (.*QT[0-9_]+VERSION\s*=\s*"?)(6\.[0-9.]+)("?.*) + local_version_regex: ^(QT_VERSION=|\$Qt64Version = \")(6\.[0-9.]+)(|\")$ - name: jack changelog_name: bundled JACK (Windows-only) get_upstream_version: GH_REPO=jackaudio/jack2-releases gh release view --json tagName --jq .tagName | sed -re 's/^v//' - local_version_regex: (.*JackVersion\s*=\s*"?)([0-9.]+)("?.*) + local_version_regex: ^(\$JackVersion = \")([^"]+)(\")$ - name: choco-jom # not Changelog-worthy get_upstream_version: | curl -sL "https://community.chocolatey.org/api/v2/FindPackagesById()?id='jom'" | grep -oP '(?<=)[^<]+' | sort --version-sort | tail -n1 - local_version_regex: (.*JomVersion\s*=\s*"?)([0-9.]+)("?.*) + local_version_regex: ^(\$JomVersion = \")([^"]+)(\")$ - name: NSIS changelog_name: Windows Installer base (NSIS) get_upstream_version: | curl -s -o /dev/null --location --range 0-5 --write-out '%{url_effective}' https://sourceforge.net/projects/nsis/files/latest/download | grep -oP '.*/nsis-\K[0-9.]+(?=-setup\.)' - # This pattern is a bit special as it has to match twice in a single line. - # Therefore, we have to be very careful to avoid consuming too much pattern space. - # This is why a positive lookahead is used instead of direct matching: - local_version_regex: (.*"nsis-|.*\/NSIS.20.\/|\/nsis-)([0-9.]+)(".*|(?=\/nsis-)|\.zip.*) + local_version_regex: ^(\$NsisVersion = \")([^"]+)(\")$ - name: ASIO-SDK changelog_name: ASIO SDK (Windows-only) get_upstream_version: | curl -s -o /dev/null --location --range 0-5 --write-out '%{url_effective}' https://www.steinberg.net/asiosdk | grep -oP '.*\K(?:ASIO-SDK|asiosdk)_.*(?=\.zip)' - local_version_regex: (.*["\/])((?:ASIO-SDK|asiosdk)_[^"]+?)(".*|\.zip.*) + local_version_regex: ^(\$AsioSDKVersion = \")([^"]+)(\")$ steps: - uses: actions/checkout@v7 @@ -91,9 +90,12 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -eu - files=( .github/{autobuild,workflows}/* windows/*.ps1 mac/*.sh ) + files=( .github/autobuild/*-dependencies{,_qt[56]}.* ) + echo "files: (${files[@]})" upstream_version="$(${{ matrix.components.get_upstream_version }})" - local_version="$(perl -nle 'print "$2" if /${{ matrix.components.local_version_regex }}/i' "${files[@]}" | sort --reverse --version-sort | head -n1)" + echo "upstream version: {${upstream_version}}" + local_version="$(perl -nle 'print "$2" if /${{ matrix.components.local_version_regex }}/' "${files[@]}" | sort --reverse --version-sort | head -n1)" + echo "local version: {${local_version}}" if [[ -z "$upstream_version" ]]; then echo "failed to extract upstream version" exit 1 @@ -106,13 +108,12 @@ jobs: echo "upstream ${{ matrix.components.name }} (${upstream_version}) matches local ${{ matrix.components.name }} (${local_version})" exit 0 fi - echo "upstream ${{ matrix.components.name }} (${upstream_version}) is different than local ${{ matrix.components.name }} (${local_version}), creating PR" + echo "upstream ${{ matrix.components.name }} (${upstream_version}) does not match local ${{ matrix.components.name }} (${local_version}), creating PR" git config --global user.email "actions@github.com" git config --global user.name "github-actions[bot]" pr_branch=ci/bump-dependencies/${{ matrix.components.name }} git checkout -b "${pr_branch}" - # sed does not support replacements with overlapping or lookahead patterns as is the case with NSIS. - # Therefore, use perl instead: + # Use Perl so the replacement can preserve the prefix and suffix captured by each component regex. perl -pe 's/${{ matrix.components.local_version_regex }}/${1}'"${upstream_version}"'${3}/gi' -i "${files[@]}" git add . title="Build: Bump ${{ matrix.components.name }} from ${local_version} to ${upstream_version}" diff --git a/COMPILING.md b/COMPILING.md index d4a10c3bb5..896c3f5461 100644 --- a/COMPILING.md +++ b/COMPILING.md @@ -78,7 +78,7 @@ Download and install Qt e.g via the [official open source installer](https://www **Note:** - Use the free GPLv2 license for Open Source development, not the commercial "universal installer" -- Select Components during installation: Expand the Qt section, find the matching version. To match the Github builds, you will need to check the versions in `windows/deploy_windows.ps2`. This gives both the Qt and MSVC versions (e.g. 6.8.1 and msvc2022_64 for a 64bit release). +- Select Components during installation: Expand the Qt section and find the matching version. To match the GitHub builds, check `.github/autobuild/windows-dependencies.ps1`, which gives both the Qt and MSVC versions (e.g. 6.10.2 and msvc2022_64 for a 64-bit release). If you build with *JACK* support, install JACK via choco: `choco install --no-progress -y jack` @@ -89,7 +89,8 @@ If you build with *ASIO* support, you'll need the [ASIO development files](https 1. Open PowerShell 1. Navigate to the `jamulus` directory 1. To allow unsigned scripts, right-click on the `windows\deploy_windows.ps1` script, select properties and allow the execution of this script. You can also run `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`. (You can revert this after having run this script. For more information see the [Microsoft PowerShell documentation page](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy)). -1. Run the Jamulus compilation and installer script in PowerShell: `.\windows\deploy_windows.ps1 "C:\Qt\" "C:\Qt\"`. +1. Run the Jamulus compilation and installer script in PowerShell: `.\windows\deploy_windows.ps1`. + The script reads the Qt, ASIO SDK, and NSIS versions from `.github/autobuild/windows-dependencies.ps1`. 1. You can now find the Jamulus installer in the `.\deploy` directory. ### Compiling only @@ -110,16 +111,17 @@ You will need Xcode and Qt. First, install [Xcode from the Mac AppStore](https://apps.apple.com/us/app/xcode/id497799835?mt=12). Then [install homebrew](https://brew.sh/). -After that you can install Qt via homebrew: +After that you can install Qt via homebrew. The GitHub build uses Qt 6 by default; for the exact versions, check `.github/autobuild/mac-dependencies_qt5.sh` or `.github/autobuild/mac-dependencies_qt6.sh`. ```shell -brew install Qt@5 -brew link Qt@5 --force +brew install qt ``` +To use Qt 5, install the Qt 5 version listed in `.github/autobuild/mac-dependencies_qt5.sh` instead. + ### Generate Xcode Project file -`qmake QMAKE_APPLE_DEVICE_ARCHS=arm64 QT_ARCH=arm64 -spec macx-xcode Jamulus.pro` +`/path/to/qt//macos/bin/qmake QMAKE_APPLE_DEVICE_ARCHS=arm64 QT_ARCH=arm64 -spec macx-xcode Jamulus.pro` **Note:** if you still build on x86_64, not Apple Silicon, you must replace `arm64` with `x86_64`. ### Print build targets and configuration in console @@ -152,15 +154,15 @@ Schemes: Will build the file and make it available in `./Release/Jamulus.app` In order to run the application, you need to run `macdeployqt ./Release/Jamulus.app` once to set up all required libraries and frameworks. -If you want to build the installer, please run the `deploy_mac.sh` script: `./mac/deploy_mac.sh`. You'll find the installer in the deploy/ folder. +If you want to build the installer, please run the `deploy_mac.sh` script: `./mac/deploy_mac.sh` (Qt 6) or `QT=5 ./mac/deploy_mac.sh` (Qt 5). You'll find the installer in the deploy/ folder. --- ## iOS 1. Install [Xcode from the Mac AppStore](https://apps.apple.com/us/app/xcode/id497799835?mt=12) -2. [Download and install Qt5 with the Qt Installer](https://www.qt.io/download) (not homebrew, Qt6 is found to be buggy). Explicitly select iOS when choosing the Qt version -3. Go to the folder of the Jamulus source code via terminal and run `/path/to/qt/5.15.2/ios/bin/qmake -spec macx-xcode Jamulus.pro` to generate an .xcodeproject file +2. [Download and install Qt5 with the Qt Installer](https://www.qt.io/download) (not homebrew, Qt6 is found to be buggy). Explicitly select iOS when choosing the Qt version. For the version matching the GitHub build, check `.github/autobuild/ios-dependencies.sh`. +3. Go to the folder of the Jamulus source code via terminal and run `/path/to/qt//ios/bin/qmake -spec macx-xcode Jamulus.pro` to generate an .xcodeproject file 4. Open the generated .xcodeproject in Xcode 5. Go to the Signing & Capabilities tab and fix signing errors by setting a team. Xcode will tell you what you need to change. diff --git a/mac/deploy_mac.sh b/mac/deploy_mac.sh index 410ed77f63..f00eb89cdc 100755 --- a/mac/deploy_mac.sh +++ b/mac/deploy_mac.sh @@ -47,10 +47,13 @@ ############################################################################## set -eu -o pipefail +root_path=$(pwd) + +QT=${QT:-6} # Dependency versions -CREATEDMG_VERSION="1.3.0" +# shellcheck disable=SC1090 +source "${root_path}/.github/autobuild/mac-dependencies_qt${QT}.sh" -root_path=$(pwd) project_path="${root_path}/Jamulus.pro" resources_path="${root_path}/src/res" raw_path="${root_path}/rawbuild" # Path for raw, not yet runnable or signed binaries. diff --git a/windows/deploy_windows.ps1 b/windows/deploy_windows.ps1 index 8d66212047..ae6f1842b8 100644 --- a/windows/deploy_windows.ps1 +++ b/windows/deploy_windows.ps1 @@ -45,20 +45,6 @@ # ############################################################################## param ( - # Replace default path with system Qt installation folder if necessary - [string] $QtInstallPath32 = "C:\Qt\5.15.2", - [string] $QtInstallPath64 = "C:\Qt\6.8.1", - [string] $QtCompile32 = "msvc2019", - [string] $QtCompile64 = "msvc2022_64", - # Important: - # - Do not update ASIO SDK without checking for license-related changes. - # - Do not copy (parts of) the ASIO SDK into the Jamulus source tree without - # further consideration as it would make the license situation more complicated. - # - # The following version pinnings are semi-automatically checked for - # updates. Verify .github/workflows/bump-dependencies.yaml when changing those manually: - [string] $AsioSDKUrl = "https://download.steinberg.net/sdk_downloads/ASIO-SDK_2.3.4_2025-10-15.zip", - [string] $NsisUrl = "https://downloads.sourceforge.net/project/nsis/NSIS%203/3.12/nsis-3.12.zip", [string] $BuildOption = "" ) @@ -79,6 +65,16 @@ $DeployPath = "$RootPath\deploy" $WindowsPath ="$RootPath\windows" $AppName = "Jamulus" +. "$RootPath\.github\autobuild\windows-dependencies.ps1" + +# Replace default path with system Qt installation folder if necessary +$QtInstallPath32 = "C:\Qt\${Qt32Version}" +$QtInstallPath64 = "C:\Qt\${Qt64Version}" + +# Verify .github/workflows/bump-dependencies.yml when changing these: +$AsioSDKUrl = "https://download.steinberg.net/sdk_downloads/${AsioSDKVersion}.zip" +$NsisUrl = "https://downloads.sourceforge.net/project/nsis/NSIS%203/${NsisVersion}/nsis-${NsisVersion}.zip" + # Execute native command with errorlevel handling Function Invoke-Native-Command { param( @@ -351,7 +347,7 @@ function Build-App-Variants else { Initialize-Build-Environment -BuildArch $_ - Initialize-Qt-Build-Environment -QtInstallPath $QtInstallPath64 -QtCompile $QtCompile64 + Initialize-Qt-Build-Environment -QtInstallPath $QtInstallPath64 -QtCompile ${QtCompile64}_64 } Build-App -BuildConfig "release" -BuildArch $_ $OriginalEnv | % { Set-Item "Env:$($_.Name)" $_.Value }