diff --git a/ci/common.deps.sh b/ci/common.deps.sh index de4323d1b7..36c1222604 100644 --- a/ci/common.deps.sh +++ b/ci/common.deps.sh @@ -5,7 +5,15 @@ ls pwd cd src/addons -git clone --recursive -j16 https://github.com/ossia/iscore-addon-network -git clone --recursive -j16 https://github.com/ossia/score-addon-synthimi -git clone --recursive -j16 https://github.com/ossia/score-addon-threedim +if [[ ! -d iscore-addon-network ]]; then + git clone --recursive -j16 https://github.com/ossia/iscore-addon-network +fi + +if [[ ! -d score-addon-synthimi ]]; then + git clone --recursive -j16 https://github.com/ossia/score-addon-synthimi +fi + +if [[ ! -d score-addon-threedim ]]; then + git clone --recursive -j16 https://github.com/ossia/score-addon-threedim +fi ) diff --git a/ci/fedora-qt6.deps.sh b/ci/fedora-qt6.deps.sh index 1094bb3586..c070417dee 100755 --- a/ci/fedora-qt6.deps.sh +++ b/ci/fedora-qt6.deps.sh @@ -17,6 +17,7 @@ dnf -y install \ lilv-devel suil-devel \ fftw-devel \ avahi-devel \ + libxkbcommon-x11-devel libxkbcommon-devel \ bluez-libs-devel \ qt6-qtbase-devel \ qt6-qtbase-private-devel \ diff --git a/src/plugins/score-plugin-js/CMakeLists.txt b/src/plugins/score-plugin-js/CMakeLists.txt index 61717a2ee6..ae5f8531c0 100644 --- a/src/plugins/score-plugin-js/CMakeLists.txt +++ b/src/plugins/score-plugin-js/CMakeLists.txt @@ -14,9 +14,6 @@ endif() if(${QT_PREFIX} MATCHES "Qt6") find_package(${QT_VERSION} COMPONENTS QmlIntegration) - if(NOT TARGET ${QT_PREFIX}::QmlIntegration) - return() - endif() endif() # Files & main target @@ -65,8 +62,12 @@ target_link_libraries(${PROJECT_NAME} PUBLIC score_plugin_deviceexplorer score_plugin_protocols score_plugin_media) -if(TARGET ${QT_PREFIX}::QmlIntegration) +if(${QT_PREFIX} MATCHES "Qt6") set_target_properties(${PROJECT_NAME} PROPERTIES AUTOMOC 1) +endif() + +if(TARGET ${QT_PREFIX}::QmlIntegration) target_link_libraries(${PROJECT_NAME} PUBLIC ${QT_PREFIX}::QmlIntegration) endif() + setup_score_plugin(${PROJECT_NAME}) diff --git a/src/plugins/score-plugin-js/JS/Qml/ValueTypes.Qt6.hpp b/src/plugins/score-plugin-js/JS/Qml/ValueTypes.Qt6.hpp index 86a5f4811f..1c72ab0fdb 100644 --- a/src/plugins/score-plugin-js/JS/Qml/ValueTypes.Qt6.hpp +++ b/src/plugins/score-plugin-js/JS/Qml/ValueTypes.Qt6.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include diff --git a/src/plugins/score-plugin-remotecontrol/CMakeLists.txt b/src/plugins/score-plugin-remotecontrol/CMakeLists.txt index d0ec3ed4f3..c657319ed9 100644 --- a/src/plugins/score-plugin-remotecontrol/CMakeLists.txt +++ b/src/plugins/score-plugin-remotecontrol/CMakeLists.txt @@ -6,6 +6,10 @@ if(NOT TARGET ${QT_PREFIX}::WebSockets) return() endif() +if(NOT TARGET score_plugin_js) + message(FATAL_ERROR "Remote control plug-in requires score_plugin_js.") + return() +endif() # General initialization score_common_setup() diff --git a/tools/developer.sh b/tools/developer.sh index 7d1bc7df6d..a760c8f566 100755 --- a/tools/developer.sh +++ b/tools/developer.sh @@ -1,13 +1,15 @@ #!/bin/bash -eu echo "Running on OSTYPE: '$OSTYPE'" +DISTRO="" +CODENAME="" command -v git >/dev/null 2>&1 || { echo >&2 "Please install git."; exit 1; } if [[ -d ../.git ]]; then cd .. -fi - -if [[ ! -d .git ]]; then +elif [[ -d score/.git ]]; then + cd score +elif [[ ! -d .git ]]; then git clone --recursive -j16 https://github.com/ossia/score cd score fi @@ -31,8 +33,8 @@ detect_deps_script() { QT=5 return 0;; jammy) - DEPS=jammy-qt6 - QT=6 + DEPS=jammy + QT=5 return 0;; leap) DEPS=suse-leap @@ -50,12 +52,12 @@ detect_deps_script() { QT=6 return 0;; debian) - DEPS=jammy-qt6 - QT=6 + DEPS=jammy + QT=5 return 0;; ubuntu) - DEPS=jammy-qt6 - QT=6 + DEPS=jammy + QT=5 return 0;; fedora) DEPS=fedora-qt6 @@ -108,18 +110,19 @@ detect_linux_qt_version() { detect_linux_distro() { DISTRO=$(awk -F'=' '/^ID=/ {gsub("\"","",$2); print tolower($2) } ' /etc/*-release 2> /dev/null) + CODENAME="" QT=6 case "$DISTRO" in arch) return 0;; debian) - DISTRO_CODENAME=$(cat /etc/*-release | grep CODENAME | head -n 1 | cut -d= -f2) - if [[ "$DISTRO_CODENAME" == "" ]]; then - DISTRO_CODENAME=sid + CODENAME=$(cat /etc/*-release | grep CODENAME | head -n 1 | cut -d= -f2) + if [[ "$CODENAME" == "" ]]; then + CODENAME=sid fi return 0;; ubuntu) - DISTRO_CODENAME=$(cat /etc/*-release | grep CODENAME | head -n 1 | cut -d= -f2) + CODENAME=$(cat /etc/*-release | grep CODENAME | head -n 1 | cut -d= -f2) return 0;; fedora) return 0;; @@ -162,9 +165,9 @@ detect_linux_distro() { if command -v apt >/dev/null 2>&1; then DISTRO=debian - DISTRO_CODENAME=$(cat /etc/*-release | grep CODENAME | head -n 1 | cut -d= -f2) - if [[ "$DISTRO_CODENAME" == "" ]]; then - DISTRO_CODENAME=sid + CODENAME=$(cat /etc/*-release | grep CODENAME | head -n 1 | cut -d= -f2) + if [[ "$CODENAME" == "" ]]; then + CODENAME=sid fi return 0 fi @@ -188,7 +191,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then mkdir -p build-developer cd build-developer - if [[ -f ./score ]]; then + if [[ ! -f ./score ]]; then cmake -Wno-dev \ .. \ -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt \ @@ -210,7 +213,7 @@ elif [[ "$OSTYPE" == "linux-gnu"* ]]; then ( echo "[developer.sh] Installing dependencies" detect_linux_distro - detect_qt_version + detect_linux_qt_version detect_deps_script source "ci/$DEPS.deps.sh" @@ -218,13 +221,16 @@ elif [[ "$OSTYPE" == "linux-gnu"* ]]; then mkdir -p build-developer cd build-developer - if [[ "$QT" == 5 ]]; + if [[ "$QT" == 5 ]]; then QT_CMAKE_FLAG='' else QT_CMAKE_FLAG='-DQT_VERSION=Qt6;6.2' fi - if [[ -f ./ossia-score ]]; then + echo "ls: " + ls + + if [[ ! -f ./ossia-score ]]; then cmake -Wno-dev \ .. \ -GNinja \