mirror of
https://github.com/zlgopen/awtk.git
synced 2025-05-08 11:33:48 +08:00
improve build scripts
This commit is contained in:
parent
b0a8146a41
commit
5e1b4625c2
@ -29,6 +29,9 @@
|
|||||||
"en_US": "DemoUI",
|
"en_US": "DemoUI",
|
||||||
"zh_CN": "控件演示"
|
"zh_CN": "控件演示"
|
||||||
},
|
},
|
||||||
|
"config": {
|
||||||
|
"defaultFont": "default_full"
|
||||||
|
},
|
||||||
"sources": [
|
"sources": [
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -221,7 +221,6 @@ def files_replace_with_config(files, app_root_dst, config):
|
|||||||
app_full_name = config_get_app_full_name(config)
|
app_full_name = config_get_app_full_name(config)
|
||||||
app_name = config_get_app_name(config)
|
app_name = config_get_app_name(config)
|
||||||
vendor = config_get_app_vendor(config)
|
vendor = config_get_app_vendor(config)
|
||||||
|
|
||||||
files_replace(files, app_root_dst, app_full_name, app_name, vendor)
|
files_replace(files, app_root_dst, app_full_name, app_name, vendor)
|
||||||
|
|
||||||
|
|
||||||
@ -287,6 +286,7 @@ def update_cmake_file(config, filename):
|
|||||||
cflags = to_string(config_get_cflags(config))
|
cflags = to_string(config_get_cflags(config))
|
||||||
defines = to_string(config_get_defines(config))
|
defines = to_string(config_get_defines(config))
|
||||||
cppflags = to_string(config_get_cppflags(config))
|
cppflags = to_string(config_get_cppflags(config))
|
||||||
|
default_font_name = config_get_font_name(config)
|
||||||
|
|
||||||
if config_get_app_type(config) == "js":
|
if config_get_app_type(config) == "js":
|
||||||
cflags += "-DAWTK_WEB_JS"
|
cflags += "-DAWTK_WEB_JS"
|
||||||
@ -296,6 +296,7 @@ def update_cmake_file(config, filename):
|
|||||||
file_replace(filename, "EXTRA_DEFINES", defines)
|
file_replace(filename, "EXTRA_DEFINES", defines)
|
||||||
file_replace(filename, "EXTRA_CPPFLAGS", cppflags)
|
file_replace(filename, "EXTRA_CPPFLAGS", cppflags)
|
||||||
file_replace(filename, "EXTRA_INCLUDES", sincludes)
|
file_replace(filename, "EXTRA_INCLUDES", sincludes)
|
||||||
|
file_replace(filename, "AWTK_DEFAULT_FONT_NAME", default_font_name)
|
||||||
|
|
||||||
def config_get_app_type(config):
|
def config_get_app_type(config):
|
||||||
if "app_type" in config:
|
if "app_type" in config:
|
||||||
@ -316,6 +317,12 @@ def config_get_app_vendor(config):
|
|||||||
else:
|
else:
|
||||||
return "zlgopen"
|
return "zlgopen"
|
||||||
|
|
||||||
|
def config_get_font_name(config):
|
||||||
|
if "config" in config:
|
||||||
|
cfg = config["config"]
|
||||||
|
if "defaultFont" in cfg:
|
||||||
|
return cfg["defaultFont"]
|
||||||
|
return "default"
|
||||||
|
|
||||||
def config_get_app_full_name(config):
|
def config_get_app_full_name(config):
|
||||||
if "app_name" in config:
|
if "app_name" in config:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user