зеркало из https://github.com/mozilla/gecko-dev.git
Bug 841445 - Add a 'mach run' command to launch the compiled binary [r=gps]
DONTBUILD (not part of the build)
This commit is contained in:
Родитель
ac1756efef
Коммит
a0320cb053
|
@ -338,6 +338,26 @@ class Install(MachCommandBase):
|
|||
def install(self):
|
||||
return self._run_make(directory=".", target='install', ensure_exit_code=False)
|
||||
|
||||
@CommandProvider
|
||||
class RunProgram(MachCommandBase):
|
||||
"""Launch the compiled binary"""
|
||||
|
||||
@Command('run', help='Run the compiled program.', prefix_chars='+')
|
||||
@CommandArgument('params', default=None, nargs='*',
|
||||
help='Command-line arguments to pass to the program.')
|
||||
def run(self, params):
|
||||
try:
|
||||
args = [self.get_binary_path('app')]
|
||||
except Exception as e:
|
||||
print("It looks like your program isn't built.",
|
||||
"You can run |mach build| to build it.")
|
||||
print(e)
|
||||
return 1
|
||||
if params:
|
||||
args.extend(params)
|
||||
return self.run_process(args=args, ensure_exit_code=False,
|
||||
pass_thru=True)
|
||||
|
||||
@CommandProvider
|
||||
class Buildsymbols(MachCommandBase):
|
||||
"""Produce a package of debug symbols suitable for use with Breakpad."""
|
||||
|
|
Загрузка…
Ссылка в новой задаче