Adaptable printer driver Singed-off-by:dongzhengkuan@huawei.com

Signed-off-by: 15549494042 <dongzhengkuan@huawei.com>
This commit is contained in:
15549494042 2023-08-31 20:36:58 +08:00
parent fee18c4c16
commit dfadccc558
3 changed files with 85 additions and 5 deletions

View File

@ -36,6 +36,11 @@ group("third_party_cups") {
":mime.convs",
":mime.types",
":rastertopwg",
":usb",
":lpinfo",
":lpadmin",
":lp",
":cups-driverd"
]
}
@ -45,7 +50,7 @@ config("cups_config") {
"$config_dir",
"$cups_code_dir",
"$core_code_dir",
"//third_party/libusb/libusb",
"//third_party/libusb/libusb-1.0.26/libusb",
"//third_party/openssl/include",
]
@ -189,8 +194,64 @@ ohos_executable("ipp") {
part_name = "$PART_NAME"
}
ohos_executable("usb") {
sources = [
"$backend_code_dir/usb.c"
]
deps = [
"//third_party/cups:backend",
"//third_party/cups:cups",
"//third_party/libusb:libusb"
]
install_enable = true
module_install_dir = "$cups_serverbin_dir/backend"
public_configs = [ ":cups_config" ]
subsystem_name = "$SUBSYSTEM_NAME"
part_name = "$PART_NAME"
}
#end of backend
ohos_executable("lpadmin") {
sources = [ "$cups_code_dir/systemv/lpadmin.c" ]
deps = [
"//third_party/cups:cups",
]
install_enable = true
public_configs = [ ":cups_config" ]
subsystem_name = "$SUBSYSTEM_NAME"
part_name = "$PART_NAME"
}
ohos_executable("lpinfo") {
sources = [ "$cups_code_dir/systemv/lpinfo.c" ]
deps = [
"//third_party/cups:cups",
]
install_enable = true
public_configs = [ ":cups_config" ]
subsystem_name = "$SUBSYSTEM_NAME"
part_name = "$PART_NAME"
}
ohos_executable("lp") {
sources = [ "$cups_code_dir/systemv/lp.c" ]
deps = [
"//third_party/cups:cups",
]
install_enable = true
public_configs = [ ":cups_config" ]
subsystem_name = "$SUBSYSTEM_NAME"
part_name = "$PART_NAME"
}
#ppdc
ohos_shared_library("cupsppdc") {
sources = [
@ -325,6 +386,25 @@ ohos_executable("cups-deviced") {
part_name = "$PART_NAME"
}
ohos_executable("cups-driverd") {
sources = [
"$scheduler_code_dir/cups-driverd.cxx",
"$scheduler_code_dir/util.c",
]
deps = [
"//third_party/cups:cups",
"//third_party/cups:cupsppdc",
]
install_enable = true
module_install_dir = "$cups_serverbin_dir/daemon"
public_configs = [ ":cups_config" ]
subsystem_name = "$SUBSYSTEM_NAME"
part_name = "$PART_NAME"
}
ohos_executable("cups-exec") {
sources = [ "$scheduler_code_dir/cups-exec.c" ]

View File

@ -34,7 +34,7 @@
#define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS ""
#define CUPS_DEFAULT_DEFAULT_SHARED 0
#define CUPS_DEFAULT_IPP_PORT 1631
#define CUPS_DEFAULT_PRINTCAP "/data/service/el1/public/cups/printcap"
#define CUPS_DEFAULT_PRINTCAP "/data/service/el1/public/print_service/cups/printcap"
#define CUPS_DEFAULT_ERROR_POLICY "stop-printer"
#define CUPS_DEFAULT_MAX_COPIES 9999
#define CUPS_DEFAULT_WEBIF 0

View File

@ -15,7 +15,7 @@ cups_path = rebase_path("//third_party/cups")
exec_script("install.sh", [ "$cups_path" ])
print("cups installed successfully")
CUPS_SERVICE_DATA_DIR = "/data/service/el1/public/cups"
CUPS_SERVICE_DATA_DIR = "/data/service/el1/public/print_service/cups"
cups_bin_dir = "bin"
cups_sbin_dir = "bin"
@ -26,9 +26,9 @@ init_service_cfg_path = "etc/init"
cups_defines = [
"CUPS_BINDIR = \"/system/$cups_bin_dir\"",
"CUPS_SBINDIR = \"/system/$cups_sbin_dir\"",
"CUPS_SERVERBIN = \"/system/bin/cups\"",
"CUPS_SERVERBIN = \"$CUPS_SERVICE_DATA_DIR/serverbin\"",
"CUPS_DATADIR = \"/system/etc/cups/share\"",
"CUPS_DATADIR = \"$CUPS_SERVICE_DATA_DIR/datadir\"",
"CUPS_DOCROOT = \"$CUPS_SERVICE_DATA_DIR/doc\"",
"CUPS_LOCALEDIR = \"$CUPS_SERVICE_DATA_DIR/locale\"",
"CUPS_LOGDIR = \"$CUPS_SERVICE_DATA_DIR/log/\"",