mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-01 10:54:27 +02:00
Initial support for menuconfig target
This commit is contained in:
@@ -436,16 +436,23 @@ class PlatformRunMixin(object):
|
|||||||
for key, value in variables.items():
|
for key, value in variables.items():
|
||||||
args.append("%s=%s" % (key.upper(), self.encode_scons_arg(value)))
|
args.append("%s=%s" % (key.upper(), self.encode_scons_arg(value)))
|
||||||
|
|
||||||
def _write_and_flush(stream, data):
|
|
||||||
try:
|
|
||||||
stream.write(data)
|
|
||||||
stream.flush()
|
|
||||||
except IOError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
proc.copy_pythonpath_to_osenv()
|
proc.copy_pythonpath_to_osenv()
|
||||||
|
|
||||||
|
if targets and "menuconfig" in targets:
|
||||||
|
return proc.exec_command(
|
||||||
|
args, stdout=sys.stdout, stderr=sys.stderr, stdin=sys.stdin
|
||||||
|
)
|
||||||
|
|
||||||
if click._compat.isatty(sys.stdout):
|
if click._compat.isatty(sys.stdout):
|
||||||
result = proc.exec_command(
|
|
||||||
|
def _write_and_flush(stream, data):
|
||||||
|
try:
|
||||||
|
stream.write(data)
|
||||||
|
stream.flush()
|
||||||
|
except IOError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
return proc.exec_command(
|
||||||
args,
|
args,
|
||||||
stdout=proc.BuildAsyncPipe(
|
stdout=proc.BuildAsyncPipe(
|
||||||
line_callback=self._on_stdout_line,
|
line_callback=self._on_stdout_line,
|
||||||
@@ -456,13 +463,12 @@ class PlatformRunMixin(object):
|
|||||||
data_callback=lambda data: _write_and_flush(sys.stderr, data),
|
data_callback=lambda data: _write_and_flush(sys.stderr, data),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
result = proc.exec_command(
|
return proc.exec_command(
|
||||||
args,
|
args,
|
||||||
stdout=proc.LineBufferedAsyncPipe(line_callback=self._on_stdout_line),
|
stdout=proc.LineBufferedAsyncPipe(line_callback=self._on_stdout_line),
|
||||||
stderr=proc.LineBufferedAsyncPipe(line_callback=self._on_stderr_line),
|
stderr=proc.LineBufferedAsyncPipe(line_callback=self._on_stderr_line),
|
||||||
)
|
)
|
||||||
return result
|
|
||||||
|
|
||||||
def _on_stdout_line(self, line):
|
def _on_stdout_line(self, line):
|
||||||
if "`buildprog' is up to date." in line:
|
if "`buildprog' is up to date." in line:
|
||||||
|
Reference in New Issue
Block a user