From 96852ab6535e9053412f68c26cae59fc54d45a83 Mon Sep 17 00:00:00 2001 From: Lu Zhen Date: Thu, 6 Nov 2025 19:29:08 +0800 Subject: [PATCH] fix: recovery rpath Log: Change-Id: I715be11bc12142168fb36e03bb73cc1785321377 --- CMakeLists.txt | 3 +++ src/app/main.cpp | 6 +----- src/plugins/template/wizard/maindialog.h | 2 -- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 634ecf02a..6a2642b61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,8 @@ set(INCLUDE_INSTALL_RPEFIX "/usr/include/${PROJECT_NAME}") set(PLUGIN_INSTALL_PATH ${LIBRARY_INSTALL_PREFIX}/plugins) set(TOOLS_INSTALL_PATH ${LIBRARY_INSTALL_PREFIX}/tools) +# set install runtime path +set(CMAKE_INSTALL_RPATH ${LIBRARY_INSTALL_PREFIX} ${PLUGIN_PATH}) message(STATUS "LIBRARY_INSTALL_PREFIX ${LIBRARY_INSTALL_PREFIX}") message(STATUS "RUNTIME_INSTALL_RPEFIX ${RUNTIME_INSTALL_RPEFIX}") @@ -48,6 +50,7 @@ message(STATUS "SOURCES_INSTALL_RPEFIX ${SOURCES_INSTALL_RPEFIX}") message(STATUS "INCLUDE_INSTALL_RPEFIX ${INCLUDE_INSTALL_RPEFIX}") message(STATUS "PLUGIN_INSTALL_PATH ${PLUGIN_INSTALL_PATH}") message(STATUS "TOOLS_INSTALL_PATH ${TOOLS_INSTALL_PATH}") +message(STATUS "CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH}") # build runtime path set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}) diff --git a/src/app/main.cpp b/src/app/main.cpp index bebb840d9..32cf578fe 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -36,11 +36,7 @@ static bool loadPlugins() qInfo() << QString("run application in %0").arg(pluginsPath); lifeCycle.setPluginPaths({ pluginsPath }); - QString dependlibs = CustomPaths::global(CustomPaths::DependLibs); - QCoreApplication::addLibraryPath(dependlibs); - QCoreApplication::addLibraryPath(pluginsPath); - - qInfo() << "Current library paths:" << QApplication::libraryPaths(); + qInfo() << "Depend library paths:" << QApplication::libraryPaths(); qInfo() << "Load plugin paths: " << dpf::LifeCycle::pluginPaths(); // read all plugins in setting paths diff --git a/src/plugins/template/wizard/maindialog.h b/src/plugins/template/wizard/maindialog.h index 6d1cac766..b481029a5 100644 --- a/src/plugins/template/wizard/maindialog.h +++ b/src/plugins/template/wizard/maindialog.h @@ -25,8 +25,6 @@ class MainDialog : public DTK_WIDGET_NAMESPACE::DAbstractDialog signals: -private slots: - void closeMainWindow(); // 声明用于关闭主窗口的槽函数 private: void setupUI(TemplateVector &templateVec); MainDialogPrivate *const d;