/build/ohos/images/ |
H A D | build_image.py | 17 import os namespace 24 os.path.dirname(os.path.dirname(os.path.dirname( 25 os.path.abspath(__file__))))) 31 if os.path.exists(userdata_path): 33 os.makedirs(userdata_path, exist_ok=True) 37 root_dir = os.path.join(os.path.dirname(system_path), 'root') 38 if os [all...] |
/build/hb/resources/ |
H A D | global_var.py | 19 import os namespace 22 CURRENT_OHOS_ROOT = os.path.dirname(os.path.dirname( 23 os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) 24 CURRENT_BUILD_DIR = os.path.join(CURRENT_OHOS_ROOT, 'build') 25 CURRENT_HB_DIR = os.path.join(CURRENT_BUILD_DIR, 'hb') 26 DEFAULT_CCACHE_DIR = os.path.join(CURRENT_OHOS_ROOT, '.ccache') 28 ARGS_DIR = os [all...] |
/build/toolchain/ |
H A D | mini_debug_info.py | 21 import os namespace 27 with os.fdopen(os.open(tmp_file, os.O_RDWR | os.O_CREAT), 'w', encoding='utf-8') as output_file: 31 with os.fdopen(os.open(symbols_path, os.O_RDWR | os.O_CREAT), 'w', encoding='utf-8') as output_file: 47 llvm_dir_path = os [all...] |
/build/ |
H A D | prebuilts_config.py | 19 import os
namespace 49 sha_sums256_path = os.path.join(os.path.dirname(check_url), sha_sums256)
50 file_name = os.path.basename(check_url)
69 if not os.path.exists(dest):
70 os.makedirs(dest)
75 if os.path.exists(dest):
76 if os.path.islink(dest):
77 os.unlink(dest)
84 if os [all...] |
/build/scripts/ |
H A D | download_sdk.py | 20 import os namespace 31 cur_dir = os.getcwd() 33 build_scripts = os.path.join( 35 if os.path.exists(build_scripts): 37 cur_dir = os.path.dirname(cur_dir) 55 filename = os.path.basename(download_url) 57 if not os.path.isfile(os.path.join(savepath, filename)): 59 urlretrieve(download_url, os.path.join( 65 filesize = os [all...] |
H A D | code_release.py | 17 import os namespace 24 os.path.abspath(os.path.dirname(os.path.abspath( 25 os.path.dirname(__file__))))) 32 if not os.path.exists(opensource_config_file): 36 src_dir = os.path.dirname(opensource_config_file) 37 dst_dir = os.path.join(package_dir, os.path.relpath(src_dir, top_dir)) 40 if os [all...] |
H A D | interface_mgr.py | 17 import os namespace 27 if os.path.isfile(filename): 44 for path, _, files in os.walk(file_dir): 47 x_file = os.path.relpath(os.path.join(path, file), 54 if not os.path.exists(subsystem_sdk_out_dir) or not os.path.isdir( 60 module_list = os.listdir(subsystem_sdk_out_dir) 62 module_dir = os.path.join(subsystem_sdk_out_dir, module_name) 63 if not os [all...] |
/build/lite/testfwk/ |
H A D | lite_testcase_resource_copy.py | 17 import os namespace 22 os.path.dirname(os.path.dirname(os.path.dirname( 23 os.path.abspath(__file__))))) 29 if not os.path.exists(src): 31 if not os.path.exists(dest): 32 os.makedirs(dest, exist_ok=True) 34 for root, _, files in os.walk(src): 36 file_path = os [all...] |
H A D | gen_module_list_files.py | 20 import os namespace 23 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 47 format(os.path.dirname(options.module_list_file))) 48 if not os.path.exists(os.path.dirname(options.module_list_file)): 49 makedirs(os.path.dirname(options.module_list_file)) 51 with os.fdopen(os [all...] |
/build/ohos/sdk/ |
H A D | convert_permissions.py | 16 import os namespace 22 OUTPATH = os.path.join(OUT_ROOT, "public_interface/sdk-js") 23 API_PATH = os.path.join(OUTPATH, "api") 24 API_GEN_PATH = os.path.join(OUTPATH, "build-tools/api") 28 source = os.path.join(source_root, INTERFACE_PATH) 29 dest = os.path.join(source_root, OUTPATH) 30 if os.path.exists(dest) is False: 35 source = os.path.join(source_root, API_PATH) 36 dest = os.path.join(source_root, API_GEN_PATH) 37 if os [all...] |
H A D | parse_public_sdk.py | 17 import os namespace 22 os.path.dirname( 23 os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) 28 OUTPATH = os.path.join(OUT_ROOT, "public_interface/sdk-js") 29 API_MODIFY_DIR = os.path.join(OUTPATH, "build-tools") 30 API_MODIFY_TOOL = os.path.join(API_MODIFY_DIR, "delete_systemapi_plugin.js") 31 API_PATH = os.path.join(OUTPATH, "api") 32 API_GEN_PATH = os [all...] |
/build/ohos/notice/ |
H A D | collect_module_notice_file.py | 18 import os namespace 22 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) 40 return os.path.exists(os.path.join(current_dir, '.gn')) 45 if os.path.isfile(license_file_path): 46 license_dir = os.path.dirname(license_file_path) 47 license_file = os [all...] |
H A D | collect_system_notice_files.py | 18 import os namespace 23 os.path.dirname(os.path.dirname(os.path.dirname( 24 os.path.abspath(__file__))))) 50 if os.path.exists(notice_file) is False or os.stat( 53 dest = os.path.join(dest_dir, 55 os.makedirs(os [all...] |
/build/ohos/packages/ |
H A D | system_gzip_package.py | 18 import os namespace 23 os.path.dirname(os.path.dirname(os.path.dirname( 24 os.path.abspath(__file__))))) 29 if not os.path.exists(src_image_path): 33 for root, dirs, files in os.walk(src_image_path): 35 src_dir = os.path.join(root, dir_name) 36 dir_relpath = os.path.relpath(src_dir, src_image_path) 37 dest_dir_path = os [all...] |
H A D | backup_restore_artifact.py | 17 import os namespace 28 str_out_basename = os.path.basename(args.output_dir) 29 if (str_out_basename == "backup" and not os.path.exists(args.output_dir)): 30 os.mkdir(args.output_dir) 35 if os.path.exists(source): 38 output_path = os.path.join( 39 args.output_dir, os.path.basename(source)) 42 str_out_basename, os.path.basename(source)) 45 str_out_basename, os.path.basename(source)) 46 asan_symbols_backup_path = source.replace(os [all...] |
H A D | modules_install.py | 18 import os namespace 22 os.path.dirname(os.path.dirname(os.path.dirname( 23 os.path.abspath(__file__))))) 27 sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "rules")) 96 shutil.copy(source, os.path.join(platform_installed_path, system_path)) 109 if not os [all...] |
/build/test/example/ |
H A D | mylogger.py | 22 import os namespace 36 self.filename = os.fspath(filename) 55 if self.suftime != time.strftime(self.suffix, time_tuple) or not os.path.exists( 56 os.path.abspath(self.filename) + '.' + self.suftime): 74 self.baseFilename = os.path.abspath(self.filename) + "." + self.suftime 77 with os.fdopen(os.open(self.baseFilename, os.O_WRONLT | os.O_CREAT | os [all...] |
/build/lite/ |
H A D | gen_module_notice_file.py | 21 import os namespace 29 return os.path.exists(os.path.join(src_path, '.gn')) 33 if (not os.path.isdir(src_dir)) or is_top_dir(src_dir): 35 for file in os.listdir(src_dir): 36 file_path = os.path.join(src_dir, file) 37 if os.path.isfile(file_path): 38 if os.path.basename(file_path) == target_cfg: 40 return find_config_parent_file(os.path.dirname(src_dir), target_cfg) 45 if not os [all...] |
/build/ohos/images/mkimage/ |
H A D | mkcpioimage.py | 17 import os namespace 51 if os.path.isdir(input_path) and not os.path.islink(input_path): 53 tem_list = os.listdir(input_path) 55 each_path = os.path.join(input_path, each) 62 work_dir = os.getcwd() 63 os.chdir(args.src_dir) 67 output_path = os.path.join("%s/../images" % os.getcwd(), args.device) 69 if not judge_updater_img_available(os [all...] |
/build/hb/hb/ |
H A D | __main__.py | 19 import os namespace 26 cur_dir = os.getcwd() 28 global_var = os.path.join( 30 if os.path.exists(global_var): 32 cur_dir = os.path.dirname(cur_dir) 39 entry_path = os.path.join(os.path.abspath(os.path.relpath( 40 ohos_root_path, os.path.curdir)), 'build', 'hb', 'main.py')
|
/build/scripts/util/ |
H A D | file_utils.py | 17 import os namespace 24 cur_dir = os.getcwd() 26 build_config_file = os.path.join( 28 if os.path.exists(build_config_file): 30 cur_dir = os.path.dirname(cur_dir) 35 if not os.path.exists(input_file): 54 if not os.path.exists(input_file): 71 file_dir = os.path.dirname(os.path.abspath(output_file)) 72 if not os [all...] |
/build/hb/util/preloader/ |
H A D | parse_lite_subsystems_config.py | 17 import os namespace 24 subsystem_name = os.path.basename(file)[:-5] 53 with os.fdopen(os.open(ohos_build, 54 os.O_RDWR | os.O_CREAT, stat.S_IWUSR | stat.S_IRUSR), 'w') as fout: 61 for root, _, files in os.walk(lite_components_dir): 64 configs = _read_lite_component_configs(os.path.join( 67 ohos_build = os.path.join( 69 os [all...] |
/build/indep_configs/scripts/ |
H A D | generate_components.py | 18 import os namespace 65 dependences_path = os.path.join(_path, 'dependences.json') 72 dependences_json[part_name]['installPath'] + os.sep + 'bundle.json') 78 for root, dirs, files in os.walk(source_code_path): 81 bundle_paths.append(os.path.join(root, file)) 86 if os.path.exists(dest_dir) and os.path.islink(dest_dir): 87 os.unlink(dest_dir) 88 if os.path.exists(dest_dir) and dest_dir != src_dir: 89 if os [all...] |
/build/templates/common/ |
H A D | generate_component_package.py | 18 import os namespace 42 parser.add_argument("-os", "--os_arg", default=r"linux", type=str, 94 json_path = os.path.join(out_path + "/build_configs/parts_info/components.json") 95 with os.fdopen(os.open(json_path, os.O_RDWR | os.O_CREAT, stat.S_IWUSR | stat.S_IRUSR), 121 json_path = os.path.join(args.get("out_path"), 123 with os.fdopen(os [all...] |
/build/hb/util/ |
H A D | component_util.py | 18 import os namespace 48 build_configs_path = os.path.join( 50 if os.path.exists(build_configs_path): 51 for root, dirs, files in os.walk(build_configs_path, topdown=True, followlinks=False): 70 return data['component']['name'], os.path.dirname(bundle_path) 77 default_deps_path = os.path.join( 84 root_path = os.path.join(out_path, "build_configs") 87 for file in os.listdir(root_path): 90 file_path = os.path.join(root_path, file) 91 if not os [all...] |