diff --git a/SConstruct b/SConstruct index cf12571b5..b3e3aa72c 100644 --- a/SConstruct +++ b/SConstruct @@ -9,7 +9,7 @@ DefaultEnvironment(TOOLS = APP_TOOLS, CCFLAGS = awtk.AWTK_CCFLAGS, LIBS = awtk.LIBS, LIBPATH = awtk.LIBPATH, - CPPPATH = awtk.CPPPATH, + CPPPATH = awtk.CPPPATH + [awtk.joinPath(awtk.TK_ROOT, 'res')], LINKFLAGS = awtk.LINKFLAGS, TARGET_ARCH=awtk.TARGET_ARCH, OS_SUBSYSTEM_CONSOLE=awtk.OS_SUBSYSTEM_CONSOLE, diff --git a/awtk_config.py b/awtk_config.py index 67b9ade56..e89a4710a 100644 --- a/awtk_config.py +++ b/awtk_config.py @@ -302,6 +302,10 @@ def copySharedLib(src, dst, name): src = os.path.normpath(src); dst = os.path.normpath(dst); + + if os.path.dirname(src) == dst: + return + if not os.path.exists(src): print('Can\'t find ' + src + '. Please build '+name+'before!') else: diff --git a/build.json b/build.json new file mode 100644 index 000000000..b87797140 --- /dev/null +++ b/build.json @@ -0,0 +1,23 @@ +{ + "name":"demoui", + "version":"1.0", + "assets" : "res/assets", + "author" : "xianjimli@hotmail.com", + "copyright" : "Guangzhou ZHIYUAN Electronics Co.,Ltd.", + "web": { + "app_type":"c", + "sources":["demos/demo_ui_app.c", "demos/assets.c"], + "config" : { + "fontScale":"0.8", + "defaultFont":"sans" + } + }, + "android" : { + "app_name":"org.zlgopen.demoui", + "sources":["demos/assets.c", "demos/assets.h", "demos/demo_ui_app.c", "demos/vg_common.inc", "res/assets.inc", "res/assets/__assets_default.inc"] + }, + "ios" : { + "app_name":"org.zlgopen.demoui", + "sources":["demos/assets.c", "demos/assets.h", "demos/demo_ui_app.c", "demos/vg_common.inc", "res/assets.inc", "res/assets/__assets_default.inc"] + } +} diff --git a/demos/assets.c b/demos/assets.c index f05a8e913..9f5140af7 100644 --- a/demos/assets.c +++ b/demos/assets.c @@ -1,2 +1,2 @@ #include "awtk.h" -#include "../res/assets.inc" +#include "assets.inc" diff --git a/demos/demoui_build.json b/demos/demoui_build.json deleted file mode 100644 index 802d85621..000000000 --- a/demos/demoui_build.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name":"demoui", - "version":"1.0", - "assets" : "assets", - "author" : "xianjimli@hotmail.com", - "copyright" : "Guangzhou ZHIYUAN Electronics Co.,Ltd.", - "web": { - "app_type":"c", - "sources":["demo_ui_app.c"], - "config" : { - "fontScale":"0.8", - "defaultFont":"sans" - } - }, - "android" : { - "app_name":"org.zlgopen.demoui", - "sources":["assets.c", "assets/__assets_dark.inc", "assets/__assets_default.inc", "assets.h", "demo_ui_app.c", "vg_common.inc"] - }, - "ios" : { - "app_name":"org.zlgopen.demoui", - "sources":["assets.c", "assets/__assets_dark.inc", "assets/__assets_default.inc", "assets.h", "demo_ui_app.c", "vg_common.inc"] - } -}