mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
remove bhtml
This commit is contained in:
parent
2f4362e0c1
commit
019fdaa1bd
10 changed files with 4 additions and 64 deletions
|
@ -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 @@ from servo.command_base import (
|
|||
CommandBase,
|
||||
is_macosx,
|
||||
is_windows,
|
||||
get_browserhtml_path,
|
||||
)
|
||||
from servo.util import delete
|
||||
|
||||
|
@ -228,11 +227,9 @@ class PackageCommands(CommandBase):
|
|||
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 @@ class PackageCommands(CommandBase):
|
|||
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 @@ class PackageCommands(CommandBase):
|
|||
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 @@ class PackageCommands(CommandBase):
|
|||
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 @@ class PackageCommands(CommandBase):
|
|||
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 mach.decorators import (
|
|||
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 @@ class PostBuildCommands(CommandBase):
|
|||
|
||||
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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue