mirror of
https://gitee.com/openharmony/startup_appspawn
synced 2024-11-27 09:11:04 +00:00
51f3a6629a
Merge pull request !142 from 熊磊/0317xytremovedeps
184 lines
5.7 KiB
Plaintext
184 lines
5.7 KiB
Plaintext
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
import("//base/startup/appspawn_standard/appspawn.gni")
|
|
import("//build/ohos.gni")
|
|
|
|
config("appspawn_config") {
|
|
visibility = [ ":*" ]
|
|
include_dirs = [
|
|
"src/include",
|
|
"interfaces/innerkits/include",
|
|
"//utils/native/base/include",
|
|
"${aafwk_path}/frameworks/kits/appkit/native/app/include",
|
|
"${aafwk_path}/interfaces/innerkits/app_manager/include/appmgr",
|
|
"${appexecfwk_path}/interfaces/innerkits/libeventhandler/include",
|
|
"${appexecfwk_path}/common/log/include",
|
|
"${aafwk_path}/interfaces/innerkits/want/include/ohos/aafwk/content",
|
|
"${aafwk_path}/interfaces/innerkits/want/include",
|
|
"${aafwk_path}/interfaces/innerkits/ability_manager/include",
|
|
"${aafwk_path}/interfaces/innerkits/base/include",
|
|
"${aafwk_path}/frameworks/kits/ability/native/include",
|
|
"${aafwk_path}/services/abilitymgr/include",
|
|
"//base/security/access_token/interfaces/innerkits/token_setproc/include",
|
|
"//base/startup/init_lite/services/log",
|
|
"//base/startup/init_lite/interfaces/innerkits/include",
|
|
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
|
|
]
|
|
|
|
if (build_selinux) {
|
|
cflags = [ "-DWITH_SELINUX" ]
|
|
}
|
|
}
|
|
|
|
ohos_executable("appspawn") {
|
|
sources = [ "${appspawn_path}/src/main.cpp" ]
|
|
configs = [ ":appspawn_config" ]
|
|
deps = [
|
|
"${appspawn_path}:appspawn_server",
|
|
"//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
|
|
]
|
|
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
|
|
|
install_enable = true
|
|
subsystem_name = "${subsystem_name}"
|
|
part_name = "${part_name}"
|
|
}
|
|
|
|
ohos_static_library("appspawn_server") {
|
|
sources = [
|
|
"${appspawn_path}/src/appspawn_msg_peer.cpp",
|
|
"${appspawn_path}/src/appspawn_server.cpp",
|
|
"${appspawn_path}/src/socket/appspawn_socket.cpp",
|
|
"${appspawn_path}/src/socket/server_socket.cpp",
|
|
]
|
|
defines = [ "INIT_AGENT" ]
|
|
configs = [ ":appspawn_config" ]
|
|
ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64z" ]
|
|
deps = [
|
|
"${aafwk_path}/frameworks/kits/ability/native:abilitykit_native",
|
|
"${aafwk_path}/frameworks/kits/appkit:appkit_native",
|
|
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
|
|
"//base/startup/init_lite/services/log:init_log",
|
|
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
|
|
"//utils/native/base:utils",
|
|
]
|
|
external_deps = [
|
|
"ability_base:want",
|
|
"hilog_native:libhilog",
|
|
"hiviewdfx_hilog_native:libhilog",
|
|
"ipc:ipc_core",
|
|
"safwk:system_ability_fwk",
|
|
"samgr_standard:samgr_proxy",
|
|
]
|
|
|
|
if (build_selinux) {
|
|
external_deps += [ "selinux:libhap_restorecon" ]
|
|
}
|
|
|
|
subsystem_name = "${subsystem_name}"
|
|
part_name = "${part_name}"
|
|
}
|
|
|
|
ohos_executable("appspawntools") {
|
|
sources = [ "${appspawn_path}/tools/appspawn_start_app.cpp" ]
|
|
configs = [ ":appspawn_config" ]
|
|
deps = [
|
|
"${appspawn_path}:appspawn_server",
|
|
"//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
|
|
]
|
|
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
|
|
|
install_enable = true
|
|
subsystem_name = "${subsystem_name}"
|
|
part_name = "${part_name}"
|
|
}
|
|
|
|
ohos_prebuilt_etc("appspawn.rc") {
|
|
source = "appspawn.cfg"
|
|
relative_install_dir = "init"
|
|
subsystem_name = "${subsystem_name}"
|
|
part_name = "${part_name}"
|
|
}
|
|
|
|
ohos_executable("nwebspawn") {
|
|
defines = [ "NWEB_SPAWN" ]
|
|
sources = [ "${appspawn_path}/src/main.cpp" ]
|
|
configs = [ ":appspawn_config" ]
|
|
deps = [
|
|
"${appspawn_path}:nwebspawn_server",
|
|
"//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
|
|
]
|
|
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
|
|
|
install_enable = true
|
|
subsystem_name = "${subsystem_name}"
|
|
part_name = "${part_name}"
|
|
}
|
|
|
|
ohos_static_library("nwebspawn_server") {
|
|
defines = [
|
|
"INIT_AGENT",
|
|
"NWEB_SPAWN",
|
|
]
|
|
sources = [
|
|
"${appspawn_path}/src/appspawn_msg_peer.cpp",
|
|
"${appspawn_path}/src/appspawn_server.cpp",
|
|
"${appspawn_path}/src/socket/appspawn_socket.cpp",
|
|
"${appspawn_path}/src/socket/server_socket.cpp",
|
|
]
|
|
configs = [ ":appspawn_config" ]
|
|
ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64z" ]
|
|
deps = [
|
|
"${aafwk_path}/frameworks/kits/ability/native:abilitykit_native",
|
|
"${aafwk_path}/frameworks/kits/appkit:appkit_native",
|
|
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
|
|
"//base/startup/init_lite/interfaces/innerkits/socket:libsocket_static",
|
|
"//base/startup/init_lite/services/log:init_log",
|
|
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
|
|
"//utils/native/base:utils",
|
|
]
|
|
external_deps = [
|
|
"ability_base:want",
|
|
"hilog_native:libhilog",
|
|
"hiviewdfx_hilog_native:libhilog",
|
|
"ipc:ipc_core",
|
|
"safwk:system_ability_fwk",
|
|
"samgr_standard:samgr_proxy",
|
|
]
|
|
|
|
if (build_selinux) {
|
|
external_deps += [ "selinux:libhap_restorecon" ]
|
|
}
|
|
|
|
subsystem_name = "${subsystem_name}"
|
|
part_name = "${part_name}"
|
|
}
|
|
|
|
ohos_prebuilt_etc("nwebspawn.rc") {
|
|
source = "nwebspawn.cfg"
|
|
relative_install_dir = "init"
|
|
subsystem_name = "${subsystem_name}"
|
|
part_name = "${part_name}"
|
|
}
|
|
|
|
group("nweb") {
|
|
deps = []
|
|
if (appspawn_support_nweb) {
|
|
deps += [
|
|
":nwebspawn",
|
|
":nwebspawn.rc",
|
|
]
|
|
}
|
|
}
|