changes
This commit is contained in:
parent
bfa26d40de
commit
c998b15387
1 changed files with 53 additions and 28 deletions
65
build.sh
65
build.sh
|
|
@ -5,7 +5,6 @@ pkgname=librewolf
|
|||
_pkgname=LibreWolf
|
||||
|
||||
pkgver=85.0
|
||||
#srcdir=/c/mozilla-source
|
||||
|
||||
|
||||
|
||||
|
|
@ -23,8 +22,6 @@ fetch() {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
prepare() {
|
||||
rm -rf firefox-$pkgver
|
||||
tar xf firefox-$pkgver.source.tar.xz
|
||||
|
|
@ -69,6 +66,7 @@ mk_add_options MOZ_TELEMETRY_REPORTING=0
|
|||
END
|
||||
|
||||
|
||||
|
||||
patch -p1 -i ../remove_addons.patch
|
||||
patch -p1 -i ../megabar.patch
|
||||
patch -p1 -i ../unity-menubar.patch
|
||||
|
|
@ -87,9 +85,16 @@ END
|
|||
_cert_sed+='[[:blank:]]\+return AddonManager\.SIGNEDSTATE_[[:upper:]]\+;\n'
|
||||
_cert_sed+='[[:blank:]]\+}#'
|
||||
_cert_sed+='// NOTE: removed#g'
|
||||
|
||||
# FIXME: on windows: the sed.exe in MozBuild is too old, no -z, using the one from Git instead.
|
||||
# on windows: the sed.exe in MozBuild is too old, no -z, using the one from Git instead.
|
||||
if [ -f '/c/mozilla-build/start-shell.bat' ]; then
|
||||
mysed='/c/mozilla-source/Git/usr/bin/sed.exe'
|
||||
if [ ! -f $mysed ]; then
|
||||
echo 'build.sh: For the build to work, copy "c:\program files\Git" folder into "c:\mozilla-source".'
|
||||
exit
|
||||
fi
|
||||
else
|
||||
$mysed='sed'
|
||||
fi
|
||||
$mysed -z "$_cert_sed" -i toolkit/mozapps/extensions/internal/XPIInstall.jsm
|
||||
|
||||
|
||||
|
|
@ -107,14 +112,15 @@ END
|
|||
|
||||
|
||||
|
||||
|
||||
cp -r ../common/source_files/* ./
|
||||
|
||||
# FIXME: this 'mozconfig' file in the 'common' submodule should be removed
|
||||
# this submodule is purely for the branding. I imagine that we want the
|
||||
# missing_branding_files into the 'common' submodule.
|
||||
# this submodule is purely for the branding.
|
||||
rm -f mozconfig
|
||||
|
||||
# FIX: on windows: the stubinstaller folder is missing from the librewolf branding folder.
|
||||
# FIXME: on windows: the stubinstaller folder is missing from the librewolf branding folder.
|
||||
# this might be a bug in FF however as it seems to take missing branding resources from
|
||||
# the nightly branding. We probably want this stuff merged into the 'common' submodule.
|
||||
cp -r ../missing_branding_files/stubinstaller browser/branding/librewolf
|
||||
|
||||
# just a straight copy for now..
|
||||
|
|
@ -125,10 +131,6 @@ END
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
build() {
|
||||
cd firefox-$pkgver
|
||||
|
||||
|
|
@ -138,13 +140,21 @@ build() {
|
|||
}
|
||||
|
||||
|
||||
|
||||
package() {
|
||||
cd firefox-$pkgver
|
||||
|
||||
./mach package
|
||||
|
||||
cd ..
|
||||
}
|
||||
|
||||
installer_win() {
|
||||
cd firefox-$pkgver
|
||||
|
||||
# apply the LibreWolf settings
|
||||
cp -rv ../settings/* obj-x86_64-pc-mingw32/dist/librewolf
|
||||
|
||||
# recreate the zip file..
|
||||
cd obj-x86_64-pc-mingw32/dist
|
||||
rm -f librewolf-$pkgver.en-US.win64.txt librewolf-$pkgver.en-US.win64.zip
|
||||
|
|
@ -156,15 +166,22 @@ package() {
|
|||
cd ..
|
||||
}
|
||||
|
||||
installer_macos() {
|
||||
cd firefox-$pkgver
|
||||
|
||||
|
||||
# TODO: we want to apply the librewolf settings and make the .dmg file here.
|
||||
echo 'build.sh: installer_macos() Not implemented yet.'
|
||||
cd ..
|
||||
}
|
||||
|
||||
|
||||
|
||||
# windows: change $PATH to find all the build tools in .mozbuild
|
||||
# this might do the trick on macos aswell
|
||||
export TPATH=$HOME/.mozbuild/clang/bin:$HOME/.mozbuild/cbindgen:$HOME/.mozbuild/node:$HOME/.mozbuild/nasm
|
||||
export PATH=$TPATH:$PATH
|
||||
# this might do the trick on macos aswell?
|
||||
if [ -f '/c/mozilla-build/start-shell.bat' ]; then
|
||||
export TPATH=$HOME/.mozbuild/clang/bin:$HOME/.mozbuild/cbindgen:$HOME/.mozbuild/node:$HOME/.mozbuild/nasm
|
||||
export PATH=$TPATH:$PATH
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
|
@ -186,8 +203,16 @@ if [[ "$*" == *package* ]]; then
|
|||
package
|
||||
done_something=1
|
||||
fi
|
||||
|
||||
if (( done_something == 0 )); then
|
||||
echo "Usage: $0 fetch | prepare | build | package"
|
||||
if [[ "$*" == *installer_win* ]]; then
|
||||
installer_win
|
||||
done_something=1
|
||||
fi
|
||||
if [[ "$*" == *installer_macos* ]]; then
|
||||
installer_macos
|
||||
done_something=1
|
||||
fi
|
||||
|
||||
if (( done_something == 0 )); then
|
||||
echo "Usage: $0 fetch | prepare | build | package | installer_win | installer_mac"
|
||||
exit
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue