build: DDE_DEBUG_MODE->USE_DEBUG_DBUS_NAME
Signed-off-by: black-desk <me@black-desk.cn>
This commit is contained in:
parent
c85f3d0950
commit
3df26e4fc2
@ -13,8 +13,8 @@ set(CMAKE_AUTORCC ON)
|
|||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
|
|
||||||
set(BUILD_EXAMPLES ON CACHE BOOL "Whether to build examples or not.")
|
set(BUILD_EXAMPLES OFF CACHE BOOL "Whether to build examples or not.")
|
||||||
set(DDE_DDE_DEBUG_MODE ON CACHE BOOL "start a dde-applicatiom-manager service for debug")
|
set(DDE_AM_USE_DEBUG_DBUS_NAME OFF CACHE BOOL "build a dbus service using a different bus name for debug.")
|
||||||
set(PROFILING_MODE OFF CACHE BOOL "run a valgrind performance profiling.")
|
set(PROFILING_MODE OFF CACHE BOOL "run a valgrind performance profiling.")
|
||||||
|
|
||||||
find_package(Qt6 REQUIRED COMPONENTS Core DBus Concurrent)
|
find_package(Qt6 REQUIRED COMPONENTS Core DBus Concurrent)
|
||||||
@ -22,8 +22,8 @@ find_package(Threads REQUIRED)
|
|||||||
|
|
||||||
set(APP_LAUNCH_HELPER_BIN app-launch-helper)
|
set(APP_LAUNCH_HELPER_BIN app-launch-helper)
|
||||||
|
|
||||||
if(DDE_DEBUG_MODE)
|
if(DDE_AM_USE_DEBUG_DBUS_NAME)
|
||||||
add_compile_definitions(-DDDE_DEBUG_MODE)
|
add_compile_definitions(-DDDE_AM_USE_DEBUG_DBUS_NAME)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PROFILING_MODE)
|
if(PROFILING_MODE)
|
||||||
|
4
debian/rules
vendored
4
debian/rules
vendored
@ -2,10 +2,6 @@
|
|||||||
DPKG_EXPORT_BUILDFLAGS = 1
|
DPKG_EXPORT_BUILDFLAGS = 1
|
||||||
include /usr/share/dpkg/default.mk
|
include /usr/share/dpkg/default.mk
|
||||||
export QT_SELECT = qt6
|
export QT_SELECT = qt6
|
||||||
export DEB_CXXFLAGS_MAINT_APPEND = -O3
|
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@ --buildsystem=cmake
|
dh $@ --buildsystem=cmake
|
||||||
|
|
||||||
override_dh_auto_configure:
|
|
||||||
dh_auto_configure -- -DCMAKE_BUILD_TYPE=Release -DDDE_DEBUG_MODE=OFF -DBUILD_TESTING=ON
|
|
||||||
|
@ -9,7 +9,7 @@ constexpr auto SystemdService = u8"org.freedesktop.systemd1";
|
|||||||
constexpr auto SystemdObjectPath = u8"/org/freedesktop/systemd1";
|
constexpr auto SystemdObjectPath = u8"/org/freedesktop/systemd1";
|
||||||
constexpr auto SystemdInterfaceName = u8"org.freedesktop.systemd1.Manager";
|
constexpr auto SystemdInterfaceName = u8"org.freedesktop.systemd1.Manager";
|
||||||
constexpr auto DDEApplicationManager1ServiceName =
|
constexpr auto DDEApplicationManager1ServiceName =
|
||||||
#ifdef DDE_DEBUG_MODE
|
#ifdef DDE_AM_USE_DEBUG_DBUS_NAME
|
||||||
u8"org.deepin.dde.debug.ApplicationManager1";
|
u8"org.deepin.dde.debug.ApplicationManager1";
|
||||||
#else
|
#else
|
||||||
u8"org.deepin.dde.ApplicationManager1";
|
u8"org.deepin.dde.ApplicationManager1";
|
||||||
@ -22,14 +22,14 @@ constexpr auto DesktopFileEntryKey = u8"Desktop Entry";
|
|||||||
constexpr auto DesktopFileActionKey = u8"Desktop Action ";
|
constexpr auto DesktopFileActionKey = u8"Desktop Action ";
|
||||||
|
|
||||||
constexpr auto ApplicationManagerServerDBusName =
|
constexpr auto ApplicationManagerServerDBusName =
|
||||||
#ifdef DDE_DEBUG_MODE
|
#ifdef DDE_AM_USE_DEBUG_DBUS_NAME
|
||||||
u8"deepin_application_manager_debug_server_bus";
|
u8"deepin_application_manager_debug_server_bus";
|
||||||
#else
|
#else
|
||||||
u8"deepin_application_manager_server_bus";
|
u8"deepin_application_manager_server_bus";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
constexpr auto ApplicationManagerDestDBusName =
|
constexpr auto ApplicationManagerDestDBusName =
|
||||||
#ifdef DDE_DEBUG_MODE
|
#ifdef DDE_AM_USE_DEBUG_DBUS_NAME
|
||||||
u8"deepin_application_manager_debug_dest_bus";
|
u8"deepin_application_manager_debug_dest_bus";
|
||||||
#else
|
#else
|
||||||
u8"deepin_application_manager_dest_bus";
|
u8"deepin_application_manager_dest_bus";
|
||||||
|
@ -426,17 +426,13 @@ std::optional<DesktopEntry::Value> DesktopEntry::value(const QString &groupKey,
|
|||||||
{
|
{
|
||||||
const auto &destGroup = group(groupKey);
|
const auto &destGroup = group(groupKey);
|
||||||
if (!destGroup) {
|
if (!destGroup) {
|
||||||
#ifdef DDE_DEBUG_MODE
|
qDebug() << "group " << groupKey << " can't be found.";
|
||||||
qWarning() << "group " << groupKey << " can't be found.";
|
|
||||||
#endif
|
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto it = destGroup->find(valueKey);
|
auto it = destGroup->find(valueKey);
|
||||||
if (it == destGroup->cend()) {
|
if (it == destGroup->cend()) {
|
||||||
#ifdef DDE_DEBUG_MODE
|
qDebug() << "value " << valueKey << " can't be found.";
|
||||||
qWarning() << "value " << valueKey << " can't be found.";
|
|
||||||
#endif
|
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
return *it;
|
return *it;
|
||||||
|
@ -10,7 +10,6 @@ BUILD_DIR=${BUILD_DIR:="build-prof"}
|
|||||||
|
|
||||||
cmake -B "$BUILD_DIR" \
|
cmake -B "$BUILD_DIR" \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DDDE_DEBUG_MODE=OFF \
|
|
||||||
-DPROFILING_MODE=ON
|
-DPROFILING_MODE=ON
|
||||||
|
|
||||||
cmake --build "$BUILD_DIR" -j$(nproc)
|
cmake --build "$BUILD_DIR" -j$(nproc)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user