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