From 9f16c4d1d9a11219ca5a421beea14d930422b661 Mon Sep 17 00:00:00 2001 From: Bindea Cristian Date: Thu, 4 Apr 2024 17:26:47 +0300 Subject: [PATCH] quick fix Signed-off-by: Bindea Cristian --- common/src/scopyconfig.cpp | 9 ++++++--- core/CMakeLists.txt | 6 +++++- core/src/scopymainwindow.cpp | 4 +++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/common/src/scopyconfig.cpp b/common/src/scopyconfig.cpp index bd058a0c66..321e30313a 100644 --- a/common/src/scopyconfig.cpp +++ b/common/src/scopyconfig.cpp @@ -26,8 +26,9 @@ QString scopy::config::localPluginFolderPath() #if defined __APPLE__ return QCoreApplication::applicationDirPath() + "/plugins/plugins"; #endif - - return SCOPY_PLUGIN_BUILD_PATH; + // TODO: a check for ARM + // Quickfix for testing purposes + return QCoreApplication::applicationDirPath() + "/../share/plugins"; } QString scopy::config::defaultTranslationFolderPath() { return SCOPY_TRANSLATION_INSTALL_PATH; } @@ -38,7 +39,9 @@ QString scopy::config::localTranslationFolderPath() return QCoreApplication::applicationDirPath() + "/translations"; #endif - return SCOPY_TRANSLATION_BUILD_PATH; + // TODO: a check for ARM + // Quickfix for testing purposes + return QCoreApplication::applicationDirPath() + "/../share/translations"; } QString scopy::config::preferencesFolderPath() diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 61a83be183..0bfc9ea582 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -34,7 +34,11 @@ endif() option(WITH_PYTHON "Enable Python" ON) if(${WITH_PYTHON}) set(Python_ADDITIONAL_VERSIONS 3) - find_package(Python3 REQUIRED COMPONENTS Interpreter Development) + if(CMAKE_SYSTEM_PROCESSOR MATCHES arm) + find_package(Python3 REQUIRED COMPONENTS Interpreter) + else() + find_package(Python3 REQUIRED COMPONENTS Interpreter Development) + endif() set(PYTHON_VERSION python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}) set(PYTHON_VERSION ${PYTHON_VERSION} PARENT_SCOPE) if(NOT Python3_FOUND) diff --git a/core/src/scopymainwindow.cpp b/core/src/scopymainwindow.cpp index 6404832a38..5d31b807c2 100644 --- a/core/src/scopymainwindow.cpp +++ b/core/src/scopymainwindow.cpp @@ -386,7 +386,9 @@ void ScopyMainWindow::loadDecoders() #if defined __APPLE__ QString path = QCoreApplication::applicationDirPath() + "/decoders"; #else - QString path = "decoders"; + // TODO: a check for ARM + // Quickfix for testing purposes + QString path = QCoreApplication::applicationDirPath() + "/../lib/decoders"; #endif bool success = true;