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

Bug 40745: Allow customizing MOZ_APP_BASENAME

MOZ_APP_BASENAME has direct effects on directory and file names, too.
So, we need to adjust the firefox project to use the custom names.
parent 49221734
Branches
Tags
1 merge request!631Bug 40742: Add Privacy Browser targets
......@@ -94,8 +94,8 @@ fi
print_usage () {
printf "\n[% c('var/Project_Name') %] Script Options\n"
printf " --verbose Display Tor and Firefox output in the terminal\n"
printf " --log [file] Record Tor and Firefox output in file (default: [% c('var/project-name') %].log)\n"
printf " --verbose Display [% IF c("var/tor-browser") -%]Tor and [% END -%]the browser output in the terminal\n"
printf " --log [file] Record [% IF c("var/tor-browser") -%]Tor and [% END -%]the browser output in file (default: [% c('var/project-name') %].log)\n"
printf " --detach Detach from terminal and run [% c('var/Project_Name') %] in the background.\n"
printf " --register-app Register [% c('var/Project_Name') %] as a desktop app for this user\n"
printf " --unregister-app Unregister [% c('var/Project_Name') %] as a desktop app for this user\n"
......@@ -356,22 +356,22 @@ cd "${HOME}"
if [ "$show_usage" -eq 1 ]; then
# Display Firefox help, then our help
[% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \
[% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] \
--class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" --help 2>/dev/null
print_usage
elif [ "$detach" -eq 1 ] ; then
[% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \
[% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] \
--class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" > "$logfile" 2>&1 </dev/null &
disown "$!"
elif [ "$log_output" -eq 1 -a "$show_output" -eq 1 ]; then
[% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \
[% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] \
--class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" 2>&1 </dev/null | \
tee "$logfile"
elif [ "$show_output" -eq 1 ]; then
[% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \
[% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] \
--class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" < /dev/null
else
[% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./firefox \
[% IF c("var/tor-browser") %]TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD}[% END %] ./[% c('var/exe_name') %] \
--class "[% c('var/Project_Name') %]" --name "[% c('var/Project_Name') %]" "${@}" > "$logfile" 2>&1 </dev/null
fi
......
......@@ -190,12 +190,12 @@ export LANG=C.UTF-8
[% END %]
[% IF c("var/macos") %]
cp -a obj-*/dist/firefox/* $distdir
cp -a obj-*/dist/[% c('var/exe_name') %]/* $distdir
[% IF c("var/base-browser") -%]
mv "$distdir/Firefox.app" "$distdir/[% c('var/Project_Name') %].app"
[% END -%]
# Remove firefox-bin (we don't use it, see ticket #10126)
rm -f "$distdir/[% c('var/Project_Name') %].app/Contents/MacOS/firefox-bin"
rm -f "$distdir/[% c('var/Project_Name') %].app/Contents/MacOS/[% c('var/exe_name') %]-bin"
# Adjust the Info.plist file
INFO_PLIST="$distdir/[% c('var/Project_Name') %].app/Contents/Info.plist"
......@@ -208,21 +208,23 @@ export LANG=C.UTF-8
[% IF c("var/linux-x86_64") && !c("var/asan") %]
cp obj-*/testing/geckodriver/x86_64-unknown-linux-gnu/release/geckodriver $distdir
[% END %]
cp -a obj-*/dist/firefox/* $distdir/Browser/
cp -a obj-*/dist/[% c('var/exe_name') %]/* $distdir/Browser/
# Remove firefox-bin (we don't use it, see ticket #10126)
rm -f $distdir/Browser/firefox-bin
rm -f "$distdir/Browser/[% c('var/exe_name') %]-bin"
# TODO: There goes FIPS-140.. We could upload these somewhere unique and
# subsequent builds could test to see if they've been uploaded before...
# But let's find out if it actually matters first..
rm -f $distdir/Browser/*.chk
# Replace firefox by a wrapper script (#25485)
mv $distdir/Browser/firefox $distdir/Browser/firefox.real
mv $rootdir/start-firefox $distdir/Browser/firefox
chmod 755 $distdir/Browser/firefox
# Replace $exe_name by a wrapper script (#25485)
mv "$distdir/Browser/[% c('var/exe_name') %]" "$distdir/Browser/[% c('var/exe_name') %].real"
cat > "$distdir/Browser/[% c('var/exe_name') %]" << 'RBM_TB_EOF'
[% INCLUDE 'start-firefox' -%]
RBM_TB_EOF
chmod 755 "$distdir/Browser/[% c('var/exe_name') %]"
[% END %]
[% IF c("var/windows") %]
cp -a obj-*/dist/firefox/* $distdir/Browser/
cp -a obj-*/dist/[% c('var/exe_name') %]/* $distdir/Browser/
[% IF c("var/windows-i686") %]
cp -a /var/tmp/dist/fxc2/bin/d3dcompiler_47_32.dll $distdir/Browser/d3dcompiler_47.dll
[% ELSE %]
......@@ -281,7 +283,7 @@ cd $distdir
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)
for LIB in Browser/*.so Browser/firefox.real Browser/plugin-container Browser/updater
for LIB in Browser/*.so "Browser/[% c('var/exe_name') %].real" Browser/plugin-container Browser/updater
do
objcopy --only-keep-debug $LIB Debug/$LIB
strip $LIB
......@@ -311,6 +313,16 @@ END;
[% IF c("var/linux") %]
/var/tmp/dist/gcc/bin/g++ $rootdir/abicheck.cc -o Browser/abicheck -std=c++17
[% IF !c("var/torbrowser") %]
libdest=Browser/libstdc++
mkdir -p "$libdest"
# FIXME: tor-browser-build#40749
cp /var/tmp/dist/gcc/[% c("var/libdir") %]/libstdc++.so.* "$libdest"
[% IF c("var/asan") -%]
cp /var/tmp/dist/gcc/[% c("var/libdir") %]/libasan.so.* "$libdest"
cp /var/tmp/dist/gcc/[% c("var/libdir") %]/libubsan.so.* "$libdest"
[% END -%]
[% END %]
[% END %]
[% c('tar', {
......
......@@ -92,6 +92,7 @@ targets:
- libasound2-dev
# To support Wayland mode
- libdrm-dev
libdir: lib64
linux-i686:
var:
......@@ -111,6 +112,7 @@ targets:
- libasound2-dev:i386
# To support Wayland mode
- libdrm-dev:i386
libdir: lib32
macos:
var:
......@@ -175,8 +177,6 @@ input_files:
- torbrowser-windows-x86_64
- filename: abicheck.cc
enable: '[% c("var/linux") %]'
- filename: start-firefox
enable: '[% c("var/linux") %]'
- project: translation
name: translation-base-browser
pkg_type: base-browser
......
......@@ -15,9 +15,11 @@ add_LD_LIBRARY_PATH() {
# that instead of the bundled version.
"$basedir/abicheck" >/dev/null 2>&1
if [ $? -ne 0 ]; then
add_LD_LIBRARY_PATH "$basedir/TorBrowser/Tor/libstdc++/"
add_LD_LIBRARY_PATH "$basedir/[% IF c("var/tor-browser") -%]TorBrowser/Tor/[% END -%]libstdc++/"
fi
[% IF c("var/tor-browser") -%]
add_LD_LIBRARY_PATH "$basedir/TorBrowser/Tor/"
[% END -%]
export LD_LIBRARY_PATH
exec "$basedir/firefox.real" "$@"
exec "$basedir/[% c("var/exe_name") %].real" "$@"
......@@ -94,6 +94,7 @@ var:
[% SET step = c("step") -%]
[% c(step, { filename => 'f', output_dir => '/out', norec => {} }) %]
exe_name: firefox
locale_ja: ja
locales:
- ar
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment