!21 适配打印机驱动安装目录修改

Merge pull request !21 from dongzhengkuan/master
This commit is contained in:
openharmony_ci 2023-10-09 11:11:58 +00:00 committed by Gitee
commit ce9f0ec99c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 78 additions and 10 deletions

View File

@ -29,6 +29,7 @@ group("third_party_cups") {
deps = [ deps = [
":cups", ":cups",
":cups-deviced", ":cups-deviced",
":cups-driverd",
":cups-exec", ":cups-exec",
":cupsd", ":cupsd",
":cupsfilter", ":cupsfilter",
@ -45,7 +46,7 @@ config("cups_config") {
"$config_dir", "$config_dir",
"$cups_code_dir", "$cups_code_dir",
"$core_code_dir", "$core_code_dir",
"//third_party/libusb/libusb", "//third_party/libusb/libusb-1.0.26/libusb",
"//third_party/openssl/include", "//third_party/openssl/include",
] ]
@ -189,8 +190,57 @@ ohos_executable("ipp") {
part_name = "$PART_NAME" 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 #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 #ppdc
ohos_shared_library("cupsppdc") { ohos_shared_library("cupsppdc") {
sources = [ sources = [
@ -325,6 +375,24 @@ ohos_executable("cups-deviced") {
part_name = "$PART_NAME" 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") { ohos_executable("cups-exec") {
sources = [ "$scheduler_code_dir/cups-exec.c" ] sources = [ "$scheduler_code_dir/cups-exec.c" ]

View File

@ -24,7 +24,8 @@
"components": [], "components": [],
"third_party": [ "third_party": [
"zlib", "zlib",
"openssl" "openssl",
"libusb"
] ]
}, },
"build": { "build": {

View File

@ -26,7 +26,7 @@
#define CUPS_DEFAULT_SYSTEM_AUTHKEY "" #define CUPS_DEFAULT_SYSTEM_AUTHKEY ""
#define CUPS_DEFAULT_CONFIG_FILE_PERM 0640 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0640
#define CUPS_DEFAULT_LOG_FILE_PERM 0644 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
#define CUPS_DEFAULT_LOG_LEVEL "warn" #define CUPS_DEFAULT_LOG_LEVEL "debug2"
#define CUPS_DEFAULT_ACCESS_LOG_LEVEL "none" #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "none"
#define CUPS_DEFAULT_MAX_LOG_SIZE "1m" #define CUPS_DEFAULT_MAX_LOG_SIZE "1m"
#define CUPS_DEFAULT_FATAL_ERRORS "config" #define CUPS_DEFAULT_FATAL_ERRORS "config"
@ -34,7 +34,7 @@
#define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "" #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS ""
#define CUPS_DEFAULT_DEFAULT_SHARED 0 #define CUPS_DEFAULT_DEFAULT_SHARED 0
#define CUPS_DEFAULT_IPP_PORT 1631 #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_ERROR_POLICY "stop-printer"
#define CUPS_DEFAULT_MAX_COPIES 9999 #define CUPS_DEFAULT_MAX_COPIES 9999
#define CUPS_DEFAULT_WEBIF 0 #define CUPS_DEFAULT_WEBIF 0

View File

@ -15,25 +15,24 @@ cups_path = rebase_path("//third_party/cups")
exec_script("install.sh", [ "$cups_path" ]) exec_script("install.sh", [ "$cups_path" ])
print("cups installed successfully") 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_bin_dir = "bin"
cups_sbin_dir = "bin" cups_sbin_dir = "bin"
cups_serverbin_dir = "bin/cups" cups_serverbin_dir = "bin/cups"
cups_data_dir = "$CUPS_SERVICE_DATA_DIR/share"
init_service_cfg_path = "etc/init" init_service_cfg_path = "etc/init"
cups_defines = [ cups_defines = [
"CUPS_BINDIR = \"/system/$cups_bin_dir\"", "CUPS_BINDIR = \"/system/$cups_bin_dir\"",
"CUPS_SBINDIR = \"/system/$cups_sbin_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_DOCROOT = \"$CUPS_SERVICE_DATA_DIR/doc\"",
"CUPS_LOCALEDIR = \"$CUPS_SERVICE_DATA_DIR/locale\"", "CUPS_LOCALEDIR = \"$CUPS_SERVICE_DATA_DIR/locale\"",
"CUPS_LOGDIR = \"$CUPS_SERVICE_DATA_DIR/log/\"", "CUPS_LOGDIR = \"$CUPS_SERVICE_DATA_DIR/log\"",
"CUPS_SERVERROOT = \"$CUPS_SERVICE_DATA_DIR/\"", "CUPS_SERVERROOT = \"$CUPS_SERVICE_DATA_DIR\"",
"CUPS_CACHEDIR = \"$CUPS_SERVICE_DATA_DIR/cache\"", "CUPS_CACHEDIR = \"$CUPS_SERVICE_DATA_DIR/cache\"",
"CUPS_REQUESTS = \"$CUPS_SERVICE_DATA_DIR/spool\"", "CUPS_REQUESTS = \"$CUPS_SERVICE_DATA_DIR/spool\"",
"CUPS_STATEDIR = \"$CUPS_SERVICE_DATA_DIR/run\"", "CUPS_STATEDIR = \"$CUPS_SERVICE_DATA_DIR/run\"",