mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Auto merge of #11780 - simartin:issue_11388, r=metajack
Issue #11388: --debug and --browserhtml are not exclusive in 'mach run'. <!-- Please describe your changes on the following line: --> Fix ./mach run --debug --browserhtml --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #11388 <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because they concern dev tooling and there's no testing infrastructure for "./mach run --debug" <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11780) <!-- Reviewable:end -->
This commit is contained in:
commit
ca26e95e44
1 changed files with 19 additions and 19 deletions
|
@ -98,6 +98,25 @@ class PostBuildCommands(CommandBase):
|
||||||
|
|
||||||
args = [self.get_binary_path(release, dev)]
|
args = [self.get_binary_path(release, dev)]
|
||||||
|
|
||||||
|
if browserhtml:
|
||||||
|
browserhtml_path = find_dep_path_newest('browserhtml', args[0])
|
||||||
|
if browserhtml_path is None:
|
||||||
|
print("Could not find browserhtml package; perhaps you haven't built Servo.")
|
||||||
|
return 1
|
||||||
|
|
||||||
|
if is_macosx():
|
||||||
|
# Enable borderless on OSX
|
||||||
|
args = args + ['-b']
|
||||||
|
elif is_windows():
|
||||||
|
# Convert to a relative path to avoid mingw -> Windows path conversions
|
||||||
|
browserhtml_path = path.relpath(browserhtml_path, os.getcwd())
|
||||||
|
|
||||||
|
args = args + ['-w',
|
||||||
|
'--pref', 'dom.mozbrowser.enabled',
|
||||||
|
'--pref', 'dom.forcetouch.enabled',
|
||||||
|
'--pref', 'shell.quit-on-escape.enabled=false',
|
||||||
|
path.join(browserhtml_path, 'out', 'index.html')]
|
||||||
|
|
||||||
# Borrowed and modified from:
|
# Borrowed and modified from:
|
||||||
# http://hg.mozilla.org/mozilla-central/file/c9cfa9b91dea/python/mozbuild/mozbuild/mach_commands.py#l883
|
# http://hg.mozilla.org/mozilla-central/file/c9cfa9b91dea/python/mozbuild/mozbuild/mach_commands.py#l883
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -126,25 +145,6 @@ class PostBuildCommands(CommandBase):
|
||||||
# Prepend the debugger args.
|
# Prepend the debugger args.
|
||||||
args = ([command] + self.debuggerInfo.args +
|
args = ([command] + self.debuggerInfo.args +
|
||||||
args + params)
|
args + params)
|
||||||
elif browserhtml:
|
|
||||||
browserhtml_path = find_dep_path_newest('browserhtml', args[0])
|
|
||||||
if browserhtml_path is None:
|
|
||||||
print("Could not find browserhtml package; perhaps you haven't built Servo.")
|
|
||||||
return 1
|
|
||||||
|
|
||||||
if is_macosx():
|
|
||||||
# Enable borderless on OSX
|
|
||||||
args = args + ['-b']
|
|
||||||
elif is_windows():
|
|
||||||
# Convert to a relative path to avoid mingw -> Windows path conversions
|
|
||||||
browserhtml_path = path.relpath(browserhtml_path, os.getcwd())
|
|
||||||
|
|
||||||
args = args + ['-w',
|
|
||||||
'--pref', 'dom.mozbrowser.enabled',
|
|
||||||
'--pref', 'dom.forcetouch.enabled',
|
|
||||||
'--pref', 'shell.quit-on-escape.enabled=false',
|
|
||||||
path.join(browserhtml_path, 'out', 'index.html')]
|
|
||||||
args = args + params
|
|
||||||
else:
|
else:
|
||||||
args = args + params
|
args = args + params
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue