Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kill browserhtml #19975

Merged
merged 5 commits into from Feb 13, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

remove bhtml

  • Loading branch information
paulrouget committed Feb 11, 2018
commit 019fdaa1bd57c150547c02641fac621e41d0b9e2

Some generated files are not rendered by default. Learn more.

@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>run-servo</string>
<string>servo</string>
<key>CFBundleGetInfoString</key>
<string>Servo</string>
<key>CFBundleIconFile</key>
@@ -253,11 +253,6 @@ Run Servo with the command:
./mach run https://www.google.com
```

Also, don't miss the info on the [browserhtml page](https://github.com/browserhtml/browserhtml) on how to run the Browser.html
full tech demo (it provides a more browser-like experience than just browsing a single
URL with servo).


### Commandline Arguments

- `-p INTERVAL` turns on the profiler and dumps info to the console every
@@ -26,7 +26,6 @@ unstable = ["libservo/unstable"]

[dependencies]
backtrace = "0.3"
browserhtml = {git = "https://github.com/browserhtml/browserhtml", branch = "crate"}
bitflags = "1.0"
compositing = {path = "../../components/compositing"}
euclid = "0.16"
@@ -65,13 +65,6 @@ def find_dep_path_newest(package, bin_path):
return None


def get_browserhtml_path(binary_path):
browserhtml_path = find_dep_path_newest('browserhtml', binary_path)
if browserhtml_path:
return path.join(browserhtml_path, "out")
sys.exit("Could not find browserhtml package; perhaps you haven't built Servo.")


def archive_deterministically(dir_to_archive, dest_archive, prepend_path=None):
"""Create a .tar.gz archive in a deterministic (reproducible) manner.
@@ -36,7 +36,6 @@
CommandBase,
is_macosx,
is_windows,
get_browserhtml_path,
)
from servo.util import delete

@@ -228,11 +227,9 @@ def package(self, release=False, dev=False, android=None, debug=False, debugger=
if path.exists(dir_to_dmg):
print("Cleaning up from previous packaging")
delete(dir_to_dmg)
browserhtml_path = get_browserhtml_path(binary_path)

print("Copying files")
shutil.copytree(path.join(dir_to_root, 'resources'), dir_to_resources)
shutil.copytree(browserhtml_path, path.join(dir_to_resources, 'browserhtml'))
shutil.copy2(path.join(dir_to_root, 'Info.plist'), path.join(dir_to_app, 'Contents', 'Info.plist'))

content_dir = path.join(dir_to_app, 'Contents', 'MacOS')
@@ -264,16 +261,6 @@ def package(self, release=False, dev=False, android=None, debug=False, debugger=
credits_file.write(template.render(version=version))
delete(template_path)

print("Writing run-servo")
bhtml_path = path.join('${0%/*}', '..', 'Resources', 'browserhtml', 'index.html')
runservo = os.open(
path.join(content_dir, 'run-servo'),
os.O_WRONLY | os.O_CREAT,
int("0755", 8)
)
os.write(runservo, '#!/bin/bash\nexec ${0%/*}/servo ' + bhtml_path)
os.close(runservo)

print("Creating dmg")
os.symlink('/Applications', path.join(dir_to_dmg, 'Applications'))
dmg_path = path.join(target_dir, "servo-tech-demo.dmg")
@@ -323,14 +310,12 @@ def package(self, release=False, dev=False, android=None, debug=False, debugger=
print("Cleaning up from previous packaging")
delete(dir_to_msi)
os.makedirs(dir_to_msi)
browserhtml_path = get_browserhtml_path(binary_path)

print("Copying files")
dir_to_temp = path.join(dir_to_msi, 'temp')
dir_to_temp_servo = path.join(dir_to_temp, 'servo')
dir_to_resources = path.join(dir_to_temp_servo, 'resources')
shutil.copytree(path.join(dir_to_root, 'resources'), dir_to_resources)
shutil.copytree(browserhtml_path, path.join(dir_to_temp_servo, 'browserhtml'))
shutil.copy(binary_path, dir_to_temp_servo)
shutil.copy("{}.manifest".format(binary_path), dir_to_temp_servo)
copy_windows_dependencies(target_dir, dir_to_temp_servo)
@@ -372,7 +357,6 @@ def package(self, release=False, dev=False, android=None, debug=False, debugger=
delete(dir_to_temp)
else:
dir_to_temp = path.join(target_dir, 'packaging-temp')
browserhtml_path = get_browserhtml_path(binary_path)
if path.exists(dir_to_temp):
# TODO(aneeshusa): lock dir_to_temp to prevent simultaneous builds
print("Cleaning up from previous packaging")
@@ -381,7 +365,6 @@ def package(self, release=False, dev=False, android=None, debug=False, debugger=
print("Copying files")
dir_to_resources = path.join(dir_to_temp, 'resources')
shutil.copytree(path.join(dir_to_root, 'resources'), dir_to_resources)
shutil.copytree(browserhtml_path, path.join(dir_to_temp, 'browserhtml'))
shutil.copy(binary_path, dir_to_temp)

change_prefs(dir_to_resources, "linux")
@@ -23,8 +23,7 @@
from servo.command_base import (
CommandBase,
check_call, check_output, BIN_SUFFIX,
is_linux, is_windows, is_macosx, set_osmesa_env,
get_browserhtml_path,
is_linux, set_osmesa_env,
)


@@ -53,8 +52,6 @@ class PostBuildCommands(CommandBase):
'have no effect without this.')
@CommandArgument('--debugger', default=None, type=str,
help='Name of debugger to use.')
@CommandArgument('--browserhtml', '-b', action='store_true',
help='Launch with Browser.html')
@CommandArgument('--headless', '-z', action='store_true',
help='Launch in headless mode')
@CommandArgument('--software', '-s', action='store_true',
@@ -64,7 +61,7 @@ class PostBuildCommands(CommandBase):
@CommandArgument(
'params', nargs='...',
help="Command-line arguments to be passed through to Servo")
def run(self, params, release=False, dev=False, android=None, debug=False, debugger=None, browserhtml=False,
def run(self, params, release=False, dev=False, android=None, debug=False, debugger=None,
headless=False, software=False, bin=None):
env = self.build_env()
env["RUST_BACKTRACE"] = "1"
@@ -100,20 +97,6 @@ def run(self, params, release=False, dev=False, android=None, debug=False, debug

args = [bin or self.get_binary_path(release, dev)]

if browserhtml:
browserhtml_path = get_browserhtml_path(args[0])
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 + ['--pref', 'dom.mozbrowser.enabled',
'--pref', 'dom.forcetouch.enabled',
'--pref', 'shell.builtin-key-shortcuts.enabled=false',
path.join(browserhtml_path, 'index.html')]

if headless:
set_osmesa_env(args[0], env)
args.append('-z')
@@ -1,7 +1,3 @@
{
"dom.forcetouch.enabled": true,
"dom.mozbrowser.enabled": true,
"shell.builtin-key-shortcuts.enabled": false,
"os:windows,os:linux;shell.homepage": "browserhtml/index.html",
"os:macosx;shell.native-titlebar.enabled": false
"_comment": "this file is used to add some specific preferences to the Servo package (nightly builds)"
}
@@ -8,7 +8,6 @@
"dom.gamepad.enabled": false,
"dom.microdata.testing.enabled": true,
"dom.mouseevent.which.enabled": false,
"dom.mozbrowser.enabled": false,
"dom.mutation_observer.enabled": false,
"dom.permissions.enabled": false,
"dom.permissions.testing.allowed_in_nonsecure_contexts": false,
@@ -44,7 +44,6 @@
</Component>

${include_directory(resources_path, "resources")}
${include_directory(path.join(dir_to_temp, "browserhtml"), "browserhtml")}
</Directory>
</Directory>
</Directory>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.