OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Entry point for both build and try bots | 6 """Entry point for both build and try bots |
7 | 7 |
8 This script is invoked from XXX, usually without arguments | 8 This script is invoked from XXX, usually without arguments |
9 to package an SDK. It automatically determines whether | 9 to package an SDK. It automatically determines whether |
10 this SDK is for mac, win, linux. | 10 this SDK is for mac, win, linux. |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 # Create the various paths of interest | 42 # Create the various paths of interest |
43 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) | 43 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) |
44 SDK_SRC_DIR = os.path.dirname(SCRIPT_DIR) | 44 SDK_SRC_DIR = os.path.dirname(SCRIPT_DIR) |
45 SDK_EXAMPLE_DIR = os.path.join(SDK_SRC_DIR, 'examples') | 45 SDK_EXAMPLE_DIR = os.path.join(SDK_SRC_DIR, 'examples') |
46 SDK_LIBRARY_DIR = os.path.join(SDK_SRC_DIR, 'libraries') | 46 SDK_LIBRARY_DIR = os.path.join(SDK_SRC_DIR, 'libraries') |
47 SDK_DIR = os.path.dirname(SDK_SRC_DIR) | 47 SDK_DIR = os.path.dirname(SDK_SRC_DIR) |
48 SRC_DIR = os.path.dirname(SDK_DIR) | 48 SRC_DIR = os.path.dirname(SDK_DIR) |
49 NACL_DIR = os.path.join(SRC_DIR, 'native_client') | 49 NACL_DIR = os.path.join(SRC_DIR, 'native_client') |
50 OUT_DIR = os.path.join(SRC_DIR, 'out') | 50 OUT_DIR = os.path.join(SRC_DIR, 'out') |
| 51 BASE_DIR = os.path.join(SRC_DIR, 'base') |
51 PPAPI_DIR = os.path.join(SRC_DIR, 'ppapi') | 52 PPAPI_DIR = os.path.join(SRC_DIR, 'ppapi') |
52 NACLPORTS_DIR = os.path.join(OUT_DIR, 'naclports') | 53 NACLPORTS_DIR = os.path.join(OUT_DIR, 'naclports') |
53 | 54 |
54 # Add SDK make tools scripts to the python path. | 55 # Add SDK make tools scripts to the python path. |
55 sys.path.append(os.path.join(SDK_SRC_DIR, 'tools')) | 56 sys.path.append(os.path.join(SDK_SRC_DIR, 'tools')) |
56 sys.path.append(os.path.join(NACL_DIR, 'build')) | 57 sys.path.append(os.path.join(NACL_DIR, 'build')) |
57 | 58 |
58 import getos | 59 import getos |
59 import http_download | 60 import http_download |
60 import oshelpers | 61 import oshelpers |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 'irt_ppapi.h': 'src/untrusted/irt/irt_ppapi.h', | 280 'irt_ppapi.h': 'src/untrusted/irt/irt_ppapi.h', |
280 }, | 281 }, |
281 'host': { | 282 'host': { |
282 }, | 283 }, |
283 } | 284 } |
284 | 285 |
285 | 286 |
286 def InstallCommonHeaders(inc_path): | 287 def InstallCommonHeaders(inc_path): |
287 # Clean out per toolchain ppapi directory | 288 # Clean out per toolchain ppapi directory |
288 ppapi = os.path.join(inc_path, 'ppapi') | 289 ppapi = os.path.join(inc_path, 'ppapi') |
| 290 base = os.path.join(inc_path, 'base') |
289 buildbot_common.RemoveDir(ppapi) | 291 buildbot_common.RemoveDir(ppapi) |
| 292 buildbot_common.RemoveDir(base) |
290 | 293 |
291 # Copy in c and c/dev headers | 294 # Copy in c and c/dev headers |
292 buildbot_common.MakeDir(os.path.join(ppapi, 'c', 'dev')) | 295 buildbot_common.MakeDir(os.path.join(ppapi, 'c', 'dev')) |
293 buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'c', '*.h'), | 296 buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'c', '*.h'), |
294 os.path.join(ppapi, 'c')) | 297 os.path.join(ppapi, 'c')) |
295 buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'c', 'dev', '*.h'), | 298 buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'c', 'dev', '*.h'), |
296 os.path.join(ppapi, 'c', 'dev')) | 299 os.path.join(ppapi, 'c', 'dev')) |
297 | 300 |
298 # Remove private and trusted interfaces | 301 # Remove private and trusted interfaces |
299 buildbot_common.RemoveDir(os.path.join(ppapi, 'c', 'private')) | 302 buildbot_common.RemoveDir(os.path.join(ppapi, 'c', 'private')) |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 # Copy the KHR headers | 342 # Copy the KHR headers |
340 buildbot_common.MakeDir(os.path.join(inc_path, 'KHR')) | 343 buildbot_common.MakeDir(os.path.join(inc_path, 'KHR')) |
341 buildbot_common.CopyDir( | 344 buildbot_common.CopyDir( |
342 os.path.join(PPAPI_DIR, 'lib', 'gl', 'include', 'KHR', '*.h'), | 345 os.path.join(PPAPI_DIR, 'lib', 'gl', 'include', 'KHR', '*.h'), |
343 os.path.join(inc_path, 'KHR')) | 346 os.path.join(inc_path, 'KHR')) |
344 | 347 |
345 # Copy the lib files | 348 # Copy the lib files |
346 buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'lib'), | 349 buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'lib'), |
347 os.path.join(inc_path, 'ppapi')) | 350 os.path.join(inc_path, 'ppapi')) |
348 | 351 |
| 352 buildbot_common.MakeDir(os.path.join(base, 'debug')) |
| 353 buildbot_common.CopyFile( |
| 354 os.path.join(BASE_DIR, 'debug', 'trace_event_internal.h'), |
| 355 os.path.join(base, 'debug')) |
| 356 |
| 357 |
349 | 358 |
350 def InstallNaClHeaders(tc_dst_inc, tc_name): | 359 def InstallNaClHeaders(tc_dst_inc, tc_name): |
351 """Copies NaCl headers to expected locations in the toolchain.""" | 360 """Copies NaCl headers to expected locations in the toolchain.""" |
352 if tc_name == 'arm': | 361 if tc_name == 'arm': |
353 # arm toolchain header should be the same as the x86 newlib | 362 # arm toolchain header should be the same as the x86 newlib |
354 # ones | 363 # ones |
355 tc_name = 'newlib' | 364 tc_name = 'newlib' |
356 tc_map = HEADER_MAP[tc_name] | 365 tc_map = HEADER_MAP[tc_name] |
357 | 366 |
358 for filename in tc_map: | 367 for filename in tc_map: |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 'hello_world_stdio', | 616 'hello_world_stdio', |
608 'hello_world', | 617 'hello_world', |
609 'hello_world_gles', | 618 'hello_world_gles', |
610 'hello_world_instance3d', | 619 'hello_world_instance3d', |
611 'hello_world_interactive', | 620 'hello_world_interactive', |
612 'input_events', | 621 'input_events', |
613 'load_progress', | 622 'load_progress', |
614 'mouselock', | 623 'mouselock', |
615 'pi_generator', | 624 'pi_generator', |
616 'sine_synth', | 625 'sine_synth', |
| 626 'trace_events', |
617 'websocket', | 627 'websocket', |
618 ] | 628 ] |
619 | 629 |
620 LIBRARY_LIST = [ | 630 LIBRARY_LIST = [ |
621 'libjpeg', | 631 'libjpeg', |
622 'nacl_io', | 632 'nacl_io', |
623 'ppapi', | 633 'ppapi', |
624 'ppapi_cpp', | 634 'ppapi_cpp', |
625 'ppapi_gles2', | 635 'ppapi_gles2', |
626 'ppapi_main', | 636 'ppapi_main', |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 BuildStepArchiveBundle('build', pepper_ver, clnumber, tarfile) | 1029 BuildStepArchiveBundle('build', pepper_ver, clnumber, tarfile) |
1020 if platform == 'linux': | 1030 if platform == 'linux': |
1021 BuildStepArchiveBundle('naclports', pepper_ver, clnumber, ports_tarfile) | 1031 BuildStepArchiveBundle('naclports', pepper_ver, clnumber, ports_tarfile) |
1022 BuildStepArchiveSDKTools() | 1032 BuildStepArchiveSDKTools() |
1023 | 1033 |
1024 return 0 | 1034 return 0 |
1025 | 1035 |
1026 | 1036 |
1027 if __name__ == '__main__': | 1037 if __name__ == '__main__': |
1028 sys.exit(main(sys.argv)) | 1038 sys.exit(main(sys.argv)) |
OLD | NEW |