• Home
  • Raw
  • Download

Lines Matching refs:self

35     def __init__(self):  argument
36 self.config_json = CONFIG_JSON
38 config_content = read_json_file(self.config_json)
39 self._root_path = config_content.get('root_path', None)
40 self._board = config_content.get('board', None)
41 self._kernel = config_content.get('kernel', None)
42 self._product = config_content.get('product', None)
43 self._product_path = config_content.get('product_path', None)
44 self._device_path = config_content.get('device_path', None)
45 self._device_company = config_content.get('device_company', None)
46 self._patch_cache = config_content.get('patch_cache', None)
47 self._version = config_content.get('version', '3.0')
48 self._os_level = config_content.get('os_level', 'small')
49 self._product_json = config_content.get('product_json', None)
50 self._target_cpu = config_content.get('target_cpu', None)
51 self._target_os = config_content.get('target_os', None)
52 self._out_path = config_content.get('out_path', None)
53 self._compile_config = config_content.get('compile_config', None)
54 self._component_type = config_content.get('component_type', None)
55 self._device_config_path = config_content.get('device_config_path',
57 self._product_config_path = config_content.get('product_config_path',
59 self._subsystem_config_json = config_content.get(
61 self.fs_attr = set()
62 self.platform = platform.system()
65 def component_type(self): argument
66 return self._component_type
69 def component_type(self, value): argument
70 self._component_type = value
71 self.config_update('component_type', self._component_type)
74 def target_os(self): argument
75 return self._target_os
78 def target_os(self, value): argument
79 self._target_os = value
80 self.config_update('target_os', self._target_os)
83 def target_cpu(self): argument
84 return self._target_cpu
87 def target_cpu(self, value): argument
88 self._target_cpu = value
89 self.config_update('target_cpu', self._target_cpu)
92 def version(self): argument
93 return self._version
96 def version(self, value): argument
97 self._version = value
98 self.config_update('version', self._version)
101 def compile_config(self): argument
102 return self._compile_config
105 def compile_config(self, value): argument
106 self._compile_config = value
107 self.config_update('compile_config', self._compile_config)
110 def os_level(self): argument
111 return self._os_level
114 def os_level(self, value): argument
115 self._os_level = value
116 self.config_update('os_level', self._os_level)
119 def product_json(self): argument
120 return self._product_json
123 def product_json(self, value): argument
124 self._product_json = value
125 self.config_update('product_json', self._product_json)
128 def root_path(self): argument
129 if self._root_path is None:
134 return self._root_path
137 def root_path(self, value): argument
138 self._root_path = os.path.abspath(value)
139 if not os.path.isdir(self._root_path):
142 config_path = os.path.join(self._root_path, 'ohos_config.json')
144 self.config_create(config_path)
145 self.config_update('root_path', self._root_path)
148 def board(self): argument
149 if self._board is None:
153 return self._board
156 def board(self, value): argument
157 self._board = value
158 self.config_update('board', self._board)
161 def device_company(self): argument
162 if self._device_company is None:
166 return self._device_company
169 def device_company(self, value): argument
170 self._device_company = value
171 self.config_update('device_company', self._device_company)
174 def kernel(self): argument
175 return self._kernel
178 def kernel(self, value): argument
179 self._kernel = value
180 self.config_update('kernel', self._kernel)
183 def product(self): argument
184 if self._product is None:
188 return self._product
191 def product(self, value): argument
192 self._product = value
193 self.config_update('product', self._product)
196 def product_path(self): argument
197 if self._product_path is None:
201 return self._product_path
204 def product_path(self, value): argument
205 self._product_path = value
206 self.config_update('product_path', self._product_path)
209 def gn_product_path(self): argument
210 return self.product_path.replace(self.root_path, '/')
213 def device_path(self): argument
214 if self._device_path is None:
218 return self._device_path
221 def device_path(self, value): argument
222 self._device_path = value
223 self.config_update('device_path', self._device_path)
226 def gn_device_path(self): argument
227 return self.device_path.replace(self.root_path, '/')
230 def build_path(self): argument
231 _build_path = os.path.join(self.root_path, 'build', 'lite')
237 def out_path(self): argument
238 return self._out_path
241 def out_path(self, value): argument
242 self._out_path = value
243 self.config_update('out_path', self._out_path)
246 def device_config_path(self): argument
247 return self._device_config_path
250 def device_config_path(self, value): argument
251 self._device_config_path = value
252 self.config_update('device_config_path', self._device_config_path)
255 def product_config_path(self): argument
256 return self._product_config_path
259 def product_config_path(self, value): argument
260 self._product_config_path = value
261 self.config_update('product_config_path', self._product_config_path)
264 def subsystem_config_json(self): argument
265 return self._subsystem_config_json
268 def subsystem_config_json(self, value): argument
269 self._subsystem_config_json = value
270 self.config_update('subsystem_config_json',
271 self._subsystem_config_json)
274 def log_path(self): argument
275 if self.out_path is not None:
276 return os.path.join(self.out_path, 'build.log')
281 def vendor_path(self): argument
282 _vendor_path = os.path.join(self.root_path, 'vendor')
288 def built_in_product_path(self): argument
289 _built_in_product_path = os.path.join(self.root_path,
297 def built_in_device_path(self): argument
298 _built_in_device_path = os.path.join(self.root_path,
306 def build_tools_path(self): argument
308 tools_path = BUILD_TOOLS_CFG[self.platform]['build_tools_path']
309 return os.path.join(self.root_path, tools_path)
314 def gn_path(self): argument
315 repo_gn_path = os.path.join(self.build_tools_path, 'gn')
321 makedirs(self.build_tools_path, exist_ok=True)
323 gn_url = BUILD_TOOLS_CFG[self.platform].get('gn')
324 gn_dst = os.path.join(self.build_tools_path, 'gn_pkg')
325 download_tool(gn_url, gn_dst, tgt_dir=self.build_tools_path)
330 def ninja_path(self): argument
331 repo_ninja_path = os.path.join(self.build_tools_path, 'ninja')
337 makedirs(self.build_tools_path, exist_ok=True)
339 ninja_url = BUILD_TOOLS_CFG[self.platform].get('ninja')
340 ninja_dst = os.path.join(self.build_tools_path, 'ninja_pkg')
341 download_tool(ninja_url, ninja_dst, tgt_dir=self.build_tools_path)
346 def clang_path(self): argument
368 clang_url = BUILD_TOOLS_CFG[self.platform].get('clang')
374 def patch_cache(self): argument
375 return self._patch_cache
378 def patch_cache(self, value): argument
379 self._patch_cache = value
380 self.config_update('patch_cache', self._patch_cache)
382 def config_create(self, config_path): argument
384 self.config_json = config_path
386 def config_update(self, key, value): argument
387 config_content = read_json_file(self.config_json)
389 dump_json_file(self.config_json, config_content)