提交 0701b57e 编写于 作者: P prife

Merge pull request #188 from prife/master

simulatr: print error messages when RTT_RTGUI is invalid
...@@ -13,7 +13,6 @@ else: ...@@ -13,7 +13,6 @@ else:
# set the rtgui root directory by hand # set the rtgui root directory by hand
# empty string means use the RTGUI in svn # empty string means use the RTGUI in svn
RTT_RTGUI = os.path.normpath(r'F:\Project\git\rt-gui\components\rtgui') RTT_RTGUI = os.path.normpath(r'F:\Project\git\rt-gui\components\rtgui')
# RTT_RTGUI =''
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
from building import * from building import *
...@@ -87,18 +86,27 @@ else: ...@@ -87,18 +86,27 @@ else:
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False, remove_components=['rtgui']) objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False, remove_components=['rtgui'])
if GetDepend('RT_USING_RTGUI'): if GetDepend('RT_USING_RTGUI'):
if RTT_RTGUI: try:
objs += SConscript(os.path.join(RTT_RTGUI, 'SConscript'), if RTT_RTGUI:
variant_dir='build/components/rtgui', objs += SConscript(os.path.join(RTT_RTGUI, 'SConscript'),
duplicate=0) variant_dir='build/components/rtgui',
objs = objs + SConscript(RTT_RTGUI+'/../../demo/examples/SConscript', duplicate=0)
variant_dir='build/examples/gui', duplicate=0) objs = objs + SConscript(RTT_RTGUI+'/../../demo/examples/SConscript',
else: variant_dir='build/examples/gui', duplicate=0)
objs += SConscript(os.path.join(RTT_ROOT + '/components/rtgui', 'SConscript'), else:
variant_dir='build/components/rtgui', objs += SConscript(os.path.join(RTT_ROOT + '/components/rtgui', 'SConscript'),
duplicate=0) variant_dir='build/components/rtgui',
objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', duplicate=0)
variant_dir='build/examples/gui', duplicate=0) objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript',
variant_dir='build/examples/gui', duplicate=0)
except:
print
print 'RTGUI configuration is invalid!'
print 'RT_USING_RTGUI is enabled in rtconfig.h, but scons cannot find '+\
'RTGUI source code. In order to eliminate this error, you can '+\
'add RTT_RTGUI in environment to point RTGUI source code, or '+\
'disable RT_USING_RTGUI in rtconfig.h'
exit(-1);
if GetDepend('RT_USING_TC'): if GetDepend('RT_USING_TC'):
objs = objs + SConscript(RTT_ROOT + '/examples/kernel/SConscript', variant_dir = 'build/tc/kernel', duplicate=0) objs = objs + SConscript(RTT_ROOT + '/examples/kernel/SConscript', variant_dir = 'build/tc/kernel', duplicate=0)
......
...@@ -22,9 +22,9 @@ if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_MTD_NAND') == False ...@@ -22,9 +22,9 @@ if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_MTD_NAND') == False
SrcRemove(src, 'nanddrv_file.c') SrcRemove(src, 'nanddrv_file.c')
if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_MTD_NOR') == False: if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_MTD_NOR') == False:
SrcRemove(src, 'sst25vfxx_mtd_sim.c') SrcRemove(src, 'sst25vfxx_mtd_sim.c')
if GetDepend('RT_USING_DFS_WINSHAREDIR') == False: if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_DFS_WINSHAREDIR') == False:
SrcRemove(src, 'dfs_win32.c') SrcRemove(src, 'dfs_win32.c')
if GetDepend('RT_USING_MODULE') == False: if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_MODULE') == False:
SrcRemove(src, ['module_win32.c']) SrcRemove(src, ['module_win32.c'])
if GetDepend('RT_USING_TAPNETIF') == False: if GetDepend('RT_USING_TAPNETIF') == False:
SrcRemove(src, ['tap_netif.c']) SrcRemove(src, ['tap_netif.c'])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册