@@ -142,17 +142,6 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
142
142
# set BSP_ROOT in ENV
143
143
Env ['BSP_ROOT' ] = Dir ('#' ).abspath
144
144
os .environ ["BSP_DIR" ] = Dir ('#' ).abspath
145
- # set PKGS_ROOT in ENV
146
- if "PKGS_DIR" in os .environ :
147
- pass
148
- elif "PKGS_ROOT" in os .environ :
149
- os .environ ["PKGS_DIR" ] = os .environ ["PKGS_ROOT" ]
150
- elif "ENV_ROOT" in os .environ :
151
- os .environ ["PKGS_DIR" ] = os .path .join (os .environ ["ENV_ROOT" ], "packages" )
152
- elif sys .platform == "win32" :
153
- os .environ ["PKGS_DIR" ] = os .path .join (os .environ ["USERPROFILE" ], ".env" , "packages" )
154
- else :
155
- os .environ ["PKGS_DIR" ] = os .path .join (os .environ ["HOME" ], ".env" , "packages" )
156
145
157
146
sys .path += os .path .join (Rtt_Root , 'tools' )
158
147
@@ -205,7 +194,7 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
205
194
206
195
try :
207
196
# try to detect toolchains in env
208
- envm = utils .ImportModule ('env ' )
197
+ envm = utils .ImportModule ('env_helper ' )
209
198
# from env import GetSDKPath
210
199
exec_path = envm .GetSDKPath (rtconfig .CC )
211
200
if 'gcc' in rtconfig .CC :
@@ -331,7 +320,7 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
331
320
print ('--global-macros arguments are illegal!' )
332
321
333
322
if GetOption ('genconfig' ):
334
- from menukconfig import genconfig
323
+ from env_helper import genconfig
335
324
genconfig ()
336
325
exit (0 )
337
326
@@ -341,23 +330,23 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
341
330
exit (0 )
342
331
343
332
if GetOption ('menuconfig' ):
344
- from menukconfig import menuconfig
333
+ from env_helper import menuconfig
345
334
menuconfig (Rtt_Root )
346
335
exit (0 )
347
336
348
- if GetOption ('pyconfig-silent ' ):
349
- from menukconfig import guiconfig_silent
350
- guiconfig_silent (Rtt_Root )
337
+ if GetOption ('defconfig ' ):
338
+ from env_helper import defconfig
339
+ defconfig (Rtt_Root )
351
340
exit (0 )
352
341
353
- elif GetOption ('pyconfig ' ):
354
- from menukconfig import guiconfig
342
+ elif GetOption ('guiconfig ' ):
343
+ from env_helper import guiconfig
355
344
guiconfig (Rtt_Root )
356
345
exit (0 )
357
346
358
347
configfn = GetOption ('useconfig' )
359
348
if configfn :
360
- from menukconfig import mk_rtconfig
349
+ from env_helper import mk_rtconfig
361
350
mk_rtconfig (configfn )
362
351
exit (0 )
363
352
0 commit comments