From d4ca9d53b7ad68b0003586cdd3b900d7972af84d Mon Sep 17 00:00:00 2001 From: zt147369 Date: Tue, 25 Apr 2023 03:30:37 +0000 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E4=BB=B6=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zt147369 --- BUILD.gn | 25 +++++++++++-------------- bundle.json | 4 +++- restool.gni | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 15 deletions(-) create mode 100755 restool.gni diff --git a/BUILD.gn b/BUILD.gn index 3b78419..966a397 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -13,6 +13,8 @@ import("//build/ohos.gni") import("//build/test.gni") +import("./restool.gni") + ohos_executable("restool") { sources = [ "src/append_compiler.cpp", @@ -53,8 +55,7 @@ ohos_executable("restool") { "src/xml/xml_key_node.cpp", ] - include_dirs = [] - include_dirs += [ + include_dirs = [ "include", "//third_party/jsoncpp/include", "//third_party/sqlite/include", @@ -62,9 +63,9 @@ ohos_executable("restool") { ] deps = [ - "//developtools/global_resource_tool/build/bounds_checking_function:restool_bounds_checking_function", - "//developtools/global_resource_tool/build/jsoncpp:restool_jsoncpp", - "//developtools/global_resource_tool/build/sqlite3:restool_sqlite", + "build/bounds_checking_function:restool_bounds_checking_function", + "build/jsoncpp:restool_jsoncpp", + "build/sqlite3:restool_sqlite", "//third_party/libxml2:static_libxml2", ] @@ -84,21 +85,17 @@ ohos_unittest_py("restool_test") { sources = [ "test/test.py" ] } -ID_DEFINED_PATH = "//base/global/system_resources/systemres/main/resources/base/element/id_defined.json" - ohos_copy("restool_id_defined") { - sources = [ "${ID_DEFINED_PATH}" ] - outputs = - [ get_label_info( - "//developtools/global_resource_tool:restool($host_toolchain)", - "root_out_dir") + "/developtools/global_resource_tool/" ] - deps = [ "//developtools/global_resource_tool:restool($host_toolchain)" ] + sources = [ "${id_defined_path}" ] + outputs = [ get_label_info(":restool($host_toolchain)", "root_out_dir") + + "/developtools/global_resource_tool/" ] + deps = [ ":restool($host_toolchain)" ] subsystem_name = "developtools" part_name = "global_resource_tool" } ohos_prebuilt_etc("restool_systemres") { - source = "${ID_DEFINED_PATH}" + source = "${id_defined_path}" subsystem_name = "developtools" part_name = "global_resource_tool" } diff --git a/bundle.json b/bundle.json index 7243166..cb35589 100644 --- a/bundle.json +++ b/bundle.json @@ -1,7 +1,7 @@ { "name": "@ohos/global_resource_tool", "description": "OpenHarmony resource compile.", - "version": "3.1", + "version": "4.0", "license": "Apache License 2.0", "pubiishAs": "code-segment", "segment": { @@ -15,6 +15,8 @@ "syscap": [], "feature": [], "adapted_system_type": ["mini", "small", "standard" ], + "rom": "0KB", + "ram": "0KB", "deps": { "components": [], "third_party": [ diff --git a/restool.gni b/restool.gni new file mode 100755 index 0000000..f9d487d --- /dev/null +++ b/restool.gni @@ -0,0 +1,14 @@ +# Copyright (c) 2023 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. + +id_defined_path = "//base/global/system_resources/systemres/main/resources/base/element/id_defined.json"