Merge branch 'master' of gitlab.com:librewolf-community/browser/windows

This commit is contained in:
Bert van der Weerd 2021-05-03 09:30:29 +02:00
commit 74dcc11d58
No known key found for this signature in database
GPG key ID: 4CFABB96ADE0F5B1
2 changed files with 8 additions and 154 deletions

View file

@ -25,63 +25,17 @@ cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete
cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico
# create the final zip/exe artifacts # create the final zip/exe artifacts
if [ ! -z $permissive ]; then
# patch to permissive config rm -f librewolf-$pkgver.en-US.$ospkg.zip
pushd librewolf zip -qr9 librewolf-$pkgver.en-US.$ospkg.zip librewolf
echo "Applying permissive patches..." if [ $? -ne 0 ]; then exit 1; fi
cp -v ../settings/librewolf.cfg . && cp -v ../settings/distribution/policies.json distribution
patch -p1 -i ../patches/permissive/librewolf-config.patch
patch -p1 -i ../patches/permissive/librewolf-policies.patch
popd
# create the final zip artifact # now to try to make the installer
rm -f librewolf-$pkgver.en-US.$ospkg-permissive.zip rm -f librewolf-$pkgver.en-US.win64-setup.exe tmp.nsi
zip -qr9 librewolf-$pkgver.en-US.$ospkg-permissive.zip librewolf sed "s/pkg_version/$pkgver/g" < artifacts_win.nsi > tmp.nsi
if [ $? -ne 0 ]; then exit 1; fi makensis-3.01.exe -V1 tmp.nsi
if [ $? -ne 0 ]; then exit 1; fi
# now to try to make the installer
rm -f librewolf-$pkgver.en-US.win64-permissive-setup.exe tmp.nsi tmp-permissive.nsi
sed "s/pkg_version/$pkgver/g" < artifacts_win.nsi > tmp.nsi
sed "s/win64-setup/win64-permissive-setup/g" < tmp.nsi > tmp-permissive.nsi
makensis-3.01.exe -V1 tmp-permissive.nsi
if [ $? -ne 0 ]; then exit 1; fi
elif [ ! -z $strict ]; then
# patch to strict config
pushd librewolf
echo "Applying strict config..."
cp -v ../settings/librewolf.cfg . && cp -v ../settings/distribution/policies.json distribution
patch -p1 -i ../patches/strict/librewolf-config.patch
patch -p1 -i ../patches/strict/librewolf-policies.patch
popd
# create the final zip artifact
rm -f librewolf-$pkgver.en-US.$ospkg-strict.zip
zip -qr9 librewolf-$pkgver.en-US.$ospkg-strict.zip librewolf
if [ $? -ne 0 ]; then exit 1; fi
# now to try to make the installer
rm -f librewolf-$pkgver.en-US.win64-strict-setup.exe tmp.nsi tmp-strict.nsi
sed "s/pkg_version/$pkgver/g" < artifacts_win.nsi > tmp.nsi
sed "s/win64-setup/win64-strict-setup/g" < tmp.nsi > tmp-strict.nsi
makensis-3.01.exe -V1 tmp-strict.nsi
if [ $? -ne 0 ]; then exit 1; fi
else
rm -f librewolf-$pkgver.en-US.$ospkg.zip
zip -qr9 librewolf-$pkgver.en-US.$ospkg.zip librewolf
if [ $? -ne 0 ]; then exit 1; fi
# now to try to make the installer
rm -f librewolf-$pkgver.en-US.win64-setup.exe tmp.nsi
sed "s/pkg_version/$pkgver/g" < artifacts_win.nsi > tmp.nsi
makensis-3.01.exe -V1 tmp.nsi
if [ $? -ne 0 ]; then exit 1; fi
fi
popd popd
} }
@ -129,24 +83,6 @@ if [ $? -ne 0 ]; then exit 1; fi
# now to try to make the installer # now to try to make the installer
# (create a .deb here) # (create a .deb here)
# patch to permissive config
if [ ! -z $permissive ]; then
pushd librewolf
echo "Applying permissive patches..."
cp -v ../settings/librewolf.cfg . && cp -v ../settings/distribution/policies.json distribution
patch -p1 -i ../patches/permissive/librewolf-config.patch
patch -p1 -i ../patches/permissive/librewolf-policies.patch
popd
# create the final zip artifact
rm -f librewolf-$pkgver.en-US.$ospkg-permissive.zip
zip -qr9 librewolf-$pkgver.en-US.$ospkg-permissive.zip librewolf
if [ $? -ne 0 ]; then exit 1; fi
# now to try to make the installer
# (create a .deb here)
fi
popd popd
} }
@ -187,7 +123,6 @@ cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete
# linux: copy app icon stuff # linux: copy app icon stuff
cp files/register-librewolf files/start-librewolf files/start-librewolf.desktop.in librewolf cp files/register-librewolf files/start-librewolf files/start-librewolf.desktop.in librewolf
# create the final zip artifact # create the final zip artifact
rm -f librewolf-$pkgver.en-US.$ospkg.zip rm -f librewolf-$pkgver.en-US.$ospkg.zip
zip -qr9 librewolf-$pkgver.en-US.$ospkg.zip librewolf zip -qr9 librewolf-$pkgver.en-US.$ospkg.zip librewolf
@ -196,28 +131,8 @@ if [ $? -ne 0 ]; then exit 1; fi
# now to try to make the installer # now to try to make the installer
# (create a .deb here) # (create a .deb here)
# patch to permissive config
if [ ! -z $permissive ]; then
pushd librewolf
echo "Applying permissive patches..."
cp -v ../settings/librewolf.cfg . && cp -v ../settings/distribution/policies.json distribution
patch -p1 -i ../patches/permissive/librewolf-config.patch
patch -p1 -i ../patches/permissive/librewolf-policies.patch
popd
# create the final zip artifact
rm -f librewolf-$pkgver.en-US.$ospkg-permissive.zip
zip -qr9 librewolf-$pkgver.en-US.$ospkg-permissive.zip librewolf
if [ $? -ne 0 ]; then exit 1; fi
# now to try to make the installer
# (create a .deb here)
fi
popd popd
} }

View file

@ -305,31 +305,6 @@ git_init() {
echo "git_init: done." echo "git_init: done."
} }
# Permissive/strict configuration options (win10 only at the moment)
# this stuff should probably go away..
perm_config_diff() {
pushd settings > /dev/null
cp "/c/Program Files/LibreWolf/librewolf.cfg" librewolf.cfg
if [ $? -ne 0 ]; then exit 1; fi
git diff librewolf.cfg > ../patches/permissive/librewolf-config.patch
git diff librewolf.cfg
git checkout librewolf.cfg > /dev/null 2>&1
popd > /dev/null
}
perm_policies_diff() {
pushd settings/distribution > /dev/null
cp "/c/Program Files/LibreWolf/distribution/policies.json" policies.json
if [ $? -ne 0 ]; then exit 1; fi
git diff policies.json > ../../patches/permissive/librewolf-policies.patch
git diff policies.json
git checkout policies.json > /dev/null 2>&1
popd > /dev/null
}
# #
# Nightly builds, alternative builds. # Nightly builds, alternative builds.
# #
@ -465,17 +440,6 @@ if [[ "$*" == *reset_tor_browser* ]]; then
done_something=1 done_something=1
fi fi
# permissive & strict modes.
if [[ "$*" == *set_perm* ]]; then
permissive=permissive
fi
if [[ "$*" == *set_permissive* ]]; then
permissive=permissive
fi
if [[ "$*" == *set_strict* ]]; then
strict=strict
fi
@ -560,18 +524,6 @@ if [[ "$*" == *artifacts_rpm* ]]; then
done_something=1 done_something=1
fi fi
# librewolf.cfg and policies.json differences
if [[ "$*" == *perm_config_diff* ]]; then
perm_config_diff
done_something=1
fi
if [[ "$*" == *perm_policies_diff* ]]; then
perm_policies_diff
done_something=1
fi
# by default, give help.. # by default, give help..
if (( done_something == 0 )); then if (( done_something == 0 )); then
cat << EOF cat << EOF
@ -605,19 +557,6 @@ Use: ./build.sh clean | all | [other stuff...]
git_subs - update git submodules. git_subs - update git submodules.
git_init - create .git folder in firefox-87.0 for creating patches. git_init - create .git folder in firefox-87.0 for creating patches.
# Strict/permissive config:
set_perm - produce permissive artifacts.
set_strict - produce strict mode build/artifacts
perm_config_diff - diff between -release and -permissive config
perm_policies_diff - diff between -release and -permissive policies.json
The *_diff commands are dangerous (change repo files), win10 specific, and
just for internal use. You can use './build set_perm all' to build permissve
and './build set_strict all' for -strict. This functionality exists because
we're constantly balancing settings between usability and security.
# Cross-compile from linux: (in development) # Cross-compile from linux: (in development)
linux_patches - the 'do_patches' for linux->win crosscompile. linux_patches - the 'do_patches' for linux->win crosscompile.