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

Functions

 get_clang_version ()
 
 main ()
 

Variables

 _script_dir = os.path.abspath(os.path.join(os.path.realpath(__file__), '..'))
 
 _src_root_dir = os.path.join(_script_dir, '..', '..')
 

Detailed Description

Copies the Info.plist and adds extra fields to it like the git hash of the
engine.

usage: copy_info_plist.py --source <src_path> --destination <dest_path>
                          --minversion=<deployment_target>

Function Documentation

◆ get_clang_version()

copy_info_plist.get_clang_version ( )

Definition at line 25 of file copy_info_plist.py.

25def get_clang_version():
26 clang_executable = str(
27 os.path.join(_src_root_dir, 'flutter', 'buildtools', 'mac-x64', 'clang', 'bin', 'clang++')
28 )
29 version = subprocess.check_output([clang_executable, '--version'])
30 return version.splitlines()[0]
31
32

◆ main()

copy_info_plist.main ( )

Definition at line 33 of file copy_info_plist.py.

33def main():
34
35 parser = argparse.ArgumentParser(
36 description='Copies the Info.plist and adds extra fields to it like the '
37 'git hash of the engine'
38 )
39
40 parser.add_argument(
41 '--source', help='Path to Info.plist source template', type=str, required=True
42 )
43 parser.add_argument(
44 '--destination', help='Path to destination Info.plist', type=str, required=True
45 )
46 parser.add_argument('--minversion', help='Minimum device OS version like "9.0"', type=str)
47
48 args = parser.parse_args()
49
50 text = open(args.source).read()
51 engine_path = os.path.join(_src_root_dir, 'flutter')
52 revision = git_revision.get_repository_version(engine_path)
53 clang_version = get_clang_version()
54 text = text.format(revision=revision, clang_version=clang_version, min_version=args.minversion)
55
56 with open(args.destination, 'w') as outfile:
57 outfile.write(text)
58
59
static bool read(SkStream *stream, void *buffer, size_t amount)
get_repository_version(repository)
Definition main.py:1

Variable Documentation

◆ _script_dir

copy_info_plist._script_dir = os.path.abspath(os.path.join(os.path.realpath(__file__), '..'))
protected

Definition at line 21 of file copy_info_plist.py.

◆ _src_root_dir

copy_info_plist._src_root_dir = os.path.join(_script_dir, '..', '..')
protected

Definition at line 22 of file copy_info_plist.py.