From 2f0a76c6648fcc5aca0e126d8a7d93fe13340f83 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Thu, 9 Nov 2023 12:29:12 +0100 Subject: [PATCH] Fix wrong define Refactor qml check job to use python env Fix cmake copy for godot editor --- .gitlab/ci/check_jobs.yml | 18 ++++++++++-------- ScreenPlay/CMakeLists.txt | 2 -- ScreenPlay/src/settings.cpp | 2 +- Tools/CMakeLists.txt | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.gitlab/ci/check_jobs.yml b/.gitlab/ci/check_jobs.yml index f3890288..0cf8d8cc 100644 --- a/.gitlab/ci/check_jobs.yml +++ b/.gitlab/ci/check_jobs.yml @@ -1,18 +1,20 @@ formatting: dependencies: [] stage: check - allow_failure: true image: name: ubuntu:23.10 tags: - gitlab-org-docker - before_script: - - apt-get update -y - - apt-get install python3-pip python-is-python3 clang clang-format -y script: - - python -m pip install -U pip wheel --break-system-packages - - python -m pip install -U cmakelang --break-system-packages + - apt update -y + # For Ubuntu 22.04 and newer we need to create an virutal env + - apt install python3.11 python3.11-venv clang clang-format -y + # Run this command in the ScreenPlay source root folder: + - python3 -m venv env + - source env/bin/activate + - python3 -m pip install -U pip wheel + - python3 -m pip install -U cmakelang - cd Tools - - python check_format_cmake.py --check - - python check_format_cpp.py --check + - python3 check_format_cmake.py --check + - python3 check_format_cpp.py --check #- python check_format_qml.py --check diff --git a/ScreenPlay/CMakeLists.txt b/ScreenPlay/CMakeLists.txt index a8d04317..584b1c55 100644 --- a/ScreenPlay/CMakeLists.txt +++ b/ScreenPlay/CMakeLists.txt @@ -311,7 +311,6 @@ target_link_libraries( Qt6::Xml) if(${SCREENPLAY_STEAM}) - target_compile_definitions(ScreenPlayApp PRIVATE SCREENPLAY_STEAM) target_link_libraries(ScreenPlayApp PUBLIC ScreenPlayWorkshopplugin ScreenPlayWorkshop) endif() @@ -323,7 +322,6 @@ if(${SCREENPLAY_TESTS}) target_link_libraries(tst_ScreenPlay PRIVATE ScreenPlayApp ScreenPlayAppplugin Qt6::Test) generate_cmake_variable_header(tst_ScreenPlay) if(${SCREENPLAY_STEAM}) - target_compile_definitions(tst_ScreenPlay PRIVATE SCREENPLAY_STEAM) target_link_libraries(tst_ScreenPlay PUBLIC ScreenPlayWorkshopplugin ScreenPlayWorkshop) endif() endif() diff --git a/ScreenPlay/src/settings.cpp b/ScreenPlay/src/settings.cpp index 6de20258..5d25b564 100644 --- a/ScreenPlay/src/settings.cpp +++ b/ScreenPlay/src/settings.cpp @@ -55,7 +55,7 @@ Settings::Settings(const std::shared_ptr& globalVariables, const QString isSteamVersion = QString("Is steam version: %1").arg((SCREENPLAY_STEAM_VERSION ? QString("✅ Yes") : QString("❌ No"))); setBuildInfos(qtVersion + buildType + buildDate + commitHash + isDeployVersion + isSteamVersion); - setSteamVersion(SCREENPLAY_STEAM); + setSteamVersion(SCREENPLAY_STEAM_VERSION); #ifdef Q_OS_WIN setDesktopEnvironment(DesktopEnvironment::Windows); diff --git a/Tools/CMakeLists.txt b/Tools/CMakeLists.txt index 56e20955..d48f0245 100644 --- a/Tools/CMakeLists.txt +++ b/Tools/CMakeLists.txt @@ -12,7 +12,7 @@ add_custom_target( set(GODOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../ThirdParty/Godot") -if(WIN32) +if(WIN32 AND ${SCREENPLAY_GODOT}) # Todo: Add Linux and Mac support configure_file(${GODOT_PATH}/${GODOT_EDITOR_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ COPYONLY) endif()