Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions | Variables
chromebook_x86_64_gles.create_and_upload Namespace Reference

Functions

 main ()
 

Variables

 FILE_DIR = os.path.dirname(os.path.abspath(__file__))
 
 ASSET = os.path.basename(FILE_DIR)
 

Detailed Description

Create the asset and upload it.

Function Documentation

◆ main()

chromebook_x86_64_gles.create_and_upload.main ( )

Definition at line 24 of file create_and_upload.py.

24def main():
25 if 'linux' not in sys.platform:
26 print('This script only runs on Linux.', file=sys.stderr)
27 sys.exit(1)
28 parser = argparse.ArgumentParser()
29 parser.add_argument('--lib_path', '-l', required=True)
30 args = parser.parse_args()
31 # Pass lib_path to the creation script via an environment variable, since
32 # we're calling the script via `sk` and not directly.
33 os.environ[create.ENV_VAR] = args.lib_path
34
35 sk = os.path.realpath(os.path.join(
36 FILE_DIR, os.pardir, os.pardir, os.pardir, os.pardir, 'bin', 'sk'))
37 if os.name == 'nt':
38 sk += '.exe'
39 if not os.path.isfile(sk):
40 raise Exception('`sk` not found at %s; maybe you need to run bin/fetch-sk?')
41
42 # Upload the asset.
43 subprocess.check_call([sk, 'asset', 'upload', ASSET], cwd=FILE_DIR)
44
45
void print(void *str)
Definition bridge.cpp:126
Definition main.py:1

Variable Documentation

◆ ASSET

chromebook_x86_64_gles.create_and_upload.ASSET = os.path.basename(FILE_DIR)

Definition at line 21 of file create_and_upload.py.

◆ FILE_DIR

chromebook_x86_64_gles.create_and_upload.FILE_DIR = os.path.dirname(os.path.abspath(__file__))

Definition at line 20 of file create_and_upload.py.