diff --git a/debian/control b/debian/control index 83f88d5..d69cc21 100644 --- a/debian/control +++ b/debian/control @@ -12,13 +12,11 @@ Build-Depends: cmake (>=2.6), libglib2.0-dev, libgsettings-qt-dev, libimlib2-dev, -# libinput-dev, libkf5networkmanagerqt-dev, libkf5screen-dev, libkf5wayland-dev, libkf5windowsystem-dev, libkylin-nm-base (>=3.20.0.9-0k1), - libkysdk-system-dev, liblayershellqtinterface-dev, libmatemixer-dev, libnm-dev, @@ -27,24 +25,13 @@ Build-Depends: cmake (>=2.6), libqt5svg5-dev, libqt5x11extras5-dev, libukui-log4qt-dev, -<<<<<<< HEAD -# libukuiinputgatherclient-dev, libx11-dev, libxtst-dev, qtbase5-dev, qtmultimedia5-dev, qttools5-dev, - qttools5-dev-tools, -# ukui-input-gather (>=1.0.0.2) -Standards-Version: 4.6.1.0 -======= - libkysdk-sysinfo-dev (>> 1.1.0kylin1), -# ukui-input-gather (>=1.0.0.2), -# libinput-dev, -# libukuiinputgatherclient-dev, - liblayershellqtinterface-dev + qttools5-dev-tools Standards-Version: 4.5.0 ->>>>>>> e44ffbac59dbff49a5ed8df98a3a89af16d6b847 Rules-Requires-Root: no Homepage: https://gitee.com/openkylin/ukui-screensaver Vcs-Git: https://gitee.com/openkylin/ukui-screensaver.git @@ -56,14 +43,7 @@ Depends: ethtool, layer-shell-qt, libpam-biometric(>=3.20.0.10), mate-desktop-common, -# ukui-input-gather(>=1.0.0.2), ukui-session-manager, -<<<<<<< HEAD -======= - libpam-biometric(>=3.20.0.10), -# ukui-input-gather(>=1.0.0.2), - layer-shell-qt, ->>>>>>> e44ffbac59dbff49a5ed8df98a3a89af16d6b847 ${misc:Depends}, ${shlibs:Depends} Replaces: ukui-screensaver-common (<< 2.0.0) diff --git a/screensaver/CMakeLists.txt b/screensaver/CMakeLists.txt index ce810ff..9dfd1ae 100644 --- a/screensaver/CMakeLists.txt +++ b/screensaver/CMakeLists.txt @@ -1,7 +1,10 @@ pkg_check_modules(X11 REQUIRED x11) pkg_check_modules(XTST REQUIRED xtst) pkg_check_modules(QGS REQUIRED gsettings-qt) -pkg_check_modules(KDKINFO REQUIRED kysdk-sysinfo) + +if (KDKINFO_FOUND) + add_definitions(-DKEKINFO_FOUND="true") +endif() include_directories(${PROJECT_BINARY_DIR}) include_directories(${PROJECT_SOURCE_DIR}/Common) diff --git a/screensaver/scconfiguration.cpp b/screensaver/scconfiguration.cpp index 31bba70..80bb32a 100644 --- a/screensaver/scconfiguration.cpp +++ b/screensaver/scconfiguration.cpp @@ -21,7 +21,11 @@ #include #include #include + +#ifdef KDKINFO_FOUND #include +#endif + #include #include #include "glibinterface.h" @@ -143,7 +147,11 @@ QString SCConfiguration::getDefaultBackground() if(ispicture(backgroundFile)) { return backgroundFile; } else { +#ifdef KDK_INFOFOUND char *systemName = kdk_system_get_systemName(); +#else + char *systemName = "none"; +#endif if (systemName) { if (QString(systemName) == "openKylin") { free(systemName); diff --git a/set4kScale/CMakeLists.txt b/set4kScale/CMakeLists.txt index 9429dfa..d303f37 100644 --- a/set4kScale/CMakeLists.txt +++ b/set4kScale/CMakeLists.txt @@ -3,7 +3,10 @@ project(set4kScale) pkg_check_modules(X11 REQUIRED x11) pkg_check_modules(XCB REQUIRED xcb) pkg_check_modules(QGS REQUIRED gsettings-qt) -pkg_check_modules(KDKINFO REQUIRED kysdk-sysinfo) + +if (KDKINFO_FOUND) + add_definitions(-DKEKINFO_FOUND="true") +endif() include_directories( ${X11_INCLUDE_DIRS} diff --git a/set4kScale/main.cpp b/set4kScale/main.cpp index dda6306..5689037 100644 --- a/set4kScale/main.cpp +++ b/set4kScale/main.cpp @@ -28,7 +28,10 @@ #include #include #include + +#ifdef KDKINFO_FOUND #include +#endif extern "C" { #include @@ -228,7 +231,11 @@ end: int main(int argc, char *argv[]) { QApplication a(argc, argv); +#ifdef KDK_INFOFOUND QString platForm = kdk_system_get_hostCloudPlatform(); +#else + QString platForm = "none"; +#endif if (platForm == "none") { qDebug() << "platForm=" << platForm << ", 系统环境为实体机"; setHightResolutionScreenZoom(false); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 25d5d07..87b0745 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,7 +7,11 @@ pkg_check_modules(QGS REQUIRED gsettings-qt) pkg_check_modules(GLIB REQUIRED glib-2.0) pkg_check_modules(MMIX REQUIRED libmatemixer) pkg_check_modules(kylin-nm-base REQUIRED kylin-nm-base) -pkg_check_modules(KDKINFO REQUIRED kysdk-sysinfo) + +if (KDKINFO_FOUND) + add_definitions(-DKEKINFO_FOUND="true") +endif() + pkg_check_modules(IMLIB2 REQUIRED imlib2) find_library(PAM_LIBRARIES pam) diff --git a/src/configuration.cpp b/src/configuration.cpp index 5eda310..974d9f3 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -26,7 +26,11 @@ #include #include #include + +#ifdef KDKINFO_FOUND #include +#endif + #include #include #include "glibinterface.h" @@ -221,8 +225,11 @@ QString Configuration::getBackground() { if(ispicture(background)) return background; - - char *systemName = kdk_system_get_systemName(); +#ifdef KDK_INFOFOUND + char *systemName = kdk_system_get_hostCloudPlatform(); +#else + char *systemName = "none"; +#endif if (systemName) { if (QString(systemName) == "openKylin") { free(systemName);