From d1c1d181575f3e5b892ebc0d64fb5339c2a36f68 Mon Sep 17 00:00:00 2001 From: EndrII Date: Mon, 31 Jul 2023 22:33:52 +0200 Subject: [PATCH] fix cmake scripts --- CMakeLists.txt | 17 ++-- src/engine/CMakeLists.txt | 5 +- src/engine/languages/en.ts | 77 +++++++++++++++++++ .../src/public/ButterflyEngine/global.h | 2 +- src/example/CMakeLists.txt | 36 ++------- src/example/Deploy/ButterflyEngine.json | 2 +- src/example/languages/de.ts | 77 +++++++++++++++++++ src/example/languages/en.ts | 77 +++++++++++++++++++ src/example/languages/es.ts | 77 +++++++++++++++++++ src/example/languages/fr.ts | 77 +++++++++++++++++++ src/example/languages/ja.ts | 77 +++++++++++++++++++ src/example/languages/pl.ts | 77 +++++++++++++++++++ src/example/languages/ru.ts | 77 +++++++++++++++++++ src/example/languages/tr.ts | 77 +++++++++++++++++++ src/example/languages/uk.ts | 77 +++++++++++++++++++ src/example/languages/zh.ts | 77 +++++++++++++++++++ 16 files changed, 864 insertions(+), 45 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d79988f..45be82a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,8 +5,8 @@ # of this license document, but changing it is not allowed. # -cmake_minimum_required(VERSION 3.18) -project(ButterflyEngine LANGUAGES CXX) +cmake_minimum_required(VERSION 3.20) +project(Butterfly LANGUAGES CXX) if(TARGET ${PROJECT_NAME}) message("The ${PROJECT_NAME} arledy included in main Project") return() @@ -17,23 +17,20 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) if (ANDROID OR IOS) set(BUILD_SHARED_LIBS ON) endif() -if (NOT QT_VERSION_MAJOR) - find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Test QUIET) -endif() -find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Test QUIET) +find_package(Qt6 COMPONENTS Core REQUIRED) +find_package(Qt6 COMPONENTS Test QUIET) include(submodules/CMake/QuasarApp.cmake) updateGitVars() set(BUTTERFLY_ENGINE_VERSION "0.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}") -set(BUTTERFLY_ENGINE_PACKAGE_ID "quasarapp.core.ButterflyEngine") option(BUTTERFLY_ENGINE_TESTS "This option disables or enables tests of the ${PROJECT_NAME} project" ON) option(BUTTERFLY_ENGINE_EXAMPLE "This option disables or enables example app of the ${PROJECT_NAME} project" ON) @@ -50,10 +47,10 @@ make_directory(Distro) initAll() -add_subdirectory(src/Library) +add_subdirectory(src/engine) if (DEFINED BUTTERFLY_ENGINE_EXAMPLE) - add_subdirectory(src/Example) + add_subdirectory(src/example) endif() if (BUTTERFLY_ENGINE_TESTS) diff --git a/src/engine/CMakeLists.txt b/src/engine/CMakeLists.txt index 726eab2..ca8451a 100644 --- a/src/engine/CMakeLists.txt +++ b/src/engine/CMakeLists.txt @@ -7,12 +7,9 @@ cmake_minimum_required(VERSION 3.18) -get_filename_component(CURRENT_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR} NAME) - -set(CURRENT_PROJECT "${PROJECT_NAME}${CURRENT_PROJECT_DIR}") +set(CURRENT_PROJECT "${PROJECT_NAME}Engine") add_definitions(-DBUTTERFLY_ENGINE_LIBRARY) - file(GLOB_RECURSE SOURCE_CPP "src/*.cpp" "src/*.h" diff --git a/src/engine/languages/en.ts b/src/engine/languages/en.ts index 6401616..5dde5df 100644 --- a/src/engine/languages/en.ts +++ b/src/engine/languages/en.ts @@ -1,4 +1,81 @@ + + Crawl + + Crawl + + + + Please Select level. If level is not availabel please bue it first. + + + + + DefaultMenu + + Back to menu. + + + + + MainMenu + + Select level + + + + Store + + + + My Settings + + + + Exit + + + + + PreviewControl + + Start + + + + + SelectLevelView + + Select + + + + + SettingsView + + Use Them + + + + Light + + + + Dark + + + + In order for the new theme to take effect, you need to reload the game. + + + + + StoreView + + Buy + + + diff --git a/src/engine/src/public/ButterflyEngine/global.h b/src/engine/src/public/ButterflyEngine/global.h index c3cfcfb..b8da8d5 100644 --- a/src/engine/src/public/ButterflyEngine/global.h +++ b/src/engine/src/public/ButterflyEngine/global.h @@ -10,7 +10,7 @@ #include -#define BUTTERFLY_ENGINE_VERSION "0.2.c7fbe94" +#define BUTTERFLY_ENGINE_VERSION "0.3.5aa2b28" #if defined(BUTTERFLY_ENGINE_LIBRARY) # define BUTTERFLY_ENGINE_EXPORT Q_DECL_EXPORT diff --git a/src/example/CMakeLists.txt b/src/example/CMakeLists.txt index 6d3048b..3ebd939 100644 --- a/src/example/CMakeLists.txt +++ b/src/example/CMakeLists.txt @@ -5,11 +5,9 @@ # of this license document, but changing it is not allowed. # -cmake_minimum_required(VERSION 3.18) +cmake_minimum_required(VERSION 3.20) -get_filename_component(CURRENT_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR} NAME) - -set(CURRENT_PROJECT "${PROJECT_NAME}${CURRENT_PROJECT_DIR}") +set(CURRENT_PROJECT "${PROJECT_NAME}Example") option(SIGN_APP "This option enable od disabled sign apk and aab files" ON) file(GLOB_RECURSE SOURCE_CPP @@ -30,20 +28,9 @@ set(PRIVATE_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Private") updateGitVars() -if (${QT_VERSION_MAJOR} EQUAL 6) +qt_add_executable(${CURRENT_PROJECT} ${ALL_SOURCES}) - qt_add_executable(${CURRENT_PROJECT} MANUAL_FINALIZATION ${ALL_SOURCES}) - -else() - if (ANDROID) - add_library(${CURRENT_PROJECT} ${ALL_SOURCES}) - else () - add_executable(${CURRENT_PROJECT} ${ALL_SOURCES} ) - endif() - -endif() - -target_link_libraries(${CURRENT_PROJECT} PUBLIC ${PROJECT_NAME}Library) +target_link_libraries(${CURRENT_PROJECT} PUBLIC ${PROJECT_NAME}Engine) target_include_directories(${CURRENT_PROJECT} PUBLIC ${PUBLIC_INCUDE_DIR}) target_include_directories(${CURRENT_PROJECT} PRIVATE ${PRIVATE_INCUDE_DIR}) @@ -54,18 +41,16 @@ file(MAKE_DIRECTORY ${TARGET_DIR}) if (ANDROID) set(ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android CACHE INTERNAL "") - set(ENV{ANDROID_API_VERSION} 31) + set(ENV{ANDROID_API_VERSION} 34) + set(ANDROID_NATIVE_API_LEVEL 26) set(ANDROID_API_VERSION $ENV{ANDROID_API_VERSION}) set(OPENSSL_ROOT_PATH "$ENV{OPENSSL_ROOT_DIR}") set(BUTTERFLY_ENGINE_EXTRA_LIBS - ${PROJECT_NAME}Library + ${PROJECT_NAME}Engine # libName ) -# find_package(Qt${QT_VERSION_MAJOR} COMPONENTS AndroidExtras REQUIRED) -# target_link_libraries(${CURRENT_PROJECT} PRIVATE Qt${QT_VERSION_MAJOR}::AndroidExtras) - if (SIGN_APP) message("SIGN_APP") addDeploySignedAPK(${CURRENT_PROJECT} @@ -105,7 +90,6 @@ if (ANDROID) ) elseif(IOS) -# set_xcode_property(${CURRENT_PROJECT} PRODUCT_BUNDLE_IDENTIFIER ${CHEATCARD_PACKAGE_ID} All) set_target_properties(${CURRENT_PROJECT} PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER ${BUTTERFLY_ENGINE_PACKAGE_ID} @@ -124,12 +108,6 @@ else() endif() -if(QT_VERSION_MAJOR EQUAL 6) - # Add This line if your project use the Quick module - # qt_import_qml_plugins(${CURRENT_PROJECT}) - qt_finalize_executable(${CURRENT_PROJECT}) -endif() - set(LANGS ${CMAKE_CURRENT_SOURCE_DIR}/languages/en.ts ${CMAKE_CURRENT_SOURCE_DIR}/languages/ru.ts diff --git a/src/example/Deploy/ButterflyEngine.json b/src/example/Deploy/ButterflyEngine.json index a991fea..c79ca3f 100644 --- a/src/example/Deploy/ButterflyEngine.json +++ b/src/example/Deploy/ButterflyEngine.json @@ -21,7 +21,7 @@ ], "extraLib": "crypto", "targetDir": "/home/andrei/gitHub/ButterflyEngine/Distro", - "deployVersion": "0.2.c7fbe94", + "deployVersion": "0.3.5aa2b28", } diff --git a/src/example/languages/de.ts b/src/example/languages/de.ts index 6401616..5dde5df 100644 --- a/src/example/languages/de.ts +++ b/src/example/languages/de.ts @@ -1,4 +1,81 @@ + + Crawl + + Crawl + + + + Please Select level. If level is not availabel please bue it first. + + + + + DefaultMenu + + Back to menu. + + + + + MainMenu + + Select level + + + + Store + + + + My Settings + + + + Exit + + + + + PreviewControl + + Start + + + + + SelectLevelView + + Select + + + + + SettingsView + + Use Them + + + + Light + + + + Dark + + + + In order for the new theme to take effect, you need to reload the game. + + + + + StoreView + + Buy + + + diff --git a/src/example/languages/en.ts b/src/example/languages/en.ts index 6401616..5dde5df 100644 --- a/src/example/languages/en.ts +++ b/src/example/languages/en.ts @@ -1,4 +1,81 @@ + + Crawl + + Crawl + + + + Please Select level. If level is not availabel please bue it first. + + + + + DefaultMenu + + Back to menu. + + + + + MainMenu + + Select level + + + + Store + + + + My Settings + + + + Exit + + + + + PreviewControl + + Start + + + + + SelectLevelView + + Select + + + + + SettingsView + + Use Them + + + + Light + + + + Dark + + + + In order for the new theme to take effect, you need to reload the game. + + + + + StoreView + + Buy + + + diff --git a/src/example/languages/es.ts b/src/example/languages/es.ts index 6401616..5dde5df 100644 --- a/src/example/languages/es.ts +++ b/src/example/languages/es.ts @@ -1,4 +1,81 @@ + + Crawl + + Crawl + + + + Please Select level. If level is not availabel please bue it first. + + + + + DefaultMenu + + Back to menu. + + + + + MainMenu + + Select level + + + + Store + + + + My Settings + + + + Exit + + + + + PreviewControl + + Start + + + + + SelectLevelView + + Select + + + + + SettingsView + + Use Them + + + + Light + + + + Dark + + + + In order for the new theme to take effect, you need to reload the game. + + + + + StoreView + + Buy + + + diff --git a/src/example/languages/fr.ts b/src/example/languages/fr.ts index 6401616..5dde5df 100644 --- a/src/example/languages/fr.ts +++ b/src/example/languages/fr.ts @@ -1,4 +1,81 @@ + + Crawl + + Crawl + + + + Please Select level. If level is not availabel please bue it first. + + + + + DefaultMenu + + Back to menu. + + + + + MainMenu + + Select level + + + + Store + + + + My Settings + + + + Exit + + + + + PreviewControl + + Start + + + + + SelectLevelView + + Select + + + + + SettingsView + + Use Them + + + + Light + + + + Dark + + + + In order for the new theme to take effect, you need to reload the game. + + + + + StoreView + + Buy + + + diff --git a/src/example/languages/ja.ts b/src/example/languages/ja.ts index 6401616..5dde5df 100644 --- a/src/example/languages/ja.ts +++ b/src/example/languages/ja.ts @@ -1,4 +1,81 @@ + + Crawl + + Crawl + + + + Please Select level. If level is not availabel please bue it first. + + + + + DefaultMenu + + Back to menu. + + + + + MainMenu + + Select level + + + + Store + + + + My Settings + + + + Exit + + + + + PreviewControl + + Start + + + + + SelectLevelView + + Select + + + + + SettingsView + + Use Them + + + + Light + + + + Dark + + + + In order for the new theme to take effect, you need to reload the game. + + + + + StoreView + + Buy + + + diff --git a/src/example/languages/pl.ts b/src/example/languages/pl.ts index 6401616..5dde5df 100644 --- a/src/example/languages/pl.ts +++ b/src/example/languages/pl.ts @@ -1,4 +1,81 @@ + + Crawl + + Crawl + + + + Please Select level. If level is not availabel please bue it first. + + + + + DefaultMenu + + Back to menu. + + + + + MainMenu + + Select level + + + + Store + + + + My Settings + + + + Exit + + + + + PreviewControl + + Start + + + + + SelectLevelView + + Select + + + + + SettingsView + + Use Them + + + + Light + + + + Dark + + + + In order for the new theme to take effect, you need to reload the game. + + + + + StoreView + + Buy + + + diff --git a/src/example/languages/ru.ts b/src/example/languages/ru.ts index 6401616..5dde5df 100644 --- a/src/example/languages/ru.ts +++ b/src/example/languages/ru.ts @@ -1,4 +1,81 @@ + + Crawl + + Crawl + + + + Please Select level. If level is not availabel please bue it first. + + + + + DefaultMenu + + Back to menu. + + + + + MainMenu + + Select level + + + + Store + + + + My Settings + + + + Exit + + + + + PreviewControl + + Start + + + + + SelectLevelView + + Select + + + + + SettingsView + + Use Them + + + + Light + + + + Dark + + + + In order for the new theme to take effect, you need to reload the game. + + + + + StoreView + + Buy + + + diff --git a/src/example/languages/tr.ts b/src/example/languages/tr.ts index 6401616..5dde5df 100644 --- a/src/example/languages/tr.ts +++ b/src/example/languages/tr.ts @@ -1,4 +1,81 @@ + + Crawl + + Crawl + + + + Please Select level. If level is not availabel please bue it first. + + + + + DefaultMenu + + Back to menu. + + + + + MainMenu + + Select level + + + + Store + + + + My Settings + + + + Exit + + + + + PreviewControl + + Start + + + + + SelectLevelView + + Select + + + + + SettingsView + + Use Them + + + + Light + + + + Dark + + + + In order for the new theme to take effect, you need to reload the game. + + + + + StoreView + + Buy + + + diff --git a/src/example/languages/uk.ts b/src/example/languages/uk.ts index 6401616..5dde5df 100644 --- a/src/example/languages/uk.ts +++ b/src/example/languages/uk.ts @@ -1,4 +1,81 @@ + + Crawl + + Crawl + + + + Please Select level. If level is not availabel please bue it first. + + + + + DefaultMenu + + Back to menu. + + + + + MainMenu + + Select level + + + + Store + + + + My Settings + + + + Exit + + + + + PreviewControl + + Start + + + + + SelectLevelView + + Select + + + + + SettingsView + + Use Them + + + + Light + + + + Dark + + + + In order for the new theme to take effect, you need to reload the game. + + + + + StoreView + + Buy + + + diff --git a/src/example/languages/zh.ts b/src/example/languages/zh.ts index 6401616..5dde5df 100644 --- a/src/example/languages/zh.ts +++ b/src/example/languages/zh.ts @@ -1,4 +1,81 @@ + + Crawl + + Crawl + + + + Please Select level. If level is not availabel please bue it first. + + + + + DefaultMenu + + Back to menu. + + + + + MainMenu + + Select level + + + + Store + + + + My Settings + + + + Exit + + + + + PreviewControl + + Start + + + + + SelectLevelView + + Select + + + + + SettingsView + + Use Them + + + + Light + + + + Dark + + + + In order for the new theme to take effect, you need to reload the game. + + + + + StoreView + + Buy + + +