Fixing branding issues related to themes

This commit is contained in:
Bert van der Weerd 2021-03-01 12:59:56 +01:00
parent d53b3c8381
commit 8a27c67a1a
No known key found for this signature in database
GPG key ID: 4CFABB96ADE0F5B1
2 changed files with 42 additions and 53 deletions

View file

@ -69,8 +69,8 @@ ac_add_options --enable-optimize
# Branding
ac_add_options --enable-update-channel=release
ac_add_options --with-app-name=${pkgname}
ac_add_options --with-app-basename=${_pkgname}
# suspect: ac_add_options --with-app-name=${pkgname}
# suspect: ac_add_options --with-app-basename=${_pkgname}
ac_add_options --with-branding=browser/branding/${pkgname}
ac_add_options --with-distribution-id=io.gitlab.${pkgname}-community
ac_add_options --with-unsigned-addon-scopes=app,system
@ -147,7 +147,7 @@ END
# just a straight copy for now..
cp ../mozconfig .
cd ..
echo "do_patches: done."
}
@ -168,31 +168,21 @@ build() {
package() {
echo "package: begin."
artifacts() {
echo "artifacts: begin."
if [ ! -d firefox-$pkgver ]; then exit 1; fi
cd firefox-$pkgver
./mach package
if [ $? -ne 0 ]; then exit 1; fi
cd ..
echo "package: done."
}
installer_win() {
echo "installer_win: begin."
if [ ! -d firefox-$pkgver ]; then exit 1; fi
cd firefox-$pkgver
# there is just too much garbage in this installer function to
# have it all here..
. ../installer_win.sh
cd ..
echo "installer_win: done."
echo "artifacts: done."
}
@ -226,12 +216,8 @@ if [[ "$*" == *build* ]]; then
build
done_something=1
fi
if [[ "$*" == *package* ]]; then
package
done_something=1
fi
if [[ "$*" == *installer_win* ]]; then
installer_win
if [[ "$*" == *artifacts* ]]; then
artifacts
done_something=1
fi
@ -240,12 +226,11 @@ if (( done_something == 0 )); then
cat <<EOF
Use: ./build.sh fetch extract do_patches build package installer_win
fetch - fetch the tarball
extract - extract the tarball
do_patches - create a mozconfig, and patch the source
build - the actual build, takes about an hour for me.
package - this builds the dist zip file we need.
installer_win - build the windows NSIS setup.exe installer.
fetch - fetch the tarball.
extract - extract the tarball.
do_patches - create a mozconfig, and patch the source.
build - the actual build.
artifacts - build the .zip and NSIS setup.exe installer.
If no parameters are given, it prints this help message.

View file

@ -1,29 +1,38 @@
# sanity checks
if [ ! -d obj-x86_64-pc-mingw32/dist ]; then exit 1; fi
if [ ! -d obj-x86_64-pc-mingw32/dist/firefox ]; then
echo "installer_win.sh: directory obj-x86_64-pc-mingw32/dist/firefox not found."
exit 1;
fi
rm -rf ../firefox ../librewolf
cp -r obj-x86_64-pc-mingw32/dist/firefox ..
pushd ..
mv firefox librewolf
# apply the LibreWolf settings
cp -rv ../settings/* obj-x86_64-pc-mingw32/dist/librewolf
cp -rv settings/* librewolf
# rename the executable manually
cd librewolf ; mv -v firefox.exe librewolf.exe ; cd ..
# recreate the zip file..
cd obj-x86_64-pc-mingw32/dist
# clean garbage files
rm -vrf librewolf/uninstall librewolf/maintenanceservice* librewolf/pingsender.exe
# be sure to remove the previous zip file..
rm -vf librewolf-$pkgver.en-US.win64.txt librewolf-$pkgver.en-US.win64.zip
zip -r9 librewolf-$pkgver.en-US.win64.zip librewolf
if [ $? -ne 0 ]; then exit 1; fi
sha256sum.exe librewolf-$pkgver.en-US.win64.zip > librewolf-$pkgver.en-US.win64.zip.sha256sum
if [ $? -ne 0 ]; then exit 1; fi
# copy the resulting zip file
rm -vf ../../../librewolf-$pkgver.en-US.win64.zip*
cp -v librewolf-$pkgver.en-US.win64.zip* ../../..
cd ../..
# clean garbage files
cd librewolf ; rm -rf maintenanceservice* pingsender.exe firefox.*.xml precomplete removed-files ; cd ..
# be sure to remove the previous zip file..
rm -f librewolf-$pkgver.en-US.win64.zip*
zip -r9 librewolf-$pkgver.en-US.win64.zip librewolf
if [ $? -ne 0 ]; then exit 1; fi
sha256sum.exe librewolf-$pkgver.en-US.win64.zip > librewolf-$pkgver.en-US.win64.zip.sha256sum
if [ $? -ne 0 ]; then exit 1; fi
# generate the .nsi intaller file.
cat >../installer_win.nsi <<END
cat >installer_win.nsi <<END
#
# Change these values to fit your application...
#
@ -108,18 +117,13 @@ sectionEnd
END
# now to try to make the installer.
pushd ..
rm -vrf librewolf
unzip librewolf-$pkgver.en-US.win64.zip
if [ $? -ne 0 ]; then exit 1; fi
cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico
makensis-3.01.exe installer_win.nsi
if [ $? -ne 0 ]; then exit 1; fi
sha256sum.exe librewolf-$pkgver.en-US.win64-setup.exe > librewolf-$pkgver.en-US.win64-setup.exe.sha256sum
if [ $? -ne 0 ]; then exit 1; fi
rm -f installer_win.nsi
popd