chore: Update alpha-build.sh script to handle xvfb-run not found and enable LTO only when not cross-compiling

- Add conditional check for xvfb-run command availability
- Enable LTO (Link Time Optimization) only when not cross-compiling

Related recent commits:
- Update Zen Browser styles for dark mode compatibility
- Update Windows mozconfig and ZenWorkspaces.mjs
This commit is contained in:
Mauro Balades
2024-07-20 00:32:39 +02:00
parent 528e020176
commit dddccee707
3 changed files with 33 additions and 4 deletions

View File

@@ -1,12 +1,20 @@
export ZEN_RELEASE=1
# Check if xfvb is installed
if ! command -v xvfb-run &> /dev/null
if command -v apt-get &> /dev/null
then
echo "xvfb-run could not be found, running without it"
sudo apt-get update
sudo apt-get install -y xvfb
fi
# Check if xfvb is installed
if ! command -v Xvfb &> /dev/null
then
echo "Xvfb could not be found, running without it"
pnpm build
else
Xvfb :2 -screen 0 1024x768x24 &
export LLVM_PROFDATA=$HOME/.mozbuild/clang/bin/llvm-profdata
export DISPLAY=:2
xvfb-run -s "-screen 0 1920x1080x24 -nolisten local" pnpm build
fi
pnpm build