Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions assets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ install(DIRECTORY templates/
install(DIRECTORY models/
DESTINATION "${SOURCES_INSTALL_RPEFIX}/models")

find_package(Qt${QT_VERSION_MAJOR} COMPONENTS LinguistTools)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS LinguistTools REQUIRED)

# install translation.
if (CMAKE_BUILD_TYPE STREQUAL "Release")
file(GLOB TS_FILES "translations/*.ts")
foreach(TS_FILE IN LISTS TS_FILES)
message(STATUS "process ts file: ${TS_FILE}")
execute_process(COMMAND lrelease ${TS_FILE})
endforeach()
# Set up translation files
set(TS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/translations")
file(GLOB TS_FILES "${TS_DIR}/*.ts")
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${TS_DIR}")

if (QT_VERSION_MAJOR EQUAL 6)
qt6_add_translation(QM_FILES ${TS_FILES})
else()
qt5_add_translation(QM_FILES ${TS_FILES})
endif()

file(GLOB QM_FILES "translations/*.qm")
add_custom_target(${PROJECT_NAME}_translations ALL DEPENDS ${QM_FILES})
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_translations)

# install translation.
install(FILES ${QM_FILES} DESTINATION "${SOURCES_INSTALL_RPEFIX}/translations")

# install tools
Expand Down
4 changes: 2 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export QT_SELECT=5
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=1 -fPIC
export DEB_CXXFLAGS_MAINT_APPEND = -Wall -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=1 -fPIC
export DEB_CFLAGS_MAINT_APPEND = -Wall -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIC
export DEB_CXXFLAGS_MAINT_APPEND = -Wall -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIC
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -pie

include /usr/share/dpkg/default.mk
Expand Down
6 changes: 5 additions & 1 deletion src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ static bool loadPlugins()
qInfo() << QString("run application in %0").arg(pluginsPath);
lifeCycle.setPluginPaths({ pluginsPath });

qInfo() << "Depend library paths:" << QApplication::libraryPaths();
QString dependlibs = CustomPaths::global(CustomPaths::DependLibs);
QCoreApplication::addLibraryPath(dependlibs);
QCoreApplication::addLibraryPath(pluginsPath);

qInfo() << "Current library paths:" << QApplication::libraryPaths();
qInfo() << "Load plugin paths: " << dpf::LifeCycle::pluginPaths();

// read all plugins in setting paths
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/core/uicontroller/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ public slots:
//mode : MD_EDIT/MD_DEBUG/MD_RECENT
void raiseMode(const QString &mode);

//1 Plugi -> 1navName -> n widget(name)
void setCurrentPlugin(const QString &plugin);
void registerWidgetToMode(const QString &name, AbstractWidget *abstractWidget, const QString &mode, Position pos, bool replace, bool isVisible);
void registerWidget(const QString &name, AbstractWidget *abstractWidget);
void registerWidgetCreator(const QString &name, std::function<AbstractWidget*()> &widgetCreateFunc);
Expand Down
Loading