316 obj.source = "scratch/%s" % filename |
316 obj.source = "scratch/%s" % filename |
317 obj.target = "scratch/%s" % name |
317 obj.target = "scratch/%s" % name |
318 obj.name = obj.target |
318 obj.name = obj.target |
319 |
319 |
320 |
320 |
321 ## |
|
322 ## This replacement spawn function increases the maximum command line length to 32k |
|
323 ## |
|
324 def _exec_command_interact_win32(s): |
|
325 if Params.g_verbose: |
|
326 print s |
|
327 startupinfo = subprocess.STARTUPINFO() |
|
328 startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW |
|
329 proc = subprocess.Popen(s, shell=False, startupinfo=startupinfo) |
|
330 stat = proc.wait() |
|
331 if stat & 0xff: |
|
332 return stat | 0x80 |
|
333 return stat >> 8 |
|
334 |
|
335 |
|
336 def build(bld): |
321 def build(bld): |
337 if Options.options.no_task_lines: |
322 if Options.options.no_task_lines: |
338 import Runner |
323 import Runner |
339 def null_printout(s): |
324 def null_printout(s): |
340 pass |
325 pass |
341 Runner.printout = null_printout |
326 Runner.printout = null_printout |
342 |
|
343 if sys.platform == 'win32': |
|
344 import Runner |
|
345 Runner.exec_command = _exec_command_interact_win32 |
|
346 |
327 |
347 Options.cwd_launch = bld.path.abspath() |
328 Options.cwd_launch = bld.path.abspath() |
348 bld.create_ns3_program = types.MethodType(create_ns3_program, bld) |
329 bld.create_ns3_program = types.MethodType(create_ns3_program, bld) |
349 bld.create_suid_program = types.MethodType(create_suid_program, bld) |
330 bld.create_suid_program = types.MethodType(create_suid_program, bld) |
350 |
331 |