Skip to content

Commit

Permalink
fix misspelling
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Dec 30, 2024
1 parent a416da5 commit 9f7a9dc
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 67 deletions.
20 changes: 10 additions & 10 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import platform
import sys
sys.path.insert(0, './scripts')
import compile_config
complie_helper = compile_config.complie_helper()
complie_helper.try_load_default_config()
complie_helper.scons_user_sopt(ARGUMENTS)
compile_config.set_curr_config(complie_helper)
compile_helper = compile_config.compile_helper()
compile_helper.try_load_default_config()
compile_helper.scons_user_sopt(ARGUMENTS)
compile_config.set_curr_config(compile_helper)

import awtk_config as awtk

Expand Down Expand Up @@ -58,8 +58,8 @@ SConscriptFiles=awtk.NANOVG_BACKEND_PROJS + [
'src/romfs/SConscript',
]

os.environ['BUILD_TOOLS'] = str(complie_helper.get_value('BUILD_TOOLS', True))
if complie_helper.get_value('BUILD_TOOLS', True) :
os.environ['BUILD_TOOLS'] = str(compile_helper.get_value('BUILD_TOOLS', True))
if compile_helper.get_value('BUILD_TOOLS', True) :
SConscriptFiles += [
'src/streams/tools/SConscript',
'tools/common/SConscript',
Expand All @@ -80,10 +80,10 @@ if complie_helper.get_value('BUILD_TOOLS', True) :
'src/hal/tools/network_shell/SConscript',
]

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

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

SConscriptFiles += awtk.OS_PROJECTS
Expand All @@ -96,7 +96,7 @@ SConscript(SConscriptFiles)


def compile_end() :
complie_helper.save_last_complie_argv()
complie_helper.output_compile_data(awtk.TK_ROOT)
compile_helper.save_last_compile_argv()
compile_helper.output_compile_data(awtk.TK_ROOT)

atexit.register(compile_end)
20 changes: 10 additions & 10 deletions awtk_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

sys.path.insert(0, os.path.join(os.path.abspath(os.path.dirname(__file__)), 'scripts'))
import compile_config
complie_helper = compile_config.get_curr_config_for_awtk()
compile_helper = compile_config.get_curr_config_for_awtk()

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
from awtk_config_common import joinPath, toWholeArchive, genIdlAndDefEx, setEnvSpawn, genDllLinkFlags, copySharedLib, cleanSharedLib, scons_db_check_and_remove, is_raspberrypi
Expand All @@ -22,7 +22,7 @@
else:
WIN32_AWTK_RES = os.path.join(TK_ROOT, 'win32_res/awtk.res')

WIN32_AWTK_RES = complie_helper.get_value('WIN32_RES', WIN32_AWTK_RES)
WIN32_AWTK_RES = compile_helper.get_value('WIN32_RES', WIN32_AWTK_RES)
if not os.path.isabs(WIN32_AWTK_RES) :
WIN32_AWTK_RES = os.path.join(compile_config.get_curr_app_root(), WIN32_AWTK_RES)

Expand All @@ -40,13 +40,13 @@
# INPUT_ENGINE='t9ext'
INPUT_ENGINE = 'pinyin'

INPUT_ENGINE = complie_helper.get_value('INPUT_ENGINE', INPUT_ENGINE)
INPUT_ENGINE = compile_helper.get_value('INPUT_ENGINE', INPUT_ENGINE)

VGCANVAS = 'NANOVG'
VGCANVAS='NANOVG_PLUS'
# VGCANVAS='CAIRO'

VGCANVAS = complie_helper.get_value('VGCANVAS', VGCANVAS)
VGCANVAS = compile_helper.get_value('VGCANVAS', VGCANVAS)

if OS_NAME == 'Windows':
TK_ROOT = TK_ROOT.replace('\\', '\\\\')
Expand All @@ -60,7 +60,7 @@
if is_raspberrypi():
NANOVG_BACKEND='GLES2'

NANOVG_BACKEND = complie_helper.get_value('NANOVG_BACKEND', NANOVG_BACKEND)
NANOVG_BACKEND = compile_helper.get_value('NANOVG_BACKEND', NANOVG_BACKEND)
#NANOVG_BACKEND='BGFX'

FRAME_BUFFER_FORMAT = ''
Expand All @@ -78,7 +78,7 @@
# LCD='SDL_FB_MONO'

if NANOVG_BACKEND == 'AGGE' or NANOVG_BACKEND == 'AGGE' :
lcd_color_format = complie_helper.get_value('LCD_COLOR_FORMAT', '')
lcd_color_format = compile_helper.get_value('LCD_COLOR_FORMAT', '')
if lcd_color_format != '' :
if lcd_color_format== 'mono' :
LCD = 'SDL_FB_MONO'
Expand All @@ -102,10 +102,10 @@
#COMMON_CCFLAGS=COMMON_CCFLAGS+' -DENABLE_MEM_LEAK_CHECK=1 '
COMMON_CCFLAGS=COMMON_CCFLAGS+' -DWITH_STATE_ACTIVATED=1 '

if complie_helper.get_value('NATIVE_WINDOW_BORDERLESS', False) :
if compile_helper.get_value('NATIVE_WINDOW_BORDERLESS', False) :
COMMON_CCFLAGS=COMMON_CCFLAGS+' -DNATIVE_WINDOW_BORDERLESS=1 '

if complie_helper.get_value('NATIVE_WINDOW_NOT_RESIZABLE', False) :
if compile_helper.get_value('NATIVE_WINDOW_NOT_RESIZABLE', False) :
COMMON_CCFLAGS=COMMON_CCFLAGS+' -DNATIVE_WINDOW_NOT_RESIZABLE=1 '


Expand Down Expand Up @@ -246,7 +246,7 @@
else :
BUILD_DEBUG_FLAG = ' -DNDEBUG /MD /O2 /Oi '

if complie_helper.get_value('PDB', True) :
if compile_helper.get_value('PDB', True) :
BUILD_DEBUG_LINKFLAGS = ' /DEBUG '


Expand Down Expand Up @@ -315,7 +315,7 @@
os.environ['AWTK_CCFLAGS'] = AWTK_CCFLAGS + BUILD_DEBUG_FLAG
os.environ['CROSS_COMPILE'] = str(not TOOLS_PREFIX == '')

os.environ['SDL_UBUNTU_USE_IME'] = str(complie_helper.get_value('SDL_UBUNTU_USE_IME', False))
os.environ['SDL_UBUNTU_USE_IME'] = str(compile_helper.get_value('SDL_UBUNTU_USE_IME', False))
# os.environ['SDL_UBUNTU_USE_IME'] = str(True)
OS_LIBS = ['SDL2', 'glad'] + OS_LIBS

Expand Down
6 changes: 3 additions & 3 deletions awtk_config_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import platform
import shutil
import compile_config
complie_helper = compile_config.get_curr_config_for_awtk()
compile_helper = compile_config.get_curr_config_for_awtk()

import sys
if sys.version_info.major == 2:
Expand Down Expand Up @@ -81,7 +81,7 @@ def joinPath(root, subdir):
NANOVG_BACKEND = ''
NATIVE_WINDOW = ''
#TOOLS_NAME = 'mingw'
TOOLS_NAME = complie_helper.get_value('TOOLS_NAME', TOOLS_NAME)
TOOLS_NAME = compile_helper.get_value('TOOLS_NAME', TOOLS_NAME)

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

if OS_NAME == 'Darwin':

Expand Down
3 changes: 3 additions & 0 deletions docs/changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# 最新动态

2024/12/30
* 修改编译脚本拼写错误(感谢兆坤提供补丁)

2024/12/29
* 修改拼写错误(感谢兆坤提供补丁)

Expand Down
66 changes: 33 additions & 33 deletions scripts/app_helper_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def SConscript(self, SConscriptFiles):
def get_curr_config(self) :
return compile_config.get_curr_config()

def get_complie_helper_by_script(self, ARGUMENTS, script_path, script_argv) :
def get_compile_helper_by_script(self, ARGUMENTS, script_path, script_argv) :
global COMPILE_CONFIG
script_path = os.path.abspath(script_path)
if os.path.exists(script_path) :
Expand All @@ -252,12 +252,12 @@ def __init__(self, ARGUMENTS):
global SRT_SCONS_CONFIG_SCRIPT
global SRT_SCONS_CONFIG_SCRIPT_ARGV
if SRT_SCONS_CONFIG_SCRIPT in ARGUMENTS :
self.complie_helper = self.get_complie_helper_by_script(ARGUMENTS, ARGUMENTS[SRT_SCONS_CONFIG_SCRIPT], ARGUMENTS.get(SRT_SCONS_CONFIG_SCRIPT_ARGV, ''))
self.compile_helper = self.get_compile_helper_by_script(ARGUMENTS, ARGUMENTS[SRT_SCONS_CONFIG_SCRIPT], ARGUMENTS.get(SRT_SCONS_CONFIG_SCRIPT_ARGV, ''))
else :
self.complie_helper = compile_config.complie_helper()
self.complie_helper.set_compile_config(COMPILE_CONFIG)
self.complie_helper.scons_user_sopt(ARGUMENTS)
compile_config.set_curr_config(self.complie_helper)
self.compile_helper = compile_config.compile_helper()
self.compile_helper.set_compile_config(COMPILE_CONFIG)
self.compile_helper.scons_user_sopt(ARGUMENTS)
compile_config.set_curr_config(self.compile_helper)

APP_ROOT = compile_config.get_curr_app_root()
if len(APP_ROOT) == 0:
Expand All @@ -272,21 +272,21 @@ def __init__(self, ARGUMENTS):
self.DEPENDS_LIBS = []
self.GEN_IDL_DEF = True
self.BUILD_SHARED = True
self.LINUX_FB = self.complie_helper.get_value('LINUX_FB', False)
self.LINUX_FB = self.compile_helper.get_value('LINUX_FB', False)
self.AWTK_ROOT = self.getAwtkRoot()
self.awtk = self.getAwtkConfig()
self.AWTK_LIBS = self.awtk.LIBS
self.AWTK_CFLAGS = self.awtk.CFLAGS
self.AWTK_CCFLAGS = self.awtk.CCFLAGS
self.APP_ROOT = APP_ROOT
self.BUILD_DIR = self.complie_helper.get_value('BUILD_DIR', '')
self.BUILD_DIR = self.compile_helper.get_value('BUILD_DIR', '')
self.BIN_DIR = os.path.join(self.BUILD_DIR, 'bin')
self.LIB_DIR = os.path.join(self.BUILD_DIR, 'lib')
self.APP_BIN_DIR = os.path.join(APP_ROOT, self.BIN_DIR)
self.APP_LIB_DIR = os.path.join(APP_ROOT, self.LIB_DIR)
self.APP_SRC = os.path.join(APP_ROOT, 'src')
self.APP_RES = os.path.join(APP_ROOT, 'res')
self.APP_LIBS = self.complie_helper.get_value('LIBS', [])
self.APP_LIBS = self.compile_helper.get_value('LIBS', [])
self.APP_LINKFLAGS = ''
self.PLATFORM_LIBS = []
self.APP_TOOLS = ['default']
Expand All @@ -304,7 +304,7 @@ def __init__(self, ARGUMENTS):
self.AWTK_OS_DEBUG = self.awtk.OS_DEBUG
else :
self.AWTK_OS_DEBUG = self.DEBUG
self.DEBUG = self.complie_helper.get_value('DEBUG', self.AWTK_OS_DEBUG)
self.DEBUG = self.compile_helper.get_value('DEBUG', self.AWTK_OS_DEBUG)
if isinstance(self.DEBUG, str) :
try :
from utils import strtobool
Expand All @@ -313,8 +313,8 @@ def __init__(self, ARGUMENTS):
self.DEBUG == self.DEBUG.lower() == 'true';

self.parseArgs(self.awtk, ARGUMENTS)
self.APP_CPPPATH = [self.APP_SRC, self.APP_RES] + self.complie_helper.get_value('CPPPATH', [])
self.APP_LIBPATH = [self.APP_LIB_DIR, self.APP_BIN_DIR] + self.complie_helper.get_value('LIBPATH', [])
self.APP_CPPPATH = [self.APP_SRC, self.APP_RES] + self.compile_helper.get_value('CPPPATH', [])
self.APP_LIBPATH = [self.APP_LIB_DIR, self.APP_BIN_DIR] + self.compile_helper.get_value('LIBPATH', [])

mkdir_if_not_exist(self.APP_BIN_DIR)
mkdir_if_not_exist(self.APP_LIB_DIR)
Expand All @@ -328,20 +328,20 @@ def __init__(self, ARGUMENTS):
if self.LINUX_FB:
os.environ['LINUX_FB'] = 'true'

self.WITH_JERRYSCRIPT = self.complie_helper.get_value('WITH_JERRYSCRIPT', False)
self.WITH_IOTJS = self.complie_helper.get_value('WITH_IOTJS', False)
self.WITH_JERRYSCRIPT = self.compile_helper.get_value('WITH_JERRYSCRIPT', False)
self.WITH_IOTJS = self.compile_helper.get_value('WITH_IOTJS', False)

WITH_MVVM = self.complie_helper.get_value('WITH_MVVM', False)
MVVM_ROOT = self.complie_helper.get_value('MVVM_ROOT', '')
WITH_MVVM = self.compile_helper.get_value('WITH_MVVM', False)
MVVM_ROOT = self.compile_helper.get_value('MVVM_ROOT', '')
if WITH_MVVM or os.path.exists(MVVM_ROOT):
os.environ['WITH_MVVM'] = 'true'
if not os.path.exists(MVVM_ROOT):
MVVM_ROOT = self.getMvvmRoot()
self.MVVM_ROOT = MVVM_ROOT
print("MVVM_ROOT: " + self.MVVM_ROOT)

WITH_AWFLOW = self.complie_helper.get_value('WITH_AWFLOW', False)
AWFLOW_ROOT = self.complie_helper.get_value('AWFLOW_ROOT', '')
WITH_AWFLOW = self.compile_helper.get_value('WITH_AWFLOW', False)
AWFLOW_ROOT = self.compile_helper.get_value('AWFLOW_ROOT', '')
print(WITH_AWFLOW)
if WITH_AWFLOW or os.path.exists(AWFLOW_ROOT):
os.environ['WITH_AWFLOW'] = 'true'
Expand All @@ -360,12 +360,12 @@ def __init__(self, ARGUMENTS):
def getAwtkConfig(self):
sys.path.insert(0, self.AWTK_ROOT)
os.chdir(self.AWTK_ROOT)
tmp_complie_helper = compile_config.get_curr_config()
compile_config.set_app_win32_res(tmp_complie_helper.get_value('WIN32_RES', None))
tmp_compile_helper = compile_config.get_curr_config()
compile_config.set_app_win32_res(tmp_compile_helper.get_value('WIN32_RES', None))
compile_config.set_curr_config(None)
import awtk_config as awtk
os.chdir(compile_config.get_curr_app_root())
compile_config.set_curr_config(tmp_complie_helper)
compile_config.set_curr_config(tmp_compile_helper)
return awtk

def saveUsesSdkInfo(self):
Expand Down Expand Up @@ -478,35 +478,35 @@ def parseArgs(self, awtk, ARGUMENTS):
APP_RES_ROOT = config.get_res_res_root()
LCD_ORIENTATION = config.get_res_lcd_orientation(APP_THEME)

LCD = self.complie_helper.get_value('LCD', '')
LCD = self.compile_helper.get_value('LCD', '')
if len(LCD) > 0:
wh = LCD.split('_')
if len(wh) >= 1:
LCD_WIDTH = wh[0]
if len(wh) >= 2:
LCD_HEIGHT = wh[1]

FONT = self.complie_helper.get_value('FONT', '')
FONT = self.compile_helper.get_value('FONT', '')
if len(FONT) > 0:
APP_DEFAULT_FONT = FONT

APP_THEME = self.complie_helper.get_value('THEME', APP_THEME)
APP_THEME = self.compile_helper.get_value('THEME', APP_THEME)

LANGUAGE = self.complie_helper.get_value('LANGUAGE', '')
LANGUAGE = self.compile_helper.get_value('LANGUAGE', '')
if len(LANGUAGE) > 0:
lan = LANGUAGE.split('_')
if len(lan) >= 1:
APP_DEFAULT_LANGUAGE = lan[0]
if len(lan) >= 2:
APP_DEFAULT_COUNTRY = lan[1]

APP_RES_ROOT = self.complie_helper.get_value('RES_ROOT', APP_RES_ROOT)
APP_RES_ROOT = self.compile_helper.get_value('RES_ROOT', APP_RES_ROOT)
self.APP_RES = os.path.abspath(os.path.join(self.APP_BIN_DIR, APP_RES_ROOT))

self.BUILD_SHARED = self.complie_helper.get_value('SHARED', False)
self.GEN_IDL_DEF = self.complie_helper.get_value('IDL_DEF', True)
self.BUILD_SHARED = self.compile_helper.get_value('SHARED', False)
self.GEN_IDL_DEF = self.compile_helper.get_value('IDL_DEF', True)

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

self.APP_CFLAGS = ''
self.APP_CCFLAGS = APP_CCFLAGS + self.complie_helper.get_value('FLAGS', '')
self.APP_CCFLAGS = APP_CCFLAGS + self.compile_helper.get_value('FLAGS', '')
self.APP_CXXFLAGS = ''

if PLATFORM == 'Linux':
Expand Down Expand Up @@ -591,8 +591,8 @@ def call(self, DefaultEnvironment):
BUILD_DEBUG_FLAG = awtk.BUILD_DEBUG_FLAG
else :
BUILD_DEBUG_FLAG = ' '
self.APP_BIN_DIR = self.complie_helper.get_value('APP_BIN_DIR', os.path.join(self.APP_ROOT, self.BIN_DIR))
self.APP_LIB_DIR = self.complie_helper.get_value('APP_LIB_DIR', os.path.join(self.APP_ROOT, self.LIB_DIR))
self.APP_BIN_DIR = self.compile_helper.get_value('APP_BIN_DIR', os.path.join(self.APP_ROOT, self.BIN_DIR))
self.APP_LIB_DIR = self.compile_helper.get_value('APP_LIB_DIR', os.path.join(self.APP_ROOT, self.LIB_DIR))

if self.MVVM_ROOT:
MVVM_3RD_ROOT = join_path(self.MVVM_ROOT, '3rd')
Expand Down Expand Up @@ -731,7 +731,7 @@ def call(self, DefaultEnvironment):
elif self.OS_NAME == 'Darwin' or self.OS_NAME == 'Linux' :
CCFLAGS += ' -Os '

if self.OS_NAME == 'Windows' and is_msvc and self.complie_helper.get_value('PDB', True) :
if self.OS_NAME == 'Windows' and is_msvc and self.compile_helper.get_value('PDB', True) :
LINKFLAGS += ' /DEBUG '
if self.DEBUG == self.AWTK_OS_DEBUG:
CCFLAGS += BUILD_DEBUG_FLAG
Expand Down
Loading

0 comments on commit 9f7a9dc

Please sign in to comment.