1echo "======================================" 2echo "" 3echo "STEP 1: add skia component" 4echo "" 5echo "======================================" 6 7target_file="./productdefine/common/inherit/rich.json" 8sed -i '/"thirdparty"/{n;d}' ${target_file} 9 10target_line=' "components": [\ 11 {\ 12 "component": "skia",\ 13 "features": []\ 14 },' 15 16key_line='"thirdparty"' 17 18sed -i "/${key_line}/a\ ${target_line}" ${target_file} 19 20echo "======================================" 21echo "" 22echo " STEP 2: modify napi api" 23echo "" 24echo "======================================" 25 26api_target_gn_file="./base/hiviewdfx/hilog/interfaces/js/kits/napi/BUILD.gn" 27 28sed -i '/output_name/s/libhilog/libhilognapi/g' ${api_target_gn_file} 29 30api_target_file="./developtools/profiler/hidebug/interfaces/js/kits/napi/BUILD.gn" 31api_target_line='output_name = "libhidebugnapi"' 32sed -i "/ohos_shared_library/a\ ${api_target_line}" ${api_target_file} 33 34echo "======================================" 35echo "" 36echo " STEP 3: add dm compilation" 37echo "" 38echo "======================================" 39 40skia_bundle_file="./third_party/skia/bundle.json" 41 42skia_pivot_line='inner_kits' 43skia_target_line='"test": [ "//third_party/skia:dm(//build/toolchain/ohos:ohos_clang_arm)" ]' 44 45sed -i '/inner_kits/{n;d}' ${skia_bundle_file} 46sed -i "/${skia_pivot_line}/a\ ${skia_target_line}" ${skia_bundle_file} 47