Remove depends of sdk-system and remove libukss

This commit is contained in:
xibowen 2024-01-30 09:43:21 +08:00
parent 9cfaa69087
commit 658b6d5edf
8 changed files with 16 additions and 76 deletions

View File

@ -2,8 +2,9 @@ pkg_check_modules(X11 REQUIRED x11)
pkg_check_modules(XTST REQUIRED xtst)
pkg_check_modules(QGS REQUIRED gsettings-qt)
pkg_check_modules(KDKINFO kysdk-sysinfo)
if (KDKINFO_FOUND)
add_definitions(-DKEKINFO_FOUND="true")
ADD_DEFINITIONS(-DKDKINFO_FOUND="true")
endif()
include_directories(${PROJECT_BINARY_DIR})

View File

@ -147,7 +147,7 @@ QString SCConfiguration::getDefaultBackground()
if(ispicture(backgroundFile)) {
return backgroundFile;
} else {
#ifdef KDK_INFOFOUND
#ifdef KDKINFO_FOUND
char *systemName = kdk_system_get_systemName();
#else
char *systemName = "none";

View File

@ -4,8 +4,9 @@ pkg_check_modules(X11 REQUIRED x11)
pkg_check_modules(XCB REQUIRED xcb)
pkg_check_modules(QGS REQUIRED gsettings-qt)
pkg_check_modules(KDKINFO kysdk-sysinfo)
if (KDKINFO_FOUND)
add_definitions(-DKEKINFO_FOUND="true")
ADD_DEFINITIONS(-DKDKINFO_FOUND="true")
endif()
include_directories(

View File

@ -231,7 +231,7 @@ end:
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
#ifdef KDK_INFOFOUND
#ifdef KDKINFO_FOUND
QString platForm = kdk_system_get_hostCloudPlatform();
#else
QString platForm = "none";

View File

@ -8,8 +8,9 @@ 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 kysdk-sysinfo)
if (KDKINFO_FOUND)
add_definitions(-DKEKINFO_FOUND="true")
ADD_DEFINITIONS(-DKDKINFO_FOUND="true")
endif()
pkg_check_modules(IMLIB2 REQUIRED imlib2)
@ -240,13 +241,13 @@ set(checkpass_SRC
add_executable(ukui-screensaver-checkpass ${checkpass_SRC})
target_link_libraries(ukui-screensaver-checkpass ${PAM_LIBRARIES})
set(ukss_SRCS
ukss_interface.cpp
)
#et(ukss_SRCS
# ukss_interface.cpp
#)
add_definitions(-DUKSSSO_LIBRARY)
add_library(ukss SHARED ${ukss_SRCS})
target_link_libraries(ukss Qt5::Core Qt5::DBus ${QGS_LIBRARIES})
#add_definitions(-DUKSSSO_LIBRARY)
#add_library(ukss SHARED ${ukss_SRCS})
#target_link_libraries(ukss Qt5::Core Qt5::DBus ${QGS_LIBRARIES})
install(TARGETS
ukui-screensaver-dialog
@ -255,7 +256,7 @@ install(TARGETS
ukui-screensaver-checkpass
DESTINATION bin)
install(TARGETS ukss DESTINATION ${QT_INSTALL_LIBS})
#install(TARGETS ukss DESTINATION ${QT_INSTALL_LIBS})
#set(test-act_SRC
# users.cpp

View File

@ -225,7 +225,7 @@ QString Configuration::getBackground()
{
if(ispicture(background))
return background;
#ifdef KDK_INFOFOUND
#ifdef KDKINFO_FOUND
char *systemName = kdk_system_get_hostCloudPlatform();
#else
char *systemName = "none";

View File

@ -1,32 +0,0 @@
/*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
**/
#include "ukss_interface.h"
#include <QProcess>
#include <QDebug>
int LockByBlank(QString strReason)
{
QProcess procCmd;
QString strCmd = QString("ukui-screensaver-command -b %1").arg(strReason);
qDebug()<<"LockByBlank,CMD:"<<strCmd;
procCmd.start(strCmd);
procCmd.waitForFinished(5000);
qDebug()<<"LockByBlank end!";
return 0;
}

View File

@ -1,31 +0,0 @@
/*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
**/
#ifndef __UKSS_INTERFACE_H__
#define __UKSS_INTERFACE_H__
#include <QString>
#if defined(UKSSSO_LIBRARY)
# define UKSSSO_EXPORT Q_DECL_EXPORT
#else
# define UKSSSO_EXPORT Q_DECL_IMPORT
#endif
extern "C" UKSSSO_EXPORT int LockByBlank(QString strReason);
#endif // __UKSS_INTERFACE_H__