Lines Matching refs:self
40 def __init__(self):
41 self.config_json = ""
42 self._root_path = ""
43 self._board = ""
44 self._kernel = ""
45 self._product = ""
46 self._product_path = ""
47 self._device_path = ""
48 self._device_company = ""
49 self._patch_cache = ""
50 self._version = ""
51 self._os_level = ""
52 self._product_json = ""
53 self._target_os = ""
54 self._target_cpu = ""
55 self._out_path = ""
56 self._compile_config = ""
57 self._component_type = ""
58 self._device_config_path = ""
59 self._product_config_path = ""
60 self._subsystem_config_json = ""
61 self._subsystem_config_overlay_json = ""
62 self._support_cpu = ""
63 self._log_mode = ""
64 self.fs_attr = set()
65 self.platform = platform.system()
66 self.__post__init()
69 def component_type(self):
70 return self._component_type
73 def component_type(self, value: str):
74 self._component_type = value
75 self.config_update('component_type', self._component_type)
78 def target_os(self):
79 return self._target_os
82 def target_os(self, value: str):
83 self._target_os = value
84 self.config_update('target_os', self._target_os)
87 def target_cpu(self):
88 return self._target_cpu
91 def target_cpu(self, value: str):
92 self._target_cpu = value
93 self.config_update('target_cpu', self._target_cpu)
96 def version(self):
97 return self._version
100 def version(self, value: str):
101 self._version = value
102 self.config_update('version', self._version)
105 def compile_config(self):
106 return self._compile_config
109 def compile_config(self, value: str):
110 self._compile_config = value
111 self.config_update('compile_config', self._compile_config)
114 def os_level(self):
115 return self._os_level
118 def os_level(self, value: str):
119 self._os_level = value
120 self.config_update('os_level', self._os_level)
123 def product_json(self):
124 return self._product_json
127 def product_json(self, value: str):
128 self._product_json = value
129 self.config_update('product_json', self._product_json)
133 def root_path(self):
134 if self._root_path is None:
137 return self._root_path
140 def root_path(self, value: str):
141 self._root_path = os.path.abspath(value)
142 self.config_update('root_path', self._root_path)
145 def board(self):
146 if self._board is None:
148 return self._board
151 def board(self, value: str):
152 self._board = value
153 self.config_update('board', self._board)
156 def device_company(self):
157 if self._device_company is None:
159 return self._device_company
162 def device_company(self, value: str):
163 self._device_company = value
164 self.config_update('device_company', self._device_company)
167 def kernel(self):
168 return self._kernel
171 def kernel(self, value: str):
172 self._kernel = value
173 self.config_update('kernel', self._kernel)
176 def product(self):
177 if self._product is None:
179 return self._product
182 def product(self, value: str):
183 self._product = value
184 self.config_update('product', self._product)
187 def product_path(self):
188 if self._product_path is None:
190 return self._product_path
193 def product_path(self, value: str):
194 self._product_path = value
195 self.config_update('product_path', self._product_path)
198 def gn_product_path(self):
199 return self.product_path.replace(self.root_path, '/')
202 def device_path(self):
203 if self._device_path is None:
205 return self._device_path
208 def device_path(self, value: str):
209 self._device_path = value
210 self.config_update('device_path', self._device_path)
213 def gn_device_path(self):
214 return self.device_path.replace(self.root_path, '/')
217 def build_path(self):
218 _build_path = os.path.join(self.root_path, 'build', 'lite')
224 def out_path(self):
225 return self._out_path
228 def out_path(self, value: str):
229 self._out_path = value
230 self.config_update('out_path', self._out_path)
233 def device_config_path(self):
234 return self._device_config_path
237 def device_config_path(self, value: str):
238 self._device_config_path = value
239 self.config_update('device_config_path', self._device_config_path)
242 def product_config_path(self):
243 return self._product_config_path
246 def product_config_path(self, value: str):
247 self._product_config_path = value
248 self.config_update('product_config_path', self._product_config_path)
251 def subsystem_config_json(self):
252 return self._subsystem_config_json
255 def subsystem_config_json(self, value: str):
256 self._subsystem_config_json = value
257 self.config_update('subsystem_config_json',
258 self._subsystem_config_json)
261 def subsystem_config_overlay_json(self):
262 return self._subsystem_config_overlay_json
265 def subsystem_config_overlay_json(self, value: str):
266 self._subsystem_config_overlay_json = value
267 self.config_update('subsystem_config_overlay_json',
268 self._subsystem_config_overlay_json)
271 def support_cpu(self):
272 return self._support_cpu
275 def log_mode(self):
276 return self._log_mode
279 def log_mode(self, value):
280 self._log_mode = value
281 self.config_update('log_mode', self._log_mode)
284 def support_cpu(self, value: str):
285 self._support_cpu = value
286 self.config_update('support_cpu', self._support_cpu)
289 def log_path(self):
290 if self.out_path is not None:
291 return os.path.join(self.out_path, 'build.log')
296 def vendor_path(self):
297 _vendor_path = os.path.join(self.root_path, 'vendor')
303 def built_in_product_path(self):
304 _built_in_product_path = os.path.join(self.root_path,
312 def built_in_product_path_for_llvm(self):
313 _built_in_product_path_for_llvm = os.path.join(self.root_path,
318 def build_tools_path(self):
321 'build_tools/build_tools_config.json')[self.platform]['build_tools_path']
322 return os.path.join(self.root_path, tools_path)
324 raise OHOSException(f'unidentified platform: {self.platform}')
327 def gn_path(self):
328 repo_gn_path = os.path.join(self.build_tools_path, 'gn')
337 def ninja_path(self):
338 repo_ninja_path = os.path.join(self.build_tools_path, 'ninja')
347 def clang_path(self):
361 def patch_cache(self):
362 return self._patch_cache
365 def patch_cache(self, value: str):
366 self._patch_cache = value
367 self.config_update('patch_cache', self._patch_cache)
369 def config_update(self, key: str, value: str):
370 config_content = IoUtil.read_json_file(self.config_json)
372 IoUtil.dump_json_file(self.config_json, config_content)
374 def __post__init(self):
375 self.config_json = get_config_path()
376 config_content = IoUtil.read_json_file(self.config_json)
377 self.root_path = CURRENT_OHOS_ROOT
378 self.board = config_content.get('board', None)
379 self.kernel = config_content.get('kernel', None)
380 self.product = config_content.get('product', None)
381 self.product_path = config_content.get('product_path', None)
382 self.device_path = config_content.get('device_path', None)
383 self.device_company = config_content.get('device_company', None)
384 self.patch_cache = config_content.get('patch_cache', None)
385 self.version = config_content.get('version', '3.0')
386 self.os_level = config_content.get('os_level', 'small')
387 self.product_json = config_content.get('product_json', None)
388 self.target_os = config_content.get('target_os', None)
389 self.target_cpu = config_content.get('target_cpu', None)
390 self.out_path = config_content.get('out_path', None)
391 self.compile_config = config_content.get('compile_config', None)
392 self.component_type = config_content.get('component_type', None)
393 self.device_config_path = config_content.get('device_config_path',
395 self.product_config_path = config_content.get('product_config_path',
397 self.subsystem_config_json = config_content.get(
399 self.support_cpu = config_content.get('support_cpu', None)
400 self.fs_attr = set()
401 self.platform = platform.system()
402 self.precise_branch = "