From 168a6b53c20baaa904a2f698cf5ec8de011af26f Mon Sep 17 00:00:00 2001 From: shaozhimin Date: Wed, 11 Oct 2023 10:23:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=B8=BB=E7=BA=BF=EF=BC=8C?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E4=BF=AE=E6=94=B9=EF=BC=9A=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E5=92=8Cusb=E9=83=A8=E5=88=86=E5=9B=A0?= =?UTF-8?q?=E4=B8=BA=E6=8B=86=E5=88=86=E5=8A=A8=E6=80=81=E5=BA=93=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E5=85=BC=E5=AE=B9=E6=80=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 8 +++++++ debian/libkysdk-hardware.install | 2 -- development-files/kysdk-hardware.pc | 2 +- development-files/kysdk-system.pc | 2 +- src/hardware/CMakeLists.txt | 37 +++++++---------------------- src/kysdkdbus/CMakeLists.txt | 2 +- src/proc/libkyprocess.c | 1 + 7 files changed, 21 insertions(+), 33 deletions(-) diff --git a/debian/changelog b/debian/changelog index 143ab3c..5fb9965 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +libkysdk-system (2.2.3.5-0k0.16) yangtze; urgency=medium + + *Bug号: + *需求号: + *其他修改:修复打印和usb部分因为拆分动态库导致的兼容性问题 + + -- szm-min Wed, 11 Oct 2023 09:43:29 +0800 + libkysdk-system (2.2.3.5-0k0.15) yangtze; urgency=medium *Bug号: diff --git a/debian/libkysdk-hardware.install b/debian/libkysdk-hardware.install index 0140d93..737473a 100644 --- a/debian/libkysdk-hardware.install +++ b/debian/libkysdk-hardware.install @@ -3,5 +3,3 @@ usr/lib/kysdk/kysdk-system/libkybluetooth.so* usr/lib/kysdk/kysdk-system/libkyedid.so* usr/lib/kysdk/kysdk-system/libkyfan.so* usr/lib/kysdk/kysdk-system/libkyhwinfo.so* -usr/lib/kysdk/kysdk-system/libkyprinter.so* -usr/lib/kysdk/kysdk-system/libkyusb.so* diff --git a/development-files/kysdk-hardware.pc b/development-files/kysdk-hardware.pc index 6a5d464..63856d5 100644 --- a/development-files/kysdk-hardware.pc +++ b/development-files/kysdk-hardware.pc @@ -2,5 +2,5 @@ Name: libkysdk-hardware Description: kysdk system layer hardware component Requires: kysdk-log kysdk-config libsystemd libudev Version: 2.0.0 -Libs: -L/usr/lib/kysdk/kysdk-system/ -L/usr/lib/kysdk/kysdk-base -lkyhw -Wl,-rpath=/usr/lib/kysdk/kysdk-system/ +Libs: -L/usr/lib/kysdk/kysdk-system/ -L/usr/lib/kysdk/kysdk-base -lkyhw -lkybluetooth -lkyedid -lkyfan -lkyhwinfo -Wl,-rpath=/usr/lib/kysdk/kysdk-system/ Cflags: -I/usr/include/kysdk/kysdk-system/ diff --git a/development-files/kysdk-system.pc b/development-files/kysdk-system.pc index fea9967..c4cc882 100644 --- a/development-files/kysdk-system.pc +++ b/development-files/kysdk-system.pc @@ -2,5 +2,5 @@ Name: libkysdk-system Description: kysdk system layer Requires: kysdk-disk kysdk-filesystem kysdk-hardware kysdk-package kysdk-proc kysdk-sysinfo kysdk-location kysdk-net kysdk-realtime Version: 2.0.0 -Libs: -L/usr/lib/kysdk/kysdk-system/ -L/usr/lib/kysdk/kysdk-base -lkydiskinfo -lkyfilewatcher -lkyhw -lkypackage -lkysysinfo -lkyrtinfo -lkylocation -lkynetinfo -lkyrealtime -Wl,-rpath=/usr/lib/kysdk/kysdk-system/ +Libs: -L/usr/lib/kysdk/kysdk-system/ -L/usr/lib/kysdk/kysdk-base -lkydiskinfo -lkyfilewatcher -lkyhw -lkypackage -lkysysinfo -lkyrtinfo -lkylocation -lkynetinfo -lkyrealtime -lkybluetooth -lkyedid -lkyfan -lkyhwinfo -Wl,-rpath=/usr/lib/kysdk/kysdk-system/ Cflags: -I/usr/include/kysdk/kysdk-system/ diff --git a/src/hardware/CMakeLists.txt b/src/hardware/CMakeLists.txt index 19df316..74ffa87 100644 --- a/src/hardware/CMakeLists.txt +++ b/src/hardware/CMakeLists.txt @@ -13,7 +13,11 @@ set(hwcode "${HARDWARE_TOP_DIR}/libkydisplay.h" "${HARDWARE_TOP_DIR}/libkydisplay.c" "${HARDWARE_TOP_DIR}/libkync.h" - "${HARDWARE_TOP_DIR}/libkync.c") + "${HARDWARE_TOP_DIR}/libkync.c" + "${HARDWARE_TOP_DIR}/libkyprinter.h" + "${HARDWARE_TOP_DIR}/libkyprinter.c" + "${HARDWARE_TOP_DIR}/libkyusb.h" + "${HARDWARE_TOP_DIR}/libkyusb.c") set(bluetoothcode @@ -32,15 +36,6 @@ set(hwinfocode "${HARDWARE_TOP_DIR}/libkyhw.h" "${HARDWARE_TOP_DIR}/libkyhw.c") -set(printercode - "${HARDWARE_TOP_DIR}/libkyprinter.h" - "${HARDWARE_TOP_DIR}/libkyprinter.c") - -set(usbcode - "${HARDWARE_TOP_DIR}/libkyusb.h" - "${HARDWARE_TOP_DIR}/libkyusb.c") - - add_library(kyhw SHARED ${hwcode}) set_target_properties(kyhw PROPERTIES VERSION 2.0.0 SOVERSION 1) @@ -57,12 +52,6 @@ set_target_properties(kyfan PROPERTIES VERSION 2.0.0 SOVERSION 1) add_library(kyhwinfo SHARED ${hwinfocode}) set_target_properties(kyhwinfo PROPERTIES VERSION 2.0.0 SOVERSION 1) -add_library(kyprinter SHARED ${printercode}) -set_target_properties(kyprinter PROPERTIES VERSION 2.0.0 SOVERSION 1) - -add_library(kyusb SHARED ${usbcode}) -set_target_properties(kyusb PROPERTIES VERSION 2.0.0 SOVERSION 1) - add_executable(kync-test test/kync-test.c) add_executable(kycpu-test test/kycpu-test.c) add_executable(kyprinterlist-test test/kyprinterlist-test.c) @@ -76,19 +65,17 @@ add_executable(kybluetooth-test test/kybluetooth-test.c) add_executable(kyfan-test test/kyfan-test.c) add_executable(kyhw-test test/kyhw-test.c) # 额外链接的库在这一行 -target_link_libraries(kyhw kylog kyconf pthread systemd ${GLIB_LIBRARIES}) +target_link_libraries(kyhw kylog kyconf pthread systemd cups curl udev ${GLIB_LIBRARIES}) target_link_libraries(kybluetooth bluetooth hd gobject-2.0) target_link_libraries(kyedid kylog m X11 Xrandr hd) target_link_libraries(kyfan sensors) target_link_libraries(kyhwinfo kylog hd pci dbus-glib-1) -target_link_libraries(kyprinter cups curl) -target_link_libraries(kyusb kylog udev) # target_link_libraries(kyhw kylog kyconf pthread systemd cups curl udev X11 Xrandr bluetooth sensors hd pci gobject-2.0 dbus-glib-1 ${GLIB_LIBRARIES}) -target_link_libraries(kyprinterprint-test kyprinter) -target_link_libraries(kyprinterlist-test kyprinter) +target_link_libraries(kyprinterprint-test kyhw) +target_link_libraries(kyprinterlist-test kyhw) target_link_libraries(kync-test kyhw) target_link_libraries(kycpu-test kyhw) -target_link_libraries(kyusb-test kyusb) +target_link_libraries(kyusb-test kyhw) target_link_libraries(kybios-test kyhw) target_link_libraries(kyboard-test kyhw) target_link_libraries(kydisplay-test kyhw) @@ -112,12 +99,6 @@ install(TARGETS kyfan install(TARGETS kyhwinfo DESTINATION lib/kysdk/kysdk-system) -install(TARGETS kyprinter - DESTINATION lib/kysdk/kysdk-system) - -install(TARGETS kyusb - DESTINATION lib/kysdk/kysdk-system) - install(FILES libkync.h DESTINATION include/kysdk/kysdk-system) diff --git a/src/kysdkdbus/CMakeLists.txt b/src/kysdkdbus/CMakeLists.txt index 2cbcd19..06c0011 100644 --- a/src/kysdkdbus/CMakeLists.txt +++ b/src/kysdkdbus/CMakeLists.txt @@ -7,7 +7,7 @@ find_package(Qt5 COMPONENTS Core DBus REQUIRED) include_directories(${Qt5Core_INCLUDE_DIRS}) include_directories(${Qt5DBus_INCLUDE_DIRS}) ADD_EXECUTABLE(kySdkDbus kysdkdbus.cpp main.cpp) -target_link_libraries(kySdkDbus kysysinfo kyhw kyprinter kyusb kydiskinfo kyrtinfo kynetinfo kyrealtime kydiskinfo kylocation kypackage Qt5::Core Qt5::DBus) +target_link_libraries(kySdkDbus kysysinfo kyhw kydiskinfo kyrtinfo kynetinfo kyrealtime kydiskinfo kylocation kypackage Qt5::Core Qt5::DBus) ADD_EXECUTABLE(kySdkDbus-session kysdkrest.cpp main_rest.cpp) diff --git a/src/proc/libkyprocess.c b/src/proc/libkyprocess.c index fd6f587..d0c8f59 100644 --- a/src/proc/libkyprocess.c +++ b/src/proc/libkyprocess.c @@ -413,6 +413,7 @@ int kdk_get_process_id(char *proc_name) break; } FREE(canonical_filename); + fclose(fp); } if ((strcmp(name, proc_name)) == 0)