@@ -229,7 +229,7 @@ def SConscript(self, SConscriptFiles):
229
229
def get_curr_config (self ) :
230
230
return compile_config .get_curr_config ()
231
231
232
- def get_complie_helper_by_script (self , ARGUMENTS , script_path , script_argv ) :
232
+ def get_compile_helper_by_script (self , ARGUMENTS , script_path , script_argv ) :
233
233
global COMPILE_CONFIG
234
234
script_path = os .path .abspath (script_path )
235
235
if os .path .exists (script_path ) :
@@ -252,12 +252,12 @@ def __init__(self, ARGUMENTS):
252
252
global SRT_SCONS_CONFIG_SCRIPT
253
253
global SRT_SCONS_CONFIG_SCRIPT_ARGV
254
254
if SRT_SCONS_CONFIG_SCRIPT in ARGUMENTS :
255
- self .complie_helper = self .get_complie_helper_by_script (ARGUMENTS , ARGUMENTS [SRT_SCONS_CONFIG_SCRIPT ], ARGUMENTS .get (SRT_SCONS_CONFIG_SCRIPT_ARGV , '' ))
255
+ self .compile_helper = self .get_compile_helper_by_script (ARGUMENTS , ARGUMENTS [SRT_SCONS_CONFIG_SCRIPT ], ARGUMENTS .get (SRT_SCONS_CONFIG_SCRIPT_ARGV , '' ))
256
256
else :
257
- self .complie_helper = compile_config .complie_helper ()
258
- self .complie_helper .set_compile_config (COMPILE_CONFIG )
259
- self .complie_helper .scons_user_sopt (ARGUMENTS )
260
- compile_config .set_curr_config (self .complie_helper )
257
+ self .compile_helper = compile_config .compile_helper ()
258
+ self .compile_helper .set_compile_config (COMPILE_CONFIG )
259
+ self .compile_helper .scons_user_sopt (ARGUMENTS )
260
+ compile_config .set_curr_config (self .compile_helper )
261
261
262
262
APP_ROOT = compile_config .get_curr_app_root ()
263
263
if len (APP_ROOT ) == 0 :
@@ -272,21 +272,21 @@ def __init__(self, ARGUMENTS):
272
272
self .DEPENDS_LIBS = []
273
273
self .GEN_IDL_DEF = True
274
274
self .BUILD_SHARED = True
275
- self .LINUX_FB = self .complie_helper .get_value ('LINUX_FB' , False )
275
+ self .LINUX_FB = self .compile_helper .get_value ('LINUX_FB' , False )
276
276
self .AWTK_ROOT = self .getAwtkRoot ()
277
277
self .awtk = self .getAwtkConfig ()
278
278
self .AWTK_LIBS = self .awtk .LIBS
279
279
self .AWTK_CFLAGS = self .awtk .CFLAGS
280
280
self .AWTK_CCFLAGS = self .awtk .CCFLAGS
281
281
self .APP_ROOT = APP_ROOT
282
- self .BUILD_DIR = self .complie_helper .get_value ('BUILD_DIR' , '' )
282
+ self .BUILD_DIR = self .compile_helper .get_value ('BUILD_DIR' , '' )
283
283
self .BIN_DIR = os .path .join (self .BUILD_DIR , 'bin' )
284
284
self .LIB_DIR = os .path .join (self .BUILD_DIR , 'lib' )
285
285
self .APP_BIN_DIR = os .path .join (APP_ROOT , self .BIN_DIR )
286
286
self .APP_LIB_DIR = os .path .join (APP_ROOT , self .LIB_DIR )
287
287
self .APP_SRC = os .path .join (APP_ROOT , 'src' )
288
288
self .APP_RES = os .path .join (APP_ROOT , 'res' )
289
- self .APP_LIBS = self .complie_helper .get_value ('LIBS' , [])
289
+ self .APP_LIBS = self .compile_helper .get_value ('LIBS' , [])
290
290
self .APP_LINKFLAGS = ''
291
291
self .PLATFORM_LIBS = []
292
292
self .APP_TOOLS = ['default' ]
@@ -304,7 +304,7 @@ def __init__(self, ARGUMENTS):
304
304
self .AWTK_OS_DEBUG = self .awtk .OS_DEBUG
305
305
else :
306
306
self .AWTK_OS_DEBUG = self .DEBUG
307
- self .DEBUG = self .complie_helper .get_value ('DEBUG' , self .AWTK_OS_DEBUG )
307
+ self .DEBUG = self .compile_helper .get_value ('DEBUG' , self .AWTK_OS_DEBUG )
308
308
if isinstance (self .DEBUG , str ) :
309
309
try :
310
310
from utils import strtobool
@@ -313,8 +313,8 @@ def __init__(self, ARGUMENTS):
313
313
self .DEBUG == self .DEBUG .lower () == 'true' ;
314
314
315
315
self .parseArgs (self .awtk , ARGUMENTS )
316
- self .APP_CPPPATH = [self .APP_SRC , self .APP_RES ] + self .complie_helper .get_value ('CPPPATH' , [])
317
- self .APP_LIBPATH = [self .APP_LIB_DIR , self .APP_BIN_DIR ] + self .complie_helper .get_value ('LIBPATH' , [])
316
+ self .APP_CPPPATH = [self .APP_SRC , self .APP_RES ] + self .compile_helper .get_value ('CPPPATH' , [])
317
+ self .APP_LIBPATH = [self .APP_LIB_DIR , self .APP_BIN_DIR ] + self .compile_helper .get_value ('LIBPATH' , [])
318
318
319
319
mkdir_if_not_exist (self .APP_BIN_DIR )
320
320
mkdir_if_not_exist (self .APP_LIB_DIR )
@@ -328,20 +328,20 @@ def __init__(self, ARGUMENTS):
328
328
if self .LINUX_FB :
329
329
os .environ ['LINUX_FB' ] = 'true'
330
330
331
- self .WITH_JERRYSCRIPT = self .complie_helper .get_value ('WITH_JERRYSCRIPT' , False )
332
- self .WITH_IOTJS = self .complie_helper .get_value ('WITH_IOTJS' , False )
331
+ self .WITH_JERRYSCRIPT = self .compile_helper .get_value ('WITH_JERRYSCRIPT' , False )
332
+ self .WITH_IOTJS = self .compile_helper .get_value ('WITH_IOTJS' , False )
333
333
334
- WITH_MVVM = self .complie_helper .get_value ('WITH_MVVM' , False )
335
- MVVM_ROOT = self .complie_helper .get_value ('MVVM_ROOT' , '' )
334
+ WITH_MVVM = self .compile_helper .get_value ('WITH_MVVM' , False )
335
+ MVVM_ROOT = self .compile_helper .get_value ('MVVM_ROOT' , '' )
336
336
if WITH_MVVM or os .path .exists (MVVM_ROOT ):
337
337
os .environ ['WITH_MVVM' ] = 'true'
338
338
if not os .path .exists (MVVM_ROOT ):
339
339
MVVM_ROOT = self .getMvvmRoot ()
340
340
self .MVVM_ROOT = MVVM_ROOT
341
341
print ("MVVM_ROOT: " + self .MVVM_ROOT )
342
342
343
- WITH_AWFLOW = self .complie_helper .get_value ('WITH_AWFLOW' , False )
344
- AWFLOW_ROOT = self .complie_helper .get_value ('AWFLOW_ROOT' , '' )
343
+ WITH_AWFLOW = self .compile_helper .get_value ('WITH_AWFLOW' , False )
344
+ AWFLOW_ROOT = self .compile_helper .get_value ('AWFLOW_ROOT' , '' )
345
345
print (WITH_AWFLOW )
346
346
if WITH_AWFLOW or os .path .exists (AWFLOW_ROOT ):
347
347
os .environ ['WITH_AWFLOW' ] = 'true'
@@ -360,12 +360,12 @@ def __init__(self, ARGUMENTS):
360
360
def getAwtkConfig (self ):
361
361
sys .path .insert (0 , self .AWTK_ROOT )
362
362
os .chdir (self .AWTK_ROOT )
363
- tmp_complie_helper = compile_config .get_curr_config ()
364
- compile_config .set_app_win32_res (tmp_complie_helper .get_value ('WIN32_RES' , None ))
363
+ tmp_compile_helper = compile_config .get_curr_config ()
364
+ compile_config .set_app_win32_res (tmp_compile_helper .get_value ('WIN32_RES' , None ))
365
365
compile_config .set_curr_config (None )
366
366
import awtk_config as awtk
367
367
os .chdir (compile_config .get_curr_app_root ())
368
- compile_config .set_curr_config (tmp_complie_helper )
368
+ compile_config .set_curr_config (tmp_compile_helper )
369
369
return awtk
370
370
371
371
def saveUsesSdkInfo (self ):
@@ -478,35 +478,35 @@ def parseArgs(self, awtk, ARGUMENTS):
478
478
APP_RES_ROOT = config .get_res_res_root ()
479
479
LCD_ORIENTATION = config .get_res_lcd_orientation (APP_THEME )
480
480
481
- LCD = self .complie_helper .get_value ('LCD' , '' )
481
+ LCD = self .compile_helper .get_value ('LCD' , '' )
482
482
if len (LCD ) > 0 :
483
483
wh = LCD .split ('_' )
484
484
if len (wh ) >= 1 :
485
485
LCD_WIDTH = wh [0 ]
486
486
if len (wh ) >= 2 :
487
487
LCD_HEIGHT = wh [1 ]
488
488
489
- FONT = self .complie_helper .get_value ('FONT' , '' )
489
+ FONT = self .compile_helper .get_value ('FONT' , '' )
490
490
if len (FONT ) > 0 :
491
491
APP_DEFAULT_FONT = FONT
492
492
493
- APP_THEME = self .complie_helper .get_value ('THEME' , APP_THEME )
493
+ APP_THEME = self .compile_helper .get_value ('THEME' , APP_THEME )
494
494
495
- LANGUAGE = self .complie_helper .get_value ('LANGUAGE' , '' )
495
+ LANGUAGE = self .compile_helper .get_value ('LANGUAGE' , '' )
496
496
if len (LANGUAGE ) > 0 :
497
497
lan = LANGUAGE .split ('_' )
498
498
if len (lan ) >= 1 :
499
499
APP_DEFAULT_LANGUAGE = lan [0 ]
500
500
if len (lan ) >= 2 :
501
501
APP_DEFAULT_COUNTRY = lan [1 ]
502
502
503
- APP_RES_ROOT = self .complie_helper .get_value ('RES_ROOT' , APP_RES_ROOT )
503
+ APP_RES_ROOT = self .compile_helper .get_value ('RES_ROOT' , APP_RES_ROOT )
504
504
self .APP_RES = os .path .abspath (os .path .join (self .APP_BIN_DIR , APP_RES_ROOT ))
505
505
506
- self .BUILD_SHARED = self .complie_helper .get_value ('SHARED' , False )
507
- self .GEN_IDL_DEF = self .complie_helper .get_value ('IDL_DEF' , True )
506
+ self .BUILD_SHARED = self .compile_helper .get_value ('SHARED' , False )
507
+ self .GEN_IDL_DEF = self .compile_helper .get_value ('IDL_DEF' , True )
508
508
509
- LCD_ORIENTATION = self .complie_helper .get_value ('LCD_ORIENTATION' , LCD_ORIENTATION )
509
+ LCD_ORIENTATION = self .compile_helper .get_value ('LCD_ORIENTATION' , LCD_ORIENTATION )
510
510
if not self .LINUX_FB :
511
511
if LCD_ORIENTATION == '90' or LCD_ORIENTATION == '270' :
512
512
tmp = LCD_WIDTH ;
@@ -525,7 +525,7 @@ def parseArgs(self, awtk, ARGUMENTS):
525
525
self .APP_ROOT .replace ('\\ ' , '/' ) + '\\ \" \" '
526
526
527
527
self .APP_CFLAGS = ''
528
- self .APP_CCFLAGS = APP_CCFLAGS + self .complie_helper .get_value ('FLAGS' , '' )
528
+ self .APP_CCFLAGS = APP_CCFLAGS + self .compile_helper .get_value ('FLAGS' , '' )
529
529
self .APP_CXXFLAGS = ''
530
530
531
531
if PLATFORM == 'Linux' :
@@ -591,8 +591,8 @@ def call(self, DefaultEnvironment):
591
591
BUILD_DEBUG_FLAG = awtk .BUILD_DEBUG_FLAG
592
592
else :
593
593
BUILD_DEBUG_FLAG = ' '
594
- self .APP_BIN_DIR = self .complie_helper .get_value ('APP_BIN_DIR' , os .path .join (self .APP_ROOT , self .BIN_DIR ))
595
- self .APP_LIB_DIR = self .complie_helper .get_value ('APP_LIB_DIR' , os .path .join (self .APP_ROOT , self .LIB_DIR ))
594
+ self .APP_BIN_DIR = self .compile_helper .get_value ('APP_BIN_DIR' , os .path .join (self .APP_ROOT , self .BIN_DIR ))
595
+ self .APP_LIB_DIR = self .compile_helper .get_value ('APP_LIB_DIR' , os .path .join (self .APP_ROOT , self .LIB_DIR ))
596
596
597
597
if self .MVVM_ROOT :
598
598
MVVM_3RD_ROOT = join_path (self .MVVM_ROOT , '3rd' )
@@ -731,7 +731,7 @@ def call(self, DefaultEnvironment):
731
731
elif self .OS_NAME == 'Darwin' or self .OS_NAME == 'Linux' :
732
732
CCFLAGS += ' -Os '
733
733
734
- if self .OS_NAME == 'Windows' and is_msvc and self .complie_helper .get_value ('PDB' , True ) :
734
+ if self .OS_NAME == 'Windows' and is_msvc and self .compile_helper .get_value ('PDB' , True ) :
735
735
LINKFLAGS += ' /DEBUG '
736
736
if self .DEBUG == self .AWTK_OS_DEBUG :
737
737
CCFLAGS += BUILD_DEBUG_FLAG
0 commit comments