Skip to content
Snippets Groups Projects
Verified Commit e5e23eb6 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

Bug 42337: Make geckodriver available for all desktop platforms.

parent 18ee3e22
Branches
Tags
1 merge request!874Bug 41045, 41046 & 42337 (TB): Include Geckodriver and twaks to the build system
......@@ -413,15 +413,34 @@ SCRIPT_EOF
[% IF c("var/updater_enabled") -%]
cp $rootdir/[% c('input_files_by_name/firefox') %]/mar-tools-*.zip "$OUTDIR"/
[% END -%]
[% IF c("var/linux-x86_64") -%]
# TODO: See if we can make symbols also for Linux i686, see tor-browser#42146.
cp $rootdir/[% c('input_files_by_name/firefox') %]/browser-debug-symbols.tar.xz "$OUTDIR/[% c('var/project-name') %]-debug-symbols-[% c('var/mar_osname') %]-[% c('var/torbrowser_version') %].tar.xz"
[% IF !c("var/asan") -%]
cp $rootdir/[% c('input_files_by_name/firefox') %]/geckodriver.tar.xz "$OUTDIR/geckodriver-[% c('var/mar_osname') %]-[% c('var/torbrowser_version') %].tar.xz"
[% IF c("var/windows") -%]
archive_ext=zip
[% ELSE -%]
archive_ext=tar.xz
[% END -%]
[% ELSIF c("var/windows") -%]
cp $rootdir/[% c('input_files_by_name/firefox') %]/browser-debug-symbols.zip "$OUTDIR/[% c('var/project-name') %]-debug-symbols-[% c('var/mar_osname') %]-[% c('var/torbrowser_version') %].zip"
debug_symbols="$rootdir/[% c('input_files_by_name/firefox') %]/browser-debug-symbols.$archive_ext"
if [[ -f "$debug_symbols" ]]; then
cp "$debug_symbols" "$OUTDIR/[% c('var/project-name') %]-debug-symbols-[% c('var/mar_osname') %]-[% c('var/torbrowser_version') %].$archive_ext"
fi
[% IF c("var/macos_universal") -%]
geckodriver="$rootdir/[% c('input_files_by_name/firefox') %]/geckodriver.$archive_ext"
if [[ -f "$geckodriver" ]]; then
cp "$geckodriver" "$OUTDIR/geckodriver-[% c('var/osname') %]-[% c('var/torbrowser_version') %].$archive_ext"
fi
geckodriver="$rootdir/[% c('input_files_by_name/firefox-aarch64') %]/geckodriver.$archive_ext"
if [[ -f "$geckodriver" ]]; then
cp "$geckodriver" "$OUTDIR/geckodriver-macos-aarch64-[% c('var/torbrowser_version') %].$archive_ext"
fi
[% ELSE -%]
geckodriver="$rootdir/[% c('input_files_by_name/firefox') %]/geckodriver.$archive_ext"
if [[ -f "$geckodriver" ]]; then
cp "$geckodriver" "$OUTDIR/geckodriver-[% c('var/osname') %]-[% c('var/torbrowser_version') %].$archive_ext"
fi
[% END -%]
[%IF c("var/tor-browser") -%]
tor_expert_bundle_src="[% c("input_files_by_name/tor-expert-bundle") %]"
# strip off trailing "$buildid.tar.gz"
......
......
......@@ -201,9 +201,6 @@ echo "Starting ./mach build $(date)"
[% END -%]
[% IF c("var/linux") -%]
[% IF c("var/linux-x86_64") && !c("var/asan") -%]
cp obj-*/x86_64-unknown-linux-gnu/release/geckodriver $distdir
[% END -%]
cp -a obj-*/dist/[% c('var/exe_name') %]/* $distdir/Browser/
mkdir -p $distdir/Debug
# Some include files are symlinks, so use -Lr, or the tarball will fail
......@@ -237,6 +234,8 @@ RBM_TB_EOF
popd
[% END -%]
cp -L obj-*/dist/bin/geckodriver* $distdir
[% IF c("var/updater_enabled") -%]
# Make MAR-based update tools available for use during the bundle phase.
# Note that mar and mbsdiff are standalone tools, compiled for the build
......@@ -279,10 +278,6 @@ RBM_TB_EOF
cd $distdir
[% IF c("var/linux") -%]
[% IF c("var/linux-x86_64") && !c("var/asan") -%]
# No need for an unstripped geckodriver
strip geckodriver
[% END -%]
mkdir -p $distdir/Debug/Browser
# Strip and generate debuginfo for the firefox binary that we keep, all *.so
# files, the plugin-container, and the updater (see ticket #10126)
......@@ -335,17 +330,12 @@ echo "Starting to package artifacts $(date)"
tar_args => '-caf ' _ dest_dir _ '/' _ c('filename') _ '/browser.tar.' _ c('compress_tar'),
}) %]
# Debug symbols
[% IF c("var/linux") -%]
[% c('tar', {
tar_src => [ 'Debug' ],
tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/browser-debug-symbols.tar.xz',
}) %]
[% IF c("var/linux-x86_64") && !c("var/asan") -%]
[% c('tar', {
tar_src => [ 'geckodriver' ],
tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/geckodriver.tar.xz',
}) %]
[% END -%]
[% ELSIF c("var/windows") -%]
[% c('zip', {
zip_src => [ 'Debug' ],
......@@ -353,6 +343,21 @@ echo "Starting to package artifacts $(date)"
}) %]
[% END -%]
# Geckodriver
llvm-strip geckodriver*
[% IF c("var/windows") -%]
[% c('zip', {
zip_src => [ 'geckodriver.exe' ],
zip_args => dest_dir _ '/' _ c('filename') _ '/geckodriver.zip',
}) %]
[% ELSE -%]
[% c('tar', {
tar_src => [ 'geckodriver' ],
tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/geckodriver.tar.xz',
}) %]
[% END -%]
# MAR tools
[% IF c("var/updater_enabled") -%]
[% c('zip', {
zip_src => [ 'mar-tools' ],
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment