Skip to content
Open
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
17 changes: 1 addition & 16 deletions .github/workflows/ddm-archlinux-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Build ddm on Arch Linux

# Dependencies are based on the official ArchLinux PKGBUILD
# treeland-protocols-git is installed from source

on:
push:
Expand All @@ -21,21 +20,7 @@ jobs:

- name: Install base dependencies
run: |
pacman -S --noconfirm --noprogressbar base-devel bash gcc-libs glibc libxau pam qt6-base qt6-declarative systemd-libs ttf-font xorg-server xorg-xauth git extra-cmake-modules python-docutils qt6-tools treeland-protocols ninja

- name: Build and Install treeland-protocols
run: |
echo "Building treeland-protocols from source..."
git clone https://github.com/linuxdeepin/treeland-protocols.git --depth 1
cd treeland-protocols
cmake -B build \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_LIBEXECDIR=lib \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release
cmake --build build
cmake --install build
echo "✅ treeland-protocols built and installed from source"
pacman -S --noconfirm --noprogressbar base-devel bash gcc-libs glibc libxau pam qt6-base qt6-declarative qt6-remoteobjects systemd-libs ttf-font xorg-server xorg-xauth git extra-cmake-modules python-docutils qt6-tools ninja

- uses: actions/checkout@v4
with:
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/ddm-deepin-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,6 @@ jobs:
apt-get update
apt-get install -y devscripts equivs git

# Save the ddm workspace directory
DDM_DIR="$PWD"
echo "ddm workspace directory: $DDM_DIR"

# Build and install treeland-protocols locally (required build dependency not from repo)
echo "Building treeland-protocols from source (master)"
cd /tmp
if [ ! -d treeland-protocols ]; then
git clone --depth=1 --branch master --single-branch https://github.com/linuxdeepin/treeland-protocols.git
fi
cd treeland-protocols
mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control
dpkg-buildpackage -uc -us -b
apt-get install -y ../*.deb || dpkg -i ../*.deb || apt-get -f install -y
cd "$DDM_DIR"

# Install build-deps defined in ddm/debian/control
mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control

Expand Down
8 changes: 1 addition & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,8 @@ pkg_search_module(LibSystemd REQUIRED IMPORTED_TARGET libsystemd)
# XAU
pkg_search_module(LibXau REQUIRED IMPORTED_TARGET xau)

# Wayland client
pkg_search_module(WaylandClient REQUIRED IMPORTED_TARGET wayland-client)

# TreelandProtocols
find_package(TreelandProtocols 0.5.3 REQUIRED)

# Qt6
find_package(Qt6 CONFIG REQUIRED Core DBus Network)
find_package(Qt6 CONFIG REQUIRED Core DBus Network RemoteObjects)
qt_standard_project_setup(REQUIRES 6.6)

# Uninstall target
Expand Down
3 changes: 1 addition & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ Build-Depends: debhelper-compat (= 13),
extra-cmake-modules (>= 1.4.0~),
libpam0g-dev,
libsystemd-dev [linux-any],
libwayland-dev,
libxau-dev,
pkg-config,
qt6-base-dev (>= 6.6.1~),
qt6-remoteobjects-dev,
systemd [linux-any],
treeland-protocols,
Standards-Version: 4.6.0
Section: libs
Homepage: https://github.com/linuxdeepin/ddm.git
Expand Down
27 changes: 7 additions & 20 deletions src/daemon/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
# Generate treeland-ddm protocol files
set(TREELAND_DDM_HEADER ${CMAKE_CURRENT_BINARY_DIR}/treeland-ddm-v1.h)
set(TREELAND_DDM_SOURCE ${CMAKE_CURRENT_BINARY_DIR}/treeland-ddm-v1.c)

add_custom_command(
OUTPUT ${TREELAND_DDM_HEADER}
COMMAND wayland-scanner client-header < ${TREELAND_PROTOCOLS_DATA_DIR}/treeland-ddm-v1.xml > ${TREELAND_DDM_HEADER}
DEPENDS ${TREELAND_PROTOCOLS_DATA_DIR}/treeland-ddm-v1.xml
COMMENT "Generating treeland-ddm-v1.h"
)

add_custom_command(
OUTPUT ${TREELAND_DDM_SOURCE}
COMMAND wayland-scanner private-code < ${TREELAND_PROTOCOLS_DATA_DIR}/treeland-ddm-v1.xml > ${TREELAND_DDM_SOURCE}
DEPENDS ${TREELAND_PROTOCOLS_DATA_DIR}/treeland-ddm-v1.xml
COMMENT "Generating treeland-ddm-v1.c"
)

configure_file(config.h.in config.h IMMEDIATE @ONLY)
set(DAEMON_SOURCES
Auth.cpp
Expand All @@ -30,7 +12,6 @@ set(DAEMON_SOURCES
UserSession.cpp
XorgDisplayServer.cpp
TreelandDisplayServer.cpp
${TREELAND_DDM_SOURCE}
)

qt_add_dbus_adaptor(DAEMON_SOURCES "${CMAKE_SOURCE_DIR}/data/interfaces/org.freedesktop.DisplayManager.xml" "DisplayManager.h" DDM::DisplayManager)
Expand Down Expand Up @@ -59,15 +40,21 @@ qt_add_dbus_interface(DAEMON_SOURCES "${CMAKE_SOURCE_DIR}/data/interfaces/org.fr
qt_add_dbus_interface(DAEMON_SOURCES "${CMAKE_SOURCE_DIR}/data/interfaces/org.freedesktop.login1.User.xml" "Login1User")

add_executable(ddm ${DAEMON_SOURCES})
qt_add_repc_sources(ddm
${CMAKE_CURRENT_SOURCE_DIR}/ddmremote.rep
)
qt_add_repc_replicas(ddm
${CMAKE_CURRENT_SOURCE_DIR}/treelandremote.rep
)
target_link_libraries(ddm
PRIVATE
common
PUBLIC
Qt6::DBus
Qt6::Network
Qt6::RemoteObjects
PkgConfig::Pam
PkgConfig::LibSystemd
PkgConfig::WaylandClient
)

install(TARGETS ddm DESTINATION "${CMAKE_INSTALL_BINDIR}")
Loading
Loading