Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
make_universal_apk Namespace Reference

Functions

 make_apk (opts)
 
 main ()
 

Detailed Description

This script can be run with no arguments, in which case it will produce an
APK with native libraries for all four architectures: arm, arm64, x86, and
x64.  You can instead list the architectures you want as arguments to this
script.  For example:

    python make_universal_apk.py arm x86

The environment variables ANDROID_NDK_HOME and ANDROID_HOME must be set to the
locations of the Android NDK and SDK.

Additionally, `ninja` should be in your path.

It assumes that the source tree is in the desired state, e.g. by having
run 'python tools/git-sync-deps' in the root of the skia checkout.

Also:
  * If the environment variable SKQP_BUILD_DIR is set, many of the
    intermediate build objects will be placed here.
  * If the environment variable SKQP_OUTPUT_DIR is set, the final APK
    will be placed in this directory.
  * If the environment variable SKQP_DEBUG is set, Skia will be compiled
    in debug mode.

Function Documentation

◆ main()

make_universal_apk.main ( )

Definition at line 50 of file make_universal_apk.py.

50def main():
52 if options.error:
53 sys.stderr.write(options.error + __doc__)
54 sys.exit(1)
55 options.write(sys.stdout)
56 make_apk(options)
57
Definition main.py:1

◆ make_apk()

make_universal_apk.make_apk (   opts)

Definition at line 36 of file make_universal_apk.py.

36def make_apk(opts):
37 assert '/' in [os.sep, os.altsep] # 'a/b' over os.path.join('a', 'b')
38
39 skia_dir = os.path.dirname(__file__) + '/../..'
40 create_apk.makedirs(opts.build_dir)
41 assets_dir = skia_dir + '/platform_tools/android/apps/skqp/src/main/assets'
42 resources_path = assets_dir + '/resources'
43
44 with create_apk.RemoveFiles(resources_path): # always clean up
45 create_apk.remove(resources_path)
46 os.symlink('../../../../../../../resources', resources_path)
47
49
makedirs(dst)
Definition create_apk.py:77
create_apk(opts)