Skip to content

Commit 0836349

Browse files
committed
fix misspelling
1 parent 7d9024e commit 0836349

File tree

5 files changed

+63
-63
lines changed

5 files changed

+63
-63
lines changed

SConstruct

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import sys
33
import atexit
44
sys.path.insert(0, './scripts')
55
import compile_config
6-
complie_helper = compile_config.complie_helper()
7-
complie_helper.try_load_default_config()
8-
complie_helper.scons_user_sopt(ARGUMENTS)
9-
compile_config.set_curr_config(complie_helper)
6+
compile_helper = compile_config.compile_helper()
7+
compile_helper.try_load_default_config()
8+
compile_helper.scons_user_sopt(ARGUMENTS)
9+
compile_config.set_curr_config(compile_helper)
1010
import awtk_config as awtk
1111

1212
awtk.scons_db_check_and_remove()
@@ -68,10 +68,10 @@ SConscriptFiles=[
6868
'src/debugger/SConscript',
6969
]
7070

71-
if complie_helper.get_value('BUILD_DEMOS', True) :
71+
if compile_helper.get_value('BUILD_DEMOS', True) :
7272
SConscriptFiles += ['demos/SConscript']
7373

74-
if complie_helper.get_value('BUILD_TESTS', True) :
74+
if compile_helper.get_value('BUILD_TESTS', True) :
7575
SConscriptFiles += ['tests/SConscript']
7676

7777
SConscriptFiles += awtk.OS_PROJECTS
@@ -83,6 +83,6 @@ os.environ['LIB_DIR'] = awtk.TK_LIB_DIR;
8383
SConscript(SConscriptFiles)
8484

8585
def compile_end() :
86-
complie_helper.output_compile_data(awtk.TK_ROOT)
86+
compile_helper.output_compile_data(awtk.TK_ROOT)
8787

8888
atexit.register(compile_end)

awtk_config.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
sys.path.insert(0, os.path.join(os.path.abspath(os.path.dirname(__file__)), 'scripts'))
88
import compile_config
9-
complie_helper = compile_config.get_curr_config_for_awtk()
9+
compile_helper = compile_config.get_curr_config_for_awtk()
1010

1111
from awtk_config_common import OS_NAME, TARGET_ARCH, TOOLS_PREFIX, TK_SRC, TK_BIN_DIR, TK_LIB_DIR, TK_3RD_ROOT, TK_TOOLS_ROOT, OS_DEBUG, TK_DEMO_ROOT, GTEST_ROOT, TKC_STATIC_LIBS, TOOLS_NAME, NANOVG_BACKEND, NATIVE_WINDOW, TK_ROOT
1212
from awtk_config_common import joinPath, toWholeArchive, genIdlAndDefEx, setEnvSpawn,genDllLinkFlags,copySharedLib,cleanSharedLib,scons_db_check_and_remove
@@ -26,19 +26,19 @@
2626
# os.environ['LD_LIBRARY_PATH'] = ''
2727
###################################################################
2828

29-
TOOLS_PREFIX = complie_helper.get_unique_value('TOOLS_PREFIX', TOOLS_PREFIX)
29+
TOOLS_PREFIX = compile_helper.get_unique_value('TOOLS_PREFIX', TOOLS_PREFIX)
3030

3131
if TOOLS_PREFIX != '' :
3232
OS_PROJECTS.remove('3rd/SDL/SConscript')
33-
OS_FLAGS = complie_helper.get_value('OS_FLAGS', '')
34-
OS_LIBS = complie_helper.get_value('OS_LIBS', [])
35-
OS_LIBPATH += complie_helper.get_value('OS_LIBPATH', [])
36-
OS_CPPPATH += complie_helper.get_value('OS_CPPPATH', [])
33+
OS_FLAGS = compile_helper.get_value('OS_FLAGS', '')
34+
OS_LIBS = compile_helper.get_value('OS_LIBS', [])
35+
OS_LIBPATH += compile_helper.get_value('OS_LIBPATH', [])
36+
OS_CPPPATH += compile_helper.get_value('OS_CPPPATH', [])
3737
else :
38-
OS_FLAGS += complie_helper.get_value('OS_FLAGS', '')
39-
OS_LIBS += complie_helper.get_value('OS_LIBS', [])
40-
OS_LIBPATH += complie_helper.get_value('OS_LIBPATH', [])
41-
OS_CPPPATH += complie_helper.get_value('OS_CPPPATH', [])
38+
OS_FLAGS += compile_helper.get_value('OS_FLAGS', '')
39+
OS_LIBS += compile_helper.get_value('OS_LIBS', [])
40+
OS_LIBPATH += compile_helper.get_value('OS_LIBPATH', [])
41+
OS_CPPPATH += compile_helper.get_value('OS_CPPPATH', [])
4242

4343
if OS_NAME == 'Windows':
4444
WIN32_AWTK_RES = 'win32_res/awtk.res'
@@ -71,7 +71,7 @@
7171
else :
7272
BUILD_DEBUG_FLAG = ' -DNDEBUG /MD /O2 /Oi '
7373

74-
if complie_helper.get_value('PDB') :
74+
if compile_helper.get_value('PDB') :
7575
BUILD_DEBUG_LINKFLAGS = ' /DEBUG '
7676

7777
COMMON_CCFLAGS = ' -DTK_ROOT=\"\\\"'+TK_ROOT+'\\\"\" '

awtk_config_common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import platform
44
import shutil
55
import compile_config
6-
complie_helper = compile_config.get_curr_config_for_awtk()
6+
compile_helper = compile_config.get_curr_config_for_awtk()
77

88
import sys
99
if sys.version_info.major == 2:
@@ -81,7 +81,7 @@ def joinPath(root, subdir):
8181
NANOVG_BACKEND = ''
8282
NATIVE_WINDOW = ''
8383
#TOOLS_NAME = 'mingw'
84-
TOOLS_NAME = complie_helper.get_value('TOOLS_NAME', TOOLS_NAME)
84+
TOOLS_NAME = compile_helper.get_value('TOOLS_NAME', TOOLS_NAME)
8585

8686
if OS_NAME == 'Windows':
8787
TK_ROOT = TK_ROOT.replace('\\', '\\\\')
@@ -96,7 +96,7 @@ def joinPath(root, subdir):
9696
OS_PROJECTS = []
9797
# only for c compiler flags
9898
COMMON_CFLAGS = ''
99-
OS_DEBUG = complie_helper.get_value('DEBUG', True)
99+
OS_DEBUG = compile_helper.get_value('DEBUG', True)
100100

101101
if OS_NAME == 'Darwin':
102102

scripts/app_helper_base.py

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def SConscript(self, SConscriptFiles):
229229
def get_curr_config(self) :
230230
return compile_config.get_curr_config()
231231

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) :
233233
global COMPILE_CONFIG
234234
script_path = os.path.abspath(script_path)
235235
if os.path.exists(script_path) :
@@ -252,12 +252,12 @@ def __init__(self, ARGUMENTS):
252252
global SRT_SCONS_CONFIG_SCRIPT
253253
global SRT_SCONS_CONFIG_SCRIPT_ARGV
254254
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, ''))
256256
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)
261261

262262
APP_ROOT = compile_config.get_curr_app_root()
263263
if len(APP_ROOT) == 0:
@@ -272,21 +272,21 @@ def __init__(self, ARGUMENTS):
272272
self.DEPENDS_LIBS = []
273273
self.GEN_IDL_DEF = True
274274
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)
276276
self.AWTK_ROOT = self.getAwtkRoot()
277277
self.awtk = self.getAwtkConfig()
278278
self.AWTK_LIBS = self.awtk.LIBS
279279
self.AWTK_CFLAGS = self.awtk.CFLAGS
280280
self.AWTK_CCFLAGS = self.awtk.CCFLAGS
281281
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', '')
283283
self.BIN_DIR = os.path.join(self.BUILD_DIR, 'bin')
284284
self.LIB_DIR = os.path.join(self.BUILD_DIR, 'lib')
285285
self.APP_BIN_DIR = os.path.join(APP_ROOT, self.BIN_DIR)
286286
self.APP_LIB_DIR = os.path.join(APP_ROOT, self.LIB_DIR)
287287
self.APP_SRC = os.path.join(APP_ROOT, 'src')
288288
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', [])
290290
self.APP_LINKFLAGS = ''
291291
self.PLATFORM_LIBS = []
292292
self.APP_TOOLS = ['default']
@@ -304,7 +304,7 @@ def __init__(self, ARGUMENTS):
304304
self.AWTK_OS_DEBUG = self.awtk.OS_DEBUG
305305
else :
306306
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)
308308
if isinstance(self.DEBUG, str) :
309309
try :
310310
from utils import strtobool
@@ -313,8 +313,8 @@ def __init__(self, ARGUMENTS):
313313
self.DEBUG == self.DEBUG.lower() == 'true';
314314

315315
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', [])
318318

319319
mkdir_if_not_exist(self.APP_BIN_DIR)
320320
mkdir_if_not_exist(self.APP_LIB_DIR)
@@ -328,20 +328,20 @@ def __init__(self, ARGUMENTS):
328328
if self.LINUX_FB:
329329
os.environ['LINUX_FB'] = 'true'
330330

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)
333333

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', '')
336336
if WITH_MVVM or os.path.exists(MVVM_ROOT):
337337
os.environ['WITH_MVVM'] = 'true'
338338
if not os.path.exists(MVVM_ROOT):
339339
MVVM_ROOT = self.getMvvmRoot()
340340
self.MVVM_ROOT = MVVM_ROOT
341341
print("MVVM_ROOT: " + self.MVVM_ROOT)
342342

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', '')
345345
print(WITH_AWFLOW)
346346
if WITH_AWFLOW or os.path.exists(AWFLOW_ROOT):
347347
os.environ['WITH_AWFLOW'] = 'true'
@@ -360,12 +360,12 @@ def __init__(self, ARGUMENTS):
360360
def getAwtkConfig(self):
361361
sys.path.insert(0, self.AWTK_ROOT)
362362
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))
365365
compile_config.set_curr_config(None)
366366
import awtk_config as awtk
367367
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)
369369
return awtk
370370

371371
def saveUsesSdkInfo(self):
@@ -478,35 +478,35 @@ def parseArgs(self, awtk, ARGUMENTS):
478478
APP_RES_ROOT = config.get_res_res_root()
479479
LCD_ORIENTATION = config.get_res_lcd_orientation(APP_THEME)
480480

481-
LCD = self.complie_helper.get_value('LCD', '')
481+
LCD = self.compile_helper.get_value('LCD', '')
482482
if len(LCD) > 0:
483483
wh = LCD.split('_')
484484
if len(wh) >= 1:
485485
LCD_WIDTH = wh[0]
486486
if len(wh) >= 2:
487487
LCD_HEIGHT = wh[1]
488488

489-
FONT = self.complie_helper.get_value('FONT', '')
489+
FONT = self.compile_helper.get_value('FONT', '')
490490
if len(FONT) > 0:
491491
APP_DEFAULT_FONT = FONT
492492

493-
APP_THEME = self.complie_helper.get_value('THEME', APP_THEME)
493+
APP_THEME = self.compile_helper.get_value('THEME', APP_THEME)
494494

495-
LANGUAGE = self.complie_helper.get_value('LANGUAGE', '')
495+
LANGUAGE = self.compile_helper.get_value('LANGUAGE', '')
496496
if len(LANGUAGE) > 0:
497497
lan = LANGUAGE.split('_')
498498
if len(lan) >= 1:
499499
APP_DEFAULT_LANGUAGE = lan[0]
500500
if len(lan) >= 2:
501501
APP_DEFAULT_COUNTRY = lan[1]
502502

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)
504504
self.APP_RES = os.path.abspath(os.path.join(self.APP_BIN_DIR, APP_RES_ROOT))
505505

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)
508508

509-
LCD_ORIENTATION = self.complie_helper.get_value('LCD_ORIENTATION', LCD_ORIENTATION)
509+
LCD_ORIENTATION = self.compile_helper.get_value('LCD_ORIENTATION', LCD_ORIENTATION)
510510
if not self.LINUX_FB :
511511
if LCD_ORIENTATION == '90' or LCD_ORIENTATION == '270' :
512512
tmp = LCD_WIDTH;
@@ -525,7 +525,7 @@ def parseArgs(self, awtk, ARGUMENTS):
525525
self.APP_ROOT.replace('\\', '/') + '\\\"\" '
526526

527527
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', '')
529529
self.APP_CXXFLAGS = ''
530530

531531
if PLATFORM == 'Linux':
@@ -591,8 +591,8 @@ def call(self, DefaultEnvironment):
591591
BUILD_DEBUG_FLAG = awtk.BUILD_DEBUG_FLAG
592592
else :
593593
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))
596596

597597
if self.MVVM_ROOT:
598598
MVVM_3RD_ROOT = join_path(self.MVVM_ROOT, '3rd')
@@ -731,7 +731,7 @@ def call(self, DefaultEnvironment):
731731
elif self.OS_NAME == 'Darwin' or self.OS_NAME == 'Linux' :
732732
CCFLAGS += ' -Os '
733733

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) :
735735
LINKFLAGS += ' /DEBUG '
736736
if self.DEBUG == self.AWTK_OS_DEBUG:
737737
CCFLAGS += BUILD_DEBUG_FLAG

scripts/compile_config.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def get_curr_config() :
2020
global COMPILE_CONFIG
2121
return COMPILE_CONFIG
2222

23-
def set_curr_config(complie_config) :
23+
def set_curr_config(compile_config) :
2424
global COMPILE_CONFIG
25-
COMPILE_CONFIG = complie_config
25+
COMPILE_CONFIG = compile_config
2626

2727
def set_app_win32_res(dir_path) :
2828
global WIN32_RES
@@ -42,11 +42,11 @@ def get_curr_config_for_awtk() :
4242
if COMPILE_CONFIG != None :
4343
return COMPILE_CONFIG
4444
else :
45-
COMPILE_CONFIG = complie_helper()
46-
if not COMPILE_CONFIG.load_last_complie_argv() :
45+
COMPILE_CONFIG = compile_helper()
46+
if not COMPILE_CONFIG.load_last_compile_argv() :
4747
print('========================= Error ================================')
4848
print('Please Recompile AWTK !!!!!')
49-
sys.exit('Not found last complie argv config file !!!!!')
49+
sys.exit('Not found last compile argv config file !!!!!')
5050
COMPILE_CONFIG.set_value('WIN32_RES', WIN32_RES)
5151
return COMPILE_CONFIG;
5252

@@ -74,9 +74,9 @@ def json_obj_save_file(obj, file_path) :
7474
else :
7575
print(dir + ' is not exists')
7676

77-
class complie_helper :
77+
class compile_helper :
7878
DEFAULT_CONFIG_FILE = './awtk_config_define.py'
79-
LAST_COMLIP_ARGV_FILE = './bin/last_complie_argv.json'
79+
LAST_COMLIP_ARGV_FILE = './bin/last_compile_argv.json'
8080

8181
COMPILE_CMD_INFO = collections.OrderedDict({
8282
'help' : { 'name': 'HELP', 'help_info' : 'show all usage'},
@@ -254,10 +254,10 @@ def set_value(self, name, value) :
254254
else :
255255
self.config[name]['value'] = type(self.config[name]['value'])(value)
256256

257-
def save_last_complie_argv(self) :
257+
def save_last_compile_argv(self) :
258258
json_obj_save_file(self.config, self.LAST_COMLIP_ARGV_FILE);
259259

260-
def load_last_complie_argv(self) :
260+
def load_last_compile_argv(self) :
261261
if os.path.exists(self.LAST_COMLIP_ARGV_FILE) :
262262
self.config = collections.OrderedDict(json_obj_load_file(self.LAST_COMLIP_ARGV_FILE));
263263
return True

0 commit comments

Comments
 (0)