Split build script and rearrange linux folder

This commit is contained in:
BeatLink 2019-07-17 13:50:38 -05:00
parent d436fcfbb9
commit 62ae8ee967
16 changed files with 272 additions and 201 deletions

View file

@ -0,0 +1,40 @@
#!/bin/sh
APPIMAGE_CONTENT_FOLDER=$1 #$SCRIPT_FOLDER/resources/appimage;
BINARY_TARBALL=$2
OUTPUT_FOLDER=$3
_LIBREWOLF_EXTRACTED_FOLDER=./librewolf;
_LIBREWOLF_FINAL_APPIMAGE=./LibreWolf*.AppImage;
_APPIMAGETOOL_DOWNLOAD_URL=https://github.com/AppImage/AppImageKit/releases/latest/download/appimagetool-x86_64.AppImage;
_APPIMAGETOOL_FILE=./appimagetool;
printf "\n\n------------------------------------ APPIMAGE BUILD -----------------------------------------\n";
printf "APPIMAGE_RESOURCE_FOLDER: $APPIMAGE_CONTENT_FOLDER\n";
# Copy and generate icons
# printf "\nGenerating AppImage Icons\n";
# cp $ICON_FOLDER/icon.svg $APPIMAGE_CONTENT_FOLDER/librewolf.svg;
# ln -rs $APPIMAGE_CONTENT_FOLDER/librewolf.svg $SCRIPT_FOLDER/resources/appimage/.DirIcon;
# Copy appimage resources to main tarball
printf "Copying AppImage resources to binary tarball folder\n";
cp -vrT $APPIMAGE_CONTENT_FOLDER $_LIBREWOLF_EXTRACTED_FOLDER;
# Downloads appimage tool
printf "\nDownloading AppImage Tool\n";
wget $_APPIMAGETOOL_DOWNLOAD_URL -O $_APPIMAGETOOL_FILE;
chmod +x $_APPIMAGETOOL_FILE;
$_APPIMAGETOOL_FILE --appimage-extract;
rm -f $_APPIMAGETOOL_FILE;
# Generate AppImage
printf "\nGenerating AppImage\n";
./squashfs-root/AppRun $_LIBREWOLF_EXTRACTED_FOLDER;
rm -rf ./squashfs-root;
chmod +x $_LIBREWOLF_FINAL_APPIMAGE;
# Move AppImage to build_output folder
printf "\nMoving AppImage to build_output folder\n";
mv $_LIBREWOLF_FINAL_APPIMAGE $OUTPUT_FOLDER;

View file

@ -0,0 +1 @@
librewolf.svg

View file

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="67.733337mm"
height="67.733337mm"
viewBox="0 0 67.733337 67.733337"
version="1.1"
id="svg8"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
sodipodi:docname="LibreWolf.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.9899495"
inkscape:cx="-15.106575"
inkscape:cy="110.91343"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1366"
inkscape:window-height="711"
inkscape:window-x="0"
inkscape:window-y="30"
inkscape:window-maximized="1"
inkscape:showpageshadow="false"
units="px"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-42.106554,-153.8982)">
<circle
style="fill:#00acff;fill-opacity:1;stroke:none;stroke-width:0.53545821;stroke-miterlimit:4;stroke-dasharray:none"
id="path875"
cx="75.973221"
cy="187.76486"
r="33.866669" />
<path
style="fill:#ffffff;stroke-width:0.13229167"
d="m 72.543594,214.67719 c -4.744093,-0.60875 -9.281981,-2.49991 -13.241953,-5.51858 -1.29157,-0.98455 -3.714943,-3.42363 -4.772834,-4.80375 -2.96241,-3.86476 -4.804479,-8.2508 -5.41218,-12.88661 -0.260164,-1.98464 -0.258719,-5.63349 0.0029,-7.44738 1.308078,-9.0677 7.01463,-16.8454 15.20915,-20.72918 3.811512,-1.80647 7.300266,-2.57114 11.730683,-2.57114 7.165903,0 13.5265,2.56749 18.680882,7.54063 2.483054,2.39575 4.148141,4.66808 5.573968,7.60677 1.92868,3.9751 2.70979,7.43276 2.70979,11.99526 0,6.00619 -1.7345,11.24407 -5.336957,16.11672 -1.070527,1.44797 -3.161747,3.64749 -4.549468,4.78507 -3.806562,3.12041 -8.658642,5.23183 -13.473174,5.86296 -1.663528,0.21807 -5.593318,0.24524 -7.120854,0.0492 z m 10.041381,-4.86547 c 2.898391,-0.91366 5.260364,-2.14146 7.540624,-3.91979 1.212494,-0.9456 3.308223,-3.06144 4.186916,-4.22711 2.38328,-3.16162 4.004927,-7.12196 4.482067,-10.94597 0.229814,-1.84182 0.09634,-5.73827 -0.2545,-7.4296 -0.9294,-4.48046 -2.931647,-8.26499 -6.086007,-11.50342 -1.966575,-2.01898 -3.756882,-3.34972 -6.060203,-4.50458 -3.495001,-1.75236 -6.489835,-2.46043 -10.423481,-2.46442 -4.164073,-0.004 -7.815325,0.95024 -11.429055,2.98766 -3.289753,1.85476 -6.690628,5.25952 -8.553227,8.563 -1.371786,2.43299 -2.37583,5.32029 -2.767595,7.95869 -0.256867,1.72991 -0.261933,5.16508 -0.01006,6.82145 0.504067,3.31489 1.761474,6.59111 3.584314,9.33904 0.995409,1.50058 0.964154,1.48393 1.842248,0.98153 1.570774,-0.8987 1.980396,-1.33342 2.836087,-3.00984 1.000624,-1.96036 2.070459,-3.6735 3.037094,-4.86332 1.115822,-1.37347 1.269228,-1.61793 1.828988,-2.9147 0.281654,-0.65249 0.786977,-1.61074 1.122938,-2.12943 l 0.61084,-0.94309 -0.79023,-0.77671 c -1.049647,-1.03168 -1.922751,-2.2016 -2.087012,-2.79651 -0.167761,-0.60758 0.03021,-0.9466 0.818744,-1.40207 0.797354,-0.46057 1.367585,-0.5929 3.498657,-0.81193 1.037629,-0.10665 2.164153,-0.30199 2.518962,-0.43681 0.353024,-0.13414 1.407825,-0.70824 2.344001,-1.27579 2.702947,-1.63863 2.931619,-1.72344 4.552111,-1.68831 1.368686,0.0297 1.371262,0.0291 2.182813,-0.46143 1.700674,-1.02802 4.14305,-2.88289 7.357044,-5.58733 0.61632,-0.5186 1.21002,-0.92569 1.31934,-0.90464 0.45462,0.0876 1.289567,2.13636 1.416407,3.47562 0.07693,0.81225 -0.08023,1.6155 -0.562014,2.87261 -0.13146,0.34301 -0.19208,0.67043 -0.134706,0.7276 0.13774,0.13726 0.610706,-0.4535 0.610706,-0.76279 0,-0.39435 0.261127,-0.43936 0.616327,-0.10623 0.258235,0.24218 0.480842,0.31151 1.000202,0.31151 0.567073,0 0.707447,0.0526 0.928773,0.3479 0.375574,0.50112 0.463647,1.86688 0.176201,2.73231 -0.279641,0.84191 -1.124801,1.81287 -1.891829,2.17341 -0.686334,0.32262 -2.075841,1.67928 -2.726081,2.66164 -0.248906,0.37604 -0.715586,1.15995 -1.037066,1.74204 -0.321487,0.58208 -0.86074,1.46154 -1.19834,1.95436 -0.664294,0.96972 -1.233147,2.3224 -1.782214,4.23798 -0.322553,1.1253 -0.34962,1.41826 -0.362953,3.92797 -0.01613,3.0317 -0.172894,3.77561 -0.9925,4.7091 -0.931805,1.06126 -1.861937,3.39186 -1.940127,4.8613 -0.04935,0.92751 -0.192246,1.83164 -0.395304,2.50122 -0.08942,0.29484 0.07752,0.2914 1.072102,-0.0221 z"
id="path847"
inkscape:connector-curvature="0" />
<path
sodipodi:type="star"
style="fill:#00acff;fill-opacity:1;stroke:none;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"
id="path814"
sodipodi:sides="4"
sodipodi:cx="18.854025"
sodipodi:cy="172.98837"
sodipodi:r1="1.6036172"
sodipodi:r2="1.1339285"
sodipodi:arg1="1.5707963"
sodipodi:arg2="2.3561945"
inkscape:flatsided="true"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 18.854025,174.59199 -1.603617,-1.60362 1.603617,-1.60361 1.603617,1.60361 z"
transform="matrix(0.23203125,0.40188991,-0.99392962,0.57384553,246.21921,73.888081)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.8 KiB

View file

@ -0,0 +1,12 @@
#!/bin/sh
printf "\n\n-------------------------------------- DEPENDENCY INSTALLATION ---------------------------------------------\n";
printf "\nInstalling dependencies\n";
apt update && apt install -y python python3 wget;
wget https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py;
python ./bootstrap.py --application-choice=browser --no-interactive || true
rm -f ./bootstrap.py;
# adds the new rust install to PATH
# printf "\nAdding new rust install to PATH\n";
#. $HOME/.cargo/env;

View file

@ -0,0 +1,9 @@
#!/bin/sh
COMPILE_FOLDER=$1
printf "\n\n--------------------------------- SOURCE CODE DOWNLOAD --------------------------------------\n";
# Clones the firefox source code for compiling
printf "\nCloning Firefox Source Code\n";
hg clone https://hg.mozilla.org/releases/mozilla-release $COMPILE_FOLDER;

View file

@ -0,0 +1,15 @@
#!/bin/sh
SOURCE_CODE_FOLDER=$1
FOLDER_TO_ADD=$2
printf "\n\n------------------------------ FINAL PREBUILD CONFIGURATION ---------------------------------\n";
# Copies our custom source code changes (mostly branding) to the source code
printf "\nCopying custom files to firefox source code\n";
cp -r $FOLDER_TO_ADD/* $SOURCE_CODE_FOLDER/;
# Disables pocket
printf "\nDisabling Pocket\n";
sed -i "s/'pocket'/#'pocket'/g" $SOURCE_CODE_FOLDER/browser/components/moz.build;

View file

@ -0,0 +1,25 @@
#!/bin/sh
SOURCE_FOLDER=$1;
OUTPUT_TARBALL=$2;
printf "\n\n--------------------------------------- BUILD -----------------------------------------------\n";
# Bootstraps librewolf again (using the ./mach script inside the source code)
# printf "\nRunning bootstrapper to install build dependencies (using ./mach script within source code)\n";
# ./mach bootstrap --application-choice=browser --no-interactive;
cd $SOURCE_FOLDER;
printf "\nBuilding LibreWolf\n";
./mach build;
printf "\nPackaging LibreWolf\n";
./mach package;
printf "\nMoving Binary Tarball to output location\n";
mv ./obj*/dist/librewolf*.tar.bz2 $OUTPUT_TARBALL;
printf "\nDeleting the compile_folder\n";
rm -rf ./;

View file

@ -0,0 +1,24 @@
#!/bin/sh
PACKAGE_FILE=$1
SETTINGS_FOLDER_TO_ADD=$2 #$REPOSITORY_FOLDER/settings
LAUNCHER_SCRIPT=$3 #$SCRIPT_FOLDER/resources/launch_librewolf.sh
printf "\n\n--------------------------------- SETTINGS INTEGRATION --------------------------------------\n";
# Extracts the binary tarball
printf "\nExtracting librewolf binary tarball\n";
tar -xvf ./$PACKAGE_FILE;
# Adds the librefox config files to the packaged tarball
printf "\nCopying librewolf settings to extracted binary tarball\n";
cp -r $SETTINGS_FOLDER_TO_ADD ./librewolf/settings;
cp $LAUNCHER_SCRIPT ./librewolf/launch_librewolf.sh
mkdir -p ./librewolf/defaults/pref/;
mkdir -p ./librewolf/distribution/;
# Repacks the binary tarball
printf "\nRecompressing binary tarball\n";
tar -jcvf ./$PACKAGE_FILE librewolf;

View file

@ -1,207 +1,22 @@
#!/bin/bash
#!/bin/sh
printf "\n------------------------------------- SCRIPT SETUP ------------------------------------------\n";
# Prevents build from breaking in CI/CD environments
export SHELL=/bin/bash;
printf "SHELL=$SHELL\n";
#export SHELL=/bin/bash;
#printf "SHELL=$SHELL\n";
# Aborts the script upon any faliure
set -e;
# Sets up internal script variables
printf "\nSetting up script variables\n";
SCRIPT_FOLDER=$(realpath $(dirname $0));
REPOSITORY_FOLDER=$(realpath $SCRIPT_FOLDER/../../);
SOURCE_FOLDER=$REPOSITORY_FOLDER/browser/common/source_files/
BRANDING_FOLDER=$SOURCE_FOLDER/browser/branding/librewolf;
ICON_FOLDER=$REPOSITORY_FOLDER/branding/icon/;
PACKAGE_FILE="librewolf*.tar.bz2";
printf "SCRIPT_FOLDER: $SCRIPT_FOLDER\n";
printf "REPOSITORY_FOLDER: $REPOSITORY_FOLDER\n";
printf "SOURCE_FOLDER: $SOURCE_FOLDER\n";
printf "BRANDING_FOLDER: $BRANDING_FOLDER\n";
printf "ICON_FOLDER: $ICON_FOLDER\n";
printf "PACKAGE_FILE: $PACKAGE_FILE\n";
SCRIPT_FOLDER=$(realpath $(dirname $0)) && printf "SCRIPT_FOLDER: $SCRIPT_FOLDER\n";
REPOSITORY_FOLDER=$(realpath $SCRIPT_FOLDER/../../) && printf "REPOSITORY_FOLDER: $REPOSITORY_FOLDER\n";
SOURCE_FOLDER=$SCRIPT_FOLDER/compile && printf "SOURCE_FOLDER: $SOURCE_FOLDER\n";
SOURCE_CONTENT_FOLDER=$REPOSITORY_FOLDER/browser/common/source_files/ && printf "SOURCE_CONTENT_FOLDER: $SOURCE_CONTENT_FOLDER\n";
BINARY_TARBALL=$SCRIPT_FOLDER/LibreWolf.tar.bz2 && printf "BINARY_TARBALL: $BINARY_TARBALL\n";
printf "\n\n-------------------------------------- PREBUILD ---------------------------------------------\n";
# Installs some needed dependencies
printf "\nInstalling script dependencies\n";
apt update;
apt install gnupg2 -y;
echo 'deb http://ppa.launchpad.net/alexlarsson/flatpak/ubuntu bionic main' >> /etc/apt/source.list;
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FA577F07;
apt update;
apt install python python3 inkscape icnsutils wget flatpak flatpak-builder -y;
# Downloads and runs bootstrapper to install more dependencies.
printf "\nRunning bootstrapper to install build dependencies\n";
wget https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py;
python ./bootstrap.py --application-choice=browser --no-interactive || true
rm -f ./bootstrap.py;
# adds the new rust install to PATH
printf "\nAdding new rust install to PATH\n";
. $HOME/.cargo/env;
printf "\n\n---------------------------------- ICON GENERATION ------------------------------------------\n";
# Generates Icons for branding
printf "\nGenerating icons from $ICON_FOLDER and moving to $BRANDING_FOLDER\n";
# Generates Linux Icons
printf "\nGenerating Linux Icons\n";
inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/default16.png -w 16 -h 16;
inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/default32.png -w 32 -h 32;
inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/default48.png -w 48 -h 48;
inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/default64.png -w 64 -h 64;
inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/default128.png -w 128 -h 128;
# Generates Windows Icons
printf "\nGenerating Windows Icons\n";
inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/VisualElements_70.png -w 70 -h70;
inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/VisualElements_150.png -w 150 -h150;
# Generates Apple Icons
printf "\nGenerating Apple Icons\n";
png2icns $BRANDING_FOLDER/firefox.icns $BRANDING_FOLDER/default128.png;
inkscape -z -f $ICON_FOLDER/document-icon.svg -e $BRANDING_FOLDER/document-icon.png -w 128 -h 128;
png2icns $BRANDING_FOLDER/document.icns $BRANDING_FOLDER/document-icon.png;
rm -r $BRANDING_FOLDER/document-icon.png
printf "\n\n--------------------------------- SOURCE CODE DOWNLOAD --------------------------------------\n";
# Creates and enters the folder where compiling will take place
printf "\nCreating compile folder\n";
mkdir -p compile_folder;
cd compile_folder;
# Clones the firefox source code for compiling
printf "\nCloning Firefox Source Code\n";
hg clone https://hg.mozilla.org/releases/mozilla-release;
cd mozilla-release;
printf "\n\n------------------------------ FINAL PREBUILD CONFIGURATION ---------------------------------\n";
# Copies our branding to the source code, changing it from firefox to librewolf
printf "\nCopying branding to firefox source code\n";
cp -r $SOURCE_FOLDER/* ./;
# Disables pocket
printf "\nDisabling Pocket\n";
sed -i "s/'pocket'/#'pocket'/g" ./browser/components/moz.build;
printf "\n\n--------------------------------------- BUILD -----------------------------------------------\n";
# Bootstraps librewolf again (using the ./mach script inside the source code)
printf "\nRunning bootstrapper to install build dependencies (using ./mach script within source code)\n";
./mach bootstrap --application-choice=browser --no-interactive;
# Builds librewolf
printf "\nBuilding LibreWolf\n";
./mach build;
# Packages LibreWolf
printf "\nPackaging LibreWolf\n";
./mach package;
# moves the packaged tarball to the script folder
printf "\nRelocating binary tarball to script folder\n";
cp ./obj*/dist/librewolf*.tar.bz2 $SCRIPT_FOLDER;
# Remove the compile folder
printf "\nDeleting the compile_folder\n";
cd $SCRIPT_FOLDER;
rm -rf ./compile_folder;
printf "\n\n--------------------------------- SETTINGS INTEGRATION --------------------------------------\n";
# Extracts the binary tarball
printf "\nExtracting librewolf binary tarball\n";
tar -xvf ./$PACKAGE_FILE;
# Adds the librefox config files to the packaged tarball
printf "\nCopying librewolf settings to extracted binary tarball\n";
cp -r $REPOSITORY_FOLDER/settings ./librewolf/settings;
cp $SCRIPT_FOLDER/resources/launch_librewolf.sh ./librewolf/launch_librewolf.sh
mkdir -p $INSTALL_FOLDER/defaults/pref/;
mkdir -p $INSTALL_FOLDER/distribution/;
printf "\n\n--------------------------------- BINARY TARBALL RECREATION --------------------------------------\n";
# Repacks the binary tarball
printf "\nRecompressing binary tarball\n";
tar -jcvf ./$PACKAGE_FILE librewolf;
# Moves the final binary tarball to build_output
printf "\nMoving binary tarball to build_output folder\n";
mv $PACKAGE_FILE $SCRIPT_FOLDER/build_output/;
printf "\n\n------------------------------------ APPIMAGE BUILD -----------------------------------------\n";
APPIMAGE_RESOURCE_FOLDER=$SCRIPT_FOLDER/resources/appimage;
printf "APPIMAGE_RESOURCE_FOLDER: $APPIMAGE_RESOURCE_FOLDER\n";
# Copy and generate icons
printf "\nGenerating AppImage Icons\n";
cp $ICON_FOLDER/icon.svg $APPIMAGE_RESOURCE_FOLDER/librewolf.svg;
ln -rs $APPIMAGE_RESOURCE_FOLDER/librewolf.svg $SCRIPT_FOLDER/resources/appimage/.DirIcon;
# Copy appimage resources to main tarball
printf "Copying AppImage resources to binary tarball folder\n";
cp -vrT $APPIMAGE_RESOURCE_FOLDER ./librewolf;
# Downloads appimage tool
printf "\nDownloading AppImage Tool\n";
wget https://github.com/AppImage/AppImageKit/releases/latest/download/appimagetool-x86_64.AppImage -O appimagetool;
chmod +x ./appimagetool;
./appimagetool --appimage-extract;
# Generate AppImage
printf "\nGenerating AppImage\n";
./squashfs-root/AppRun ./librewolf;
chmod +x ./LibreWolf*.AppImage;
# Move AppImage to build_output folder
printf "\nMoving AppImage to build_output folder\n";
mv ./LibreWolf*.AppImage ./build_output;
# Delete the appimage tool
printf "\nRemoving AppImage tool\n";
rm -f ./appimagetool;
rm -rf ./squashfs-root;
printf "\n\n---------------------------------------- FLATPAK BUILD --------------------------------------------\n";
# Install build dependencies
printf "\nInstalling flatpak build dependencies\n";
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo;
flatpak install -y org.gnome.Platform/x86_64/3.32 org.gnome.Sdk/x86_64/3.32;
# Prepare for flatpak build
printf "\nPreparing files for flatpak build\n";
mkdir "source";
cp -r ./librewolf ./source/librewolf;
cp $SCRIPT_FOLDER/resources/flatpak/io.gitlab.LibreWolf.json ./io.gitlab.LibreWolf.json;
# Build Repo and standalone bundle
printf "\nBuilding flatpak repository and bundle\n";
flatpak-builder --repo=librewolf-flatpak-repo build-dir io.gitlab.LibreWolf.json;
flatpak build-bundle librewolf-flatpak-repo LibreWolf.flatpak io.gitlab.LibreWolf master;
# move repo and bundle to build output here
printf "\nMoving repository and bundle to build output folder\n";
mv libreWolf-flatpak-repo build_output;
mv LibreWolf.flatpak build_output;
# Clean up flatpak files
printf "\nCleaning up flatpak related files\n";
rm -rf ./build-dir;
rm -rf ./source;
rm -rf ./.flatpak-builder;
# Delete the extracted binary tarball folder
printf "\nDeleting extracted binary tarball folder\n";
rm -rf ./librewolf;
$SCRIPT_FOLDER/binary_tarball/scripts/1_Install_Dependencies.sh;
$SCRIPT_FOLDER/binary_tarball/scripts/2_Download_Source_Code.sh $SOURCE_FOLDER;
$SCRIPT_FOLDER/binary_tarball/scripts/3_Configure_Source_Code.sh $SOURCE_FOLDER $SOURCE_CONTENT_FOLDER;
$SCRIPT_FOLDER/binary_tarball/scripts/4_Build_Binary_Tarball.sh $SOURCE_FOLDER $BINARY_TARBALL;

View file

@ -1,2 +0,0 @@
*
!.gitignore

View file

@ -0,0 +1,44 @@
printf "\n\n---------------------------------------- FLATPAK BUILD --------------------------------------------\n";
# Install flatpak
# Installs some needed dependencies
printf "\nInstalling script dependencies\n";
apt update;
apt install -y gnupg2;
echo 'deb http://ppa.launchpad.net/alexlarsson/flatpak/ubuntu bionic main' >> /etc/apt/source.list;
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FA577F07;
apt update;
apt install -y flatpak flatpak-builder;
# Install build dependencies
printf "\nInstalling flatpak build dependencies\n";
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo;
flatpak install -y org.gnome.Platform/x86_64/3.32 org.gnome.Sdk/x86_64/3.32;
# Prepare for flatpak build
printf "\nPreparing files for flatpak build\n";
mkdir "source";
cp -r ./librewolf ./source/librewolf;
cp $SCRIPT_FOLDER/resources/flatpak/io.gitlab.LibreWolf.json ./io.gitlab.LibreWolf.json;
# Build Repo and standalone bundle
printf "\nBuilding flatpak repository and bundle\n";
flatpak-builder --repo=librewolf-flatpak-repo build-dir io.gitlab.LibreWolf.json;
flatpak build-bundle librewolf-flatpak-repo LibreWolf.flatpak io.gitlab.LibreWolf master;
# move repo and bundle to build output here
printf "\nMoving repository and bundle to build output folder\n";
mv libreWolf-flatpak-repo build_output;
mv LibreWolf.flatpak build_output;
# Clean up flatpak files
printf "\nCleaning up flatpak related files\n";
rm -rf ./build-dir;
rm -rf ./source;
rm -rf ./.flatpak-builder;
# Delete the extracted binary tarball folder
printf "\nDeleting extracted binary tarball folder\n";
rm -rf ./librewolf;

View file

@ -1,2 +0,0 @@
.DirIcon
librewolf.svg