diff --git a/.gitignore b/.gitignore index 170653c..a4a5b15 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,21 @@ +# CMake 构建产物 build/ -.cache/ +build-deb/ +obj-*/ + +# Debian 打包产物 +release/ +debian/.debhelper/ +debian/dde-graphics-driver-applet/ +debian/debhelper-build-stamp +debian/files +debian/*.substvars + +# 编译中间文件 *.o *.so *.qm + +# 编辑器/工具 +.cache/ +.opencode/ diff --git a/build-deb.sh b/build-deb.sh new file mode 100755 index 0000000..6a6391b --- /dev/null +++ b/build-deb.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# 一键构建 deb 包脚本 +# 用法: bash build-deb.sh [--install] + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$SCRIPT_DIR" + +# 从 changelog 解析版本号 +VERSION=$(dpkg-parsechangelog -l debian/changelog -S Version) +PKG_NAME="dde-graphics-driver-applet" +ARCH=$(dpkg --print-architecture) +DEB_FILE="${PKG_NAME}_${VERSION}_${ARCH}.deb" +RELEASE_DIR="${SCRIPT_DIR}/release" + +echo "=== 清理旧构建 ===" +rm -rf build-deb obj-x86_64-linux-gnu +rm -f ../${PKG_NAME}_*.deb ../${PKG_NAME}_*.changes ../${PKG_NAME}_*.buildinfo + +echo "=== 构建 deb 包 (版本: ${VERSION}) ===" +dpkg-buildpackage -us -uc -b + +echo "" +echo "=== 收集构建产物到 release/ ===" +mkdir -p "${RELEASE_DIR}" +# 移动 deb、changes、buildinfo 到 release 目录 +for f in ../${PKG_NAME}_${VERSION}_${ARCH}.deb \ + ../${PKG_NAME}_${VERSION}_${ARCH}.changes \ + ../${PKG_NAME}_${VERSION}_${ARCH}.buildinfo; do + [ -f "$f" ] && mv "$f" "${RELEASE_DIR}/" +done +# dbgsym 调试包(如果存在) +for f in ../${PKG_NAME}-dbgsym_${VERSION}_${ARCH}.deb; do + [ -f "$f" ] && mv "$f" "${RELEASE_DIR}/" +done + +echo "" +echo "=== 构建完成 ===" +DEB_PATH="${RELEASE_DIR}/${DEB_FILE}" +echo "包路径: ${DEB_PATH}" +dpkg-deb -I "${DEB_PATH}" | grep -E "Package|Version|Architecture|Depends|Description" +echo "" +echo "release 目录内容:" +ls -lh "${RELEASE_DIR}/" + +# 可选:自动安装 +if [ "$1" = "--install" ]; then + echo "" + echo "=== 安装 deb 包 ===" + sudo apt install -y "${DEB_PATH}" + echo "=== 重启任务栏 ===" + systemctl --user restart dde-shell@DDE + echo "=== 安装完成 ===" +else + echo "" + echo "提示: 运行 'bash build-deb.sh --install' 可自动安装并重启任务栏" + echo " 或手动安装: sudo apt install ${DEB_PATH}" +fi diff --git a/debian/changelog b/debian/changelog index 99f6845..da93df5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +dde-graphics-driver-applet (1.0.1-1) unstable; urgency=medium + + * fix: resolve driver name detection using symlink target + * feat: show kernel version for open-source GPU drivers (amdgpu, etc.) + * feat: add card tooltip with GPU/driver/version info + + -- Jokul Mon, 13 Jul 2026 21:00:00 +0800 + dde-graphics-driver-applet (1.0.0-1) unstable; urgency=medium * Initial release. diff --git a/debian/compat b/debian/compat deleted file mode 100644 index b1bd38b..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -13 diff --git a/debian/control b/debian/control index 171a67f..aee9f38 100644 --- a/debian/control +++ b/debian/control @@ -6,16 +6,17 @@ Build-Depends: debhelper-compat (= 13), cmake (>= 3.16), g++, qt6-base-dev, - qt6-tools-dev-tools, - libdtk6core-dev, - libdtk6widget-dev + qt6-l10n-tools, + libdde-shell-dev, + libdtk6core-dev Standards-Version: 4.6.0 Homepage: https://github.com/linuxdeepin/dde-shell Package: dde-graphics-driver-applet Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, - deepin-graphics-driver-manager -Description: DDE Shell Graphics Driver Management Applet - Deepin graphics driver management applet for DDE Shell taskbar. - Provides GPU device detection, driver installation and switching functionality. + dde-shell +Description: DDE Shell Graphics Driver Info Applet + Deepin graphics driver info applet for DDE Shell taskbar. + Detects GPU devices via lspci and displays driver information + (driver name and version) in a popup with card-based UI. diff --git a/debian/rules b/debian/rules old mode 100644 new mode 100755 diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)