mirror of
https://github.com/zlgopen/awtk.git
synced 2025-05-07 19:05:54 +08:00
fix misspelling
This commit is contained in:
parent
a416da5e73
commit
9f7a9dcc35
20
SConstruct
20
SConstruct
@ -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
|
||||
|
||||
@ -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',
|
||||
@ -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
|
||||
@ -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)
|
||||
|
@ -5,7 +5,7 @@ import os.path
|
||||
|
||||
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
|
||||
@ -22,7 +22,7 @@ if not os.path.exists(WIN32_AWTK_RES):
|
||||
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)
|
||||
|
||||
@ -40,13 +40,13 @@ AWTK_STATIC_LIBS = AWTK_STATIC_LIBS+TKC_STATIC_LIBS
|
||||
# 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('\\', '\\\\')
|
||||
@ -60,7 +60,7 @@ NANOVG_BACKEND = 'GL3'
|
||||
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 = ''
|
||||
@ -78,7 +78,7 @@ else:
|
||||
# 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'
|
||||
@ -102,10 +102,10 @@ COMMON_CCFLAGS = ' -DTK_ROOT=\"\\\"'+TK_ROOT+'\\\"\" '
|
||||
#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 '
|
||||
|
||||
|
||||
@ -246,7 +246,7 @@ elif OS_NAME == 'Windows':
|
||||
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 '
|
||||
|
||||
|
||||
@ -315,7 +315,7 @@ os.environ['WITH_AWTK_SO'] = 'true'
|
||||
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
|
||||
|
||||
|
@ -3,7 +3,7 @@ import os.path
|
||||
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:
|
||||
@ -81,7 +81,7 @@ TOOLS_NAME = ''
|
||||
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('\\', '\\\\')
|
||||
@ -96,7 +96,7 @@ OS_SUBSYSTEM_WINDOWS = ''
|
||||
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':
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
# 最新动态
|
||||
|
||||
2024/12/30
|
||||
* 修改编译脚本拼写错误(感谢兆坤提供补丁)
|
||||
|
||||
2024/12/29
|
||||
* 修改拼写错误(感谢兆坤提供补丁)
|
||||
|
||||
|
@ -229,7 +229,7 @@ class AppHelperBase:
|
||||
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) :
|
||||
@ -252,12 +252,12 @@ class AppHelperBase:
|
||||
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:
|
||||
@ -272,21 +272,21 @@ class AppHelperBase:
|
||||
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']
|
||||
@ -304,7 +304,7 @@ class AppHelperBase:
|
||||
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
|
||||
@ -313,8 +313,8 @@ class AppHelperBase:
|
||||
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)
|
||||
@ -328,11 +328,11 @@ class AppHelperBase:
|
||||
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):
|
||||
@ -340,8 +340,8 @@ class AppHelperBase:
|
||||
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'
|
||||
@ -360,12 +360,12 @@ class AppHelperBase:
|
||||
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):
|
||||
@ -478,7 +478,7 @@ class AppHelperBase:
|
||||
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:
|
||||
@ -486,13 +486,13 @@ class AppHelperBase:
|
||||
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:
|
||||
@ -500,13 +500,13 @@ class AppHelperBase:
|
||||
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;
|
||||
@ -525,7 +525,7 @@ class AppHelperBase:
|
||||
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':
|
||||
@ -591,8 +591,8 @@ class AppHelperBase:
|
||||
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')
|
||||
@ -731,7 +731,7 @@ class AppHelperBase:
|
||||
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
|
||||
|
@ -19,9 +19,9 @@ def get_curr_config() :
|
||||
global COMPILE_CONFIG
|
||||
return COMPILE_CONFIG
|
||||
|
||||
def set_curr_config(complie_config) :
|
||||
def set_curr_config(compile_config) :
|
||||
global COMPILE_CONFIG
|
||||
COMPILE_CONFIG = complie_config
|
||||
COMPILE_CONFIG = compile_config
|
||||
|
||||
def set_app_win32_res(dir_path) :
|
||||
global WIN32_RES
|
||||
@ -41,11 +41,11 @@ def get_curr_config_for_awtk() :
|
||||
if COMPILE_CONFIG != None :
|
||||
return COMPILE_CONFIG
|
||||
else :
|
||||
COMPILE_CONFIG = complie_helper()
|
||||
if not COMPILE_CONFIG.load_last_complie_argv() :
|
||||
COMPILE_CONFIG = compile_helper()
|
||||
if not COMPILE_CONFIG.load_last_compile_argv() :
|
||||
print('========================= Error ================================')
|
||||
print('Please Recompile AWTK !!!!!')
|
||||
sys.exit('Not found last complie argv config file !!!!!')
|
||||
sys.exit('Not found last compile argv config file !!!!!')
|
||||
COMPILE_CONFIG.set_value('WIN32_RES', WIN32_RES)
|
||||
return COMPILE_CONFIG;
|
||||
|
||||
@ -73,9 +73,9 @@ def json_obj_save_file(obj, file_path) :
|
||||
else :
|
||||
print(dir + ' is not exists')
|
||||
|
||||
class complie_helper :
|
||||
class compile_helper :
|
||||
DEFAULT_CONFIG_FILE = './awtk_config_define.py'
|
||||
LAST_COMLIP_ARGV_FILE = './bin/last_complie_argv.json'
|
||||
LAST_COMLIP_ARGV_FILE = './bin/last_compile_argv.json'
|
||||
|
||||
COMPILE_CMD_INFO = collections.OrderedDict({
|
||||
'help' : { 'name': 'HELP', 'help_info' : 'show all usage'},
|
||||
@ -257,10 +257,10 @@ class complie_helper :
|
||||
else:
|
||||
self.config[name]['value'] = value
|
||||
|
||||
def save_last_complie_argv(self) :
|
||||
def save_last_compile_argv(self) :
|
||||
json_obj_save_file(self.config, self.LAST_COMLIP_ARGV_FILE);
|
||||
|
||||
def load_last_complie_argv(self) :
|
||||
def load_last_compile_argv(self) :
|
||||
if os.path.exists(self.LAST_COMLIP_ARGV_FILE) :
|
||||
obj = json_obj_load_file(self.LAST_COMLIP_ARGV_FILE);
|
||||
if obj != None :
|
||||
|
@ -15,9 +15,9 @@ env=DefaultEnvironment().Clone();
|
||||
|
||||
sys.path.insert(0, './scripts')
|
||||
import compile_config
|
||||
complie_helper = compile_config.complie_helper()
|
||||
compile_helper = compile_config.compile_helper()
|
||||
|
||||
if not complie_helper.get_value('BUILD_DEMOS', True) :
|
||||
if not compile_helper.get_value('BUILD_DEMOS', True) :
|
||||
env.Library(os.path.join(LIB_DIR, 'assets'), ['../demos/assets.c'], LINKFLAGS = env['OS_SUBSYSTEM_WINDOWS'] + env['LINKFLAGS']);
|
||||
|
||||
INCLUDE_PATH = [TK_ROOT,
|
||||
|
Loading…
x
Reference in New Issue
Block a user