Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
create_apk.SkQP_Build_Options Class Reference
Inheritance diagram for create_apk.SkQP_Build_Options:

Public Member Functions

def __init__ (self)
 
def gn_args (self, arch)
 
def write (self, o)
 

Public Attributes

 error
 
 android_ndk
 
 android_home
 
 architectures
 
 build_dir
 
 final_output_dir
 
 debug
 

Detailed Description

Definition at line 196 of file create_apk.py.

Constructor & Destructor Documentation

◆ __init__()

def create_apk.SkQP_Build_Options.__init__ (   self)

Definition at line 197 of file create_apk.py.

197 def __init__(self):
198 assert '/' in [os.sep, os.altsep] # 'a/b' over os.path.join('a', 'b')
199 self.error = ''
200 if not check_ninja():
201 self.error += '`ninja` is not in the path.\n'
202 for var in ['ANDROID_NDK_HOME', 'ANDROID_HOME']:
203 if not os.path.exists(os.environ.get(var, '')):
204 self.error += 'Environment variable `%s` is not set.\n' % var
205 self.android_ndk = os.path.abspath(os.environ['ANDROID_NDK_HOME'])
206 self.android_home = os.path.abspath(os.environ['ANDROID_HOME'])
207 args = sys.argv[1:]
208 for arg in args:
209 if arg not in skia_to_android_arch_name_map:
210 self.error += ('Argument %r is not in %r\n' %
211 (arg, skia_to_android_arch_name_map.keys()))
212 self.architectures = args if args else skia_to_android_arch_name_map.keys()
213 default_build = os.path.dirname(__file__) + '/../../out/skqp'
214 self.build_dir = os.path.abspath(os.environ.get('SKQP_BUILD_DIR', default_build))
215 self.final_output_dir = os.path.abspath(os.environ.get('SKQP_OUTPUT_DIR', default_build))
216 self.debug = bool(os.environ.get('SKQP_DEBUG', ''))
217
def check_ninja()
Definition: create_apk.py:65

Member Function Documentation

◆ gn_args()

def create_apk.SkQP_Build_Options.gn_args (   self,
  arch 
)

Definition at line 218 of file create_apk.py.

218 def gn_args(self, arch):
219 return skqp_gn_args.GetGNArgs(arch=arch, ndk=self.android_ndk, debug=self.debug,
220 api_level=26)
221
def gn_args
Definition: gn_to_bp.py:521

◆ write()

def create_apk.SkQP_Build_Options.write (   self,
  o 
)

Definition at line 222 of file create_apk.py.

222 def write(self, o):
223 for k, v in [('ANDROID_NDK_HOME', self.android_ndk),
224 ('ANDROID_HOME', self.android_home),
225 ('SKQP_OUTPUT_DIR', self.final_output_dir),
226 ('SKQP_BUILD_DIR', self.build_dir),
227 ('SKQP_DEBUG', self.debug),
228 ('Architectures', self.architectures)]:
229 o.write('%s = %r\n' % (k, v))
230 o.flush()
231
void write(SkWStream *wStream, const T &text)
Definition: skqp.cpp:188

Member Data Documentation

◆ android_home

create_apk.SkQP_Build_Options.android_home

Definition at line 206 of file create_apk.py.

◆ android_ndk

create_apk.SkQP_Build_Options.android_ndk

Definition at line 205 of file create_apk.py.

◆ architectures

create_apk.SkQP_Build_Options.architectures

Definition at line 212 of file create_apk.py.

◆ build_dir

create_apk.SkQP_Build_Options.build_dir

Definition at line 214 of file create_apk.py.

◆ debug

create_apk.SkQP_Build_Options.debug

Definition at line 216 of file create_apk.py.

◆ error

create_apk.SkQP_Build_Options.error

Definition at line 199 of file create_apk.py.

◆ final_output_dir

create_apk.SkQP_Build_Options.final_output_dir

Definition at line 215 of file create_apk.py.


The documentation for this class was generated from the following file: