diff --git a/.github/workflows/common_build.yml b/.github/workflows/common_build.yml index 89de3ee62d..9929b5ba22 100644 --- a/.github/workflows/common_build.yml +++ b/.github/workflows/common_build.yml @@ -91,7 +91,7 @@ jobs: os: ubuntu-22.04 build: true build_installer: false - qmake_extra: "CONFIG+=tests CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=use_system_qscintilla2 CONFIG+=use_system_quazip" + qmake_extra: "CONFIG+=tests CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=use_system_box2D CONFIG+=use_system_qscintilla2 CONFIG+=use_system_quazip" trik_python3_version_minor: 10 lint_clazy: true @@ -103,7 +103,7 @@ jobs: build: true build_installer: false config: debug - qmake_extra: "CONFIG+=tests CONFIG+=noPch CONFIG+=ccache CONFIG+=small_debug_info CONFIG+=use_system_qscintilla2 CONFIG+=use_system_quazip CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address" + qmake_extra: "CONFIG+=tests CONFIG+=noPch CONFIG+=ccache CONFIG+=small_debug_info CONFIG+=use_system_box2D CONFIG+=use_system_qscintilla2 CONFIG+=use_system_quazip CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address" trik_python3_version_minor: 10 build-altlinux-release-tests: diff --git a/.github/workflows/setup_environment.yml b/.github/workflows/setup_environment.yml index 75c8c94baa..aaadb36aaa 100644 --- a/.github/workflows/setup_environment.yml +++ b/.github/workflows/setup_environment.yml @@ -114,6 +114,9 @@ jobs: if [[ "${{ inputs.qmake_extra }}" =~ "+=use_system_qscintilla2" ]]; then rm -rf thirdparty/qscintilla fi + if [[ "${{ inputs.qmake_extra }}" =~ "+=use_system_box2D" ]]; then + rm -rf plugins/robots/thirdparty/Box2D + fi ls thirdparty - name: Set up environment diff --git a/buildScripts/github/install.sh b/buildScripts/github/install.sh index 95e7c3275e..815cda5cb4 100755 --- a/buildScripts/github/install.sh +++ b/buildScripts/github/install.sh @@ -53,7 +53,7 @@ case "$(uname)" in elif [ "$ID" = "ubuntu" ]; then sudo apt-get update && sudo apt-get install -y --no-install-recommends ccache curl libusb-1.0-0-dev \ make qtscript5-dev qttools5-dev-tools qtmultimedia5-dev libqt5serialport5-dev libqt5svg5-dev \ - libudev-dev "$TRIK_PYTHON"-dev qtbase5-private-dev qtwayland5 libqscintilla2-qt5-dev libquazip5-dev bear + libudev-dev "$TRIK_PYTHON"-dev qtbase5-private-dev qtwayland5 libqscintilla2-qt5-dev libquazip5-dev libbox2d-dev elif [[ "$ID" = "rocky" || "$ID" = '"rocky"' ]]; then GCC_VERSION=${GCC_VERSION:-13} sudo yum update -y && sudo yum install -y --setopt=install_weak_deps=False epel-release diff --git a/plugins/robots/common/twoDModel/twoDModel.pri b/plugins/robots/common/twoDModel/twoDModel.pri index 0c63ecd4ff..b382c03651 100644 --- a/plugins/robots/common/twoDModel/twoDModel.pri +++ b/plugins/robots/common/twoDModel/twoDModel.pri @@ -13,14 +13,20 @@ # limitations under the License. QT += widgets xml svg +CONFIG *= link_pkgconfig DEFINES += TWO_D_MODEL_LIBRARY +links(qrkernel qrutils qrgui-tool-plugin-interface qrgui-controller robots-utils robots-kit-base) -links(qrkernel qrutils qrgui-tool-plugin-interface qrgui-controller robots-utils robots-kit-base trikBox2D) +!use_system_box2D { + links(trikBox2D) + includes(plugins/robots/thirdparty/Box2D/Box2D) +} else { + PKGCONFIG *= box2d +} includes(plugins/robots/common/kitBase) includes(plugins/robots/utils qrtext) -includes(plugins/robots/thirdparty/Box2D/Box2D) TRANSLATIONS = \ $$PWD/../../../../qrtranslations/ru/plugins/robots/twoDModel_ru.ts \ diff --git a/plugins/robots/thirdparty/thirdparty.pro b/plugins/robots/thirdparty/thirdparty.pro index db3d6ffe27..e3bcab4007 100644 --- a/plugins/robots/thirdparty/thirdparty.pro +++ b/plugins/robots/thirdparty/thirdparty.pro @@ -17,5 +17,8 @@ TEMPLATE = subdirs SUBDIRS += \ libusb-1.0 \ trikRuntime \ - Box2D \ python \ + +!use_system_box2D { + SUBDIRS += Box2D +}