Open
Commonlibrary support previewer for more modules #2724
Commonlibrary support previewer for more modules #2724
Open
chen-hantao123Add on 10 days ago
Total: 1 files changed+93-0
@@ -43,6 +43,77 @@ if (is_ohos_standard_system && product_name == "ohos-sdk") {
43 part_name = "ets_utils"43 part_name = "ets_utils"
44 subsystem_name = "commonlibrary"44 subsystem_name = "commonlibrary"
45 },45 },
46+ {
47+ label = "//commonlibrary/ets_utils/js_concurrent_module/utils:utils"
48+ lib_names = [ "utils" ]
49+ part_name = "ets_utils"
50+ subsystem_name = "commonlibrary"
51+ },
52+ ]
53+ 
54+ # All dynamic libraries to be copied to path "/previewer/common/bin/module/",
55+ # whose native module name has no dot, can be added to this script.
56+ ets_utils_bin = [
57+ {
58+ label = "//commonlibrary/ets_utils/js_util_module/util:util"
59+ lib_names = [ "util" ]
60+ part_name = "ets_utils"
61+ subsystem_name = "commonlibrary"
62+ },
63+ {
64+ label = "//commonlibrary/ets_utils/js_concurrent_module/taskpool:taskpool"
65+ lib_names = [ "taskpool" ]
66+ part_name = "ets_utils"
67+ subsystem_name = "commonlibrary"
68+ },
69+ {
70+ label = "//commonlibrary/ets_utils/js_concurrent_module/worker:worker"
71+ lib_names = [ "worker" ]
72+ part_name = "ets_utils"
73+ subsystem_name = "commonlibrary"
74+ },
75+ {
76+ label = "//commonlibrary/ets_utils/js_api_module/fastbuffer:fastbuffer"
77+ lib_names = [ "fastbuffer" ]
78+ part_name = "ets_utils"
79+ subsystem_name = "commonlibrary"
80+ },
81+ {
82+ label = "//commonlibrary/ets_utils/js_api_module/convertxml:convertxml"
83+ lib_names = [ "convertxml" ]
84+ part_name = "ets_utils"
85+ subsystem_name = "commonlibrary"
86+ },
87+ {
88+ label = "//commonlibrary/ets_utils/js_sys_module/process:process"
89+ lib_names = [ "process" ]
90+ part_name = "ets_utils"
91+ subsystem_name = "commonlibrary"
92+ },
93+ {
94+ label = "//commonlibrary/ets_utils/js_util_module/stream:stream"
95+ lib_names = [ "stream" ]
96+ part_name = "ets_utils"
97+ subsystem_name = "commonlibrary"
98+ },
99+ {
100+ label = "//commonlibrary/ets_utils/js_api_module/uri:uri"
101+ lib_names = [ "uri" ]
102+ part_name = "ets_utils"
103+ subsystem_name = "commonlibrary"
104+ },
105+ {
106+ label = "//commonlibrary/ets_utils/js_api_module/url:url"
107+ lib_names = [ "url" ]
108+ part_name = "ets_utils"
109+ subsystem_name = "commonlibrary"
110+ },
111+ {
112+ label = "//commonlibrary/ets_utils/js_api_module/xml:xml"
113+ lib_names = [ "xml" ]
114+ part_name = "ets_utils"
115+ subsystem_name = "commonlibrary"
116+ },
46 ]117 ]
47 118 
48 not_needed("*", [ "dylib_suffix" ])119 not_needed("*", [ "dylib_suffix" ])
@@ -91,6 +162,28 @@ if (is_ohos_standard_system && product_name == "ohos-sdk") {
91 module_source_dir = target_out_dir + "/previewer/common/bin/module/arkts/"162 module_source_dir = target_out_dir + "/previewer/common/bin/module/arkts/"
92 module_install_name = ""163 module_install_name = ""
93 }164 }
165+ 
166+ ohos_copy("copy_previewer_debug_module") {
167+ public_deps = []
168+ sources = []
169+ foreach(item, ets_utils_bin) {
170+ public_deps += [ item.label ]
171+ out_path = get_label_info(item.label, "root_out_dir")
172+ lib_names = []
173+ if (defined(item.lib_names)) {
174+ lib_names += item.lib_names
175+ } else {
176+ lib_names += [ string_replace(get_label_info(item.label, "name"), "lib", "", 1) ]
177+ }
178+ foreach(lib_name, lib_names) {
179+ sources += [ "${out_path}/commonlibrary/ets_utils/lib${lib_name}${dylib_suffix}" ]
180+ }
181+ }
182+ 
183+ outputs = [ target_out_dir + "/previewer/common/bin/module/{{source_file_part}}" ]
184+ module_source_dir = target_out_dir + "/previewer/common/bin/module/"
185+ module_install_name = ""
186+ }
94}187}
95 188 
96generate_static_abc("base_sdk") {189generate_static_abc("base_sdk") {