From 14aecdc3476128de0ec7e72f628628f45102a502 Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Sat, 3 Apr 2021 12:37:17 +0200 Subject: [PATCH] moved artifacts_* to artifacts_all --- artifacts_all.sh | 200 +++++++++++++++++++++++++++++++++++++++++++++++ artifacts_deb.sh | 54 ------------- artifacts_rpm.sh | 55 ------------- artifacts_win.sh | 60 -------------- build.sh | 8 +- 5 files changed, 204 insertions(+), 173 deletions(-) create mode 100644 artifacts_all.sh delete mode 100644 artifacts_deb.sh delete mode 100644 artifacts_rpm.sh delete mode 100644 artifacts_win.sh diff --git a/artifacts_all.sh b/artifacts_all.sh new file mode 100644 index 0000000..59ff3d4 --- /dev/null +++ b/artifacts_all.sh @@ -0,0 +1,200 @@ +function artifacts_win_details(){ +exe=.exe +objdir=obj-x86_64-pc-mingw32/dist/firefox +ospkg=win64 + +# sanity checks +if [ ! -d $objdir ]; then + echo "artifacts_win.sh: directory $objdir not found. did you run './build.sh build'?" + exit 1; +fi + +rm -rf ../firefox ../librewolf +cp -r $objdir .. + +pushd .. + +mv firefox librewolf +# apply the LibreWolf settings +cp -rv settings/* librewolf +# rename the executable manually +pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd +# clean garbage files +cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files ; cd .. + +# windows: copy the windows icon +cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico + +# create the final zip artifact +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 + +# patch to permissive config +if [ ! -z $permissive ]; then + pushd librewolf + echo "Applying permissive patches..." + patch -p1 -i ../patches/permissive/librewolf-config.patch + if [ $? -ne 0 ]; then exit 1; fi + patch -p1 -i ../patches/permissive/librewolf-policies.patch + if [ $? -ne 0 ]; then exit 1; fi + 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 + rm -f librewolf-$pkgver.en-US.win64-permissive-setup.exe tmp-permissive.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 +fi + +popd +} + + + + + + + + + +function artifacts_deb_details(){ +exe= +objdir=obj-x86_64-pc-linux-gnu/dist/firefox +ospkg=deb + +# sanity checks +if [ ! -d $objdir ]; then + echo "artifacts_win.sh: directory $objdir not found. did you run './build.sh build'?" + exit 1; +fi + +rm -rf ../firefox ../librewolf +cp -r $objdir .. + +pushd .. + +mv firefox librewolf +# apply the LibreWolf settings +cp -rv settings/* librewolf +# rename the executable manually +pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd +# clean garbage files +cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files ; cd .. + +# linux: copy app icon stuff +cp branding_files/register-librewolf branding_files/start-librewolf branding_files/start-librewolf.desktop.in librewolf + +# create the final zip artifact +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 +# (create a .deb here) + +# patch to permissive config +if [ ! -z $permissive ]; then + pushd librewolf + echo "Applying permissive patches..." + patch -p1 -i ../patches/permissive/librewolf-config.patch + if [ $? -ne 0 ]; then exit 1; fi + patch -p1 -i ../patches/permissive/librewolf-policies.patch + if [ $? -ne 0 ]; then exit 1; fi + 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 +} + + + + + + + + + + + +function artifacts_rpm_details(){ +exe= +objdir=obj-x86_64-pc-linux-gnu/dist/firefox +ospkg=rpm + +# sanity checks +if [ ! -d $objdir ]; then + echo "artifacts_win.sh: directory $objdir not found. did you run './build.sh build'?" + exit 1; +fi + +rm -rf ../firefox ../librewolf +cp -r $objdir .. + +pushd .. + +mv firefox librewolf +# apply the LibreWolf settings +cp -rv settings/* librewolf +# rename the executable manually +pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd +# clean garbage files +cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files ; cd .. + +# linux: copy app icon stuff +cp branding_files/register-librewolf branding_files/start-librewolf branding_files/start-librewolf.desktop.in librewolf + + +# create the final zip artifact +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 +# (create a .deb here) + +# patch to permissive config +if [ ! -z $permissive ]; then + pushd librewolf + echo "Applying permissive patches..." + patch -p1 -i ../patches/permissive/librewolf-config.patch + if [ $? -ne 0 ]; then exit 1; fi + patch -p1 -i ../patches/permissive/librewolf-policies.patch + if [ $? -ne 0 ]; then exit 1; fi + 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 +} + + + + + diff --git a/artifacts_deb.sh b/artifacts_deb.sh deleted file mode 100644 index b4443fd..0000000 --- a/artifacts_deb.sh +++ /dev/null @@ -1,54 +0,0 @@ -exe= -objdir=obj-x86_64-pc-linux-gnu/dist/firefox -ospkg=deb - -# sanity checks -if [ ! -d $objdir ]; then - echo "artifacts_win.sh: directory $objdir not found. did you run './build.sh build'?" - exit 1; -fi - -rm -rf ../firefox ../librewolf -cp -r $objdir .. - -pushd .. - -mv firefox librewolf -# apply the LibreWolf settings -cp -rv settings/* librewolf -# rename the executable manually -pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd -# clean garbage files -cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files ; cd .. - -# linux: copy app icon stuff -cp branding_files/register-librewolf branding_files/start-librewolf branding_files/start-librewolf.desktop.in librewolf - -# create the final zip artifact -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 -# (create a .deb here) - -# patch to permissive config -if [ ! -z $permissive ]; then - pushd librewolf - echo "Applying permissive patches..." - patch -p1 -i ../patches/permissive/librewolf-config.patch - if [ $? -ne 0 ]; then exit 1; fi - patch -p1 -i ../patches/permissive/librewolf-policies.patch - if [ $? -ne 0 ]; then exit 1; fi - 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 diff --git a/artifacts_rpm.sh b/artifacts_rpm.sh deleted file mode 100644 index 3f72d97..0000000 --- a/artifacts_rpm.sh +++ /dev/null @@ -1,55 +0,0 @@ -exe= -objdir=obj-x86_64-pc-linux-gnu/dist/firefox -ospkg=rpm - -# sanity checks -if [ ! -d $objdir ]; then - echo "artifacts_win.sh: directory $objdir not found. did you run './build.sh build'?" - exit 1; -fi - -rm -rf ../firefox ../librewolf -cp -r $objdir .. - -pushd .. - -mv firefox librewolf -# apply the LibreWolf settings -cp -rv settings/* librewolf -# rename the executable manually -pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd -# clean garbage files -cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files ; cd .. - -# linux: copy app icon stuff -cp branding_files/register-librewolf branding_files/start-librewolf branding_files/start-librewolf.desktop.in librewolf - - -# create the final zip artifact -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 -# (create a .deb here) - -# patch to permissive config -if [ ! -z $permissive ]; then - pushd librewolf - echo "Applying permissive patches..." - patch -p1 -i ../patches/permissive/librewolf-config.patch - if [ $? -ne 0 ]; then exit 1; fi - patch -p1 -i ../patches/permissive/librewolf-policies.patch - if [ $? -ne 0 ]; then exit 1; fi - 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 diff --git a/artifacts_win.sh b/artifacts_win.sh deleted file mode 100644 index 802de48..0000000 --- a/artifacts_win.sh +++ /dev/null @@ -1,60 +0,0 @@ -exe=.exe -objdir=obj-x86_64-pc-mingw32/dist/firefox -ospkg=win64 - -# sanity checks -if [ ! -d $objdir ]; then - echo "artifacts_win.sh: directory $objdir not found. did you run './build.sh build'?" - exit 1; -fi - -rm -rf ../firefox ../librewolf -cp -r $objdir .. - -pushd .. - -mv firefox librewolf -# apply the LibreWolf settings -cp -rv settings/* librewolf -# rename the executable manually -pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd -# clean garbage files -cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files ; cd .. - -# windows: copy the windows icon -cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico - -# create the final zip artifact -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 - -# patch to permissive config -if [ ! -z $permissive ]; then - pushd librewolf - echo "Applying permissive patches..." - patch -p1 -i ../patches/permissive/librewolf-config.patch - if [ $? -ne 0 ]; then exit 1; fi - patch -p1 -i ../patches/permissive/librewolf-policies.patch - if [ $? -ne 0 ]; then exit 1; fi - 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 - rm -f librewolf-$pkgver.en-US.win64-permissive-setup.exe tmp-permissive.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 -fi - -popd diff --git a/build.sh b/build.sh index 3170b43..380eacc 100755 --- a/build.sh +++ b/build.sh @@ -153,7 +153,7 @@ build() { } - +. ./artifacts_all.sh artifacts_win() { echo "artifacts_win: begin." @@ -167,7 +167,7 @@ artifacts_win() { echo "artifacts_win: Creating final artifacts." echo "" - . ../artifacts_win.sh + artifacts_win_details cd .. echo "artifacts_win: done." @@ -186,7 +186,7 @@ artifacts_deb() echo "artifacts_deb: Creating final artifacts." echo "" - . ../artifacts_deb.sh + artifacts_deb_details cd .. echo "artifacts_deb: done." @@ -206,7 +206,7 @@ artifacts_rpm() echo "artifacts_rpm: Creating final artifacts." echo "" - . ../artifacts_rpm.sh + artifacts_rpm_details cd .. echo "artifacts_rpm: done."