From 62ae8ee96788df9e1fc42322e942275bc5cc0971 Mon Sep 17 00:00:00 2001 From: BeatLink Date: Wed, 17 Jul 2019 13:50:38 -0500 Subject: [PATCH] Split build script and rearrange linux folder --- browser/linux/appimage/build_appimage.sh | 40 ++++ browser/linux/appimage/content/.DirIcon | 1 + .../appimage => appimage/content}/AppRun | 0 .../content}/librewolf.desktop | 0 browser/linux/appimage/content/librewolf.svg | 90 ++++++++ .../content}/launch_librewolf.sh | 0 .../scripts/1_Install_Dependencies.sh | 12 + .../scripts/2_Download_Source_Code.sh | 9 + .../scripts/3_Configure_Source_Code.sh | 15 ++ .../scripts/4_Build_Binary_Tarball.sh | 25 +++ .../scripts/5_Configure_Binary_Tarball.sh | 24 ++ browser/linux/build.sh | 209 +----------------- browser/linux/build_output/.gitignore | 2 - browser/linux/flatpak/build_flatpak.sh | 44 ++++ .../content}/io.gitlab.LibreWolf.json | 0 browser/linux/resources/appimage/.gitignore | 2 - 16 files changed, 272 insertions(+), 201 deletions(-) create mode 100644 browser/linux/appimage/build_appimage.sh create mode 120000 browser/linux/appimage/content/.DirIcon rename browser/linux/{resources/appimage => appimage/content}/AppRun (100%) rename browser/linux/{resources/appimage => appimage/content}/librewolf.desktop (100%) create mode 100644 browser/linux/appimage/content/librewolf.svg rename browser/linux/{resources => binary_tarball/content}/launch_librewolf.sh (100%) create mode 100755 browser/linux/binary_tarball/scripts/1_Install_Dependencies.sh create mode 100755 browser/linux/binary_tarball/scripts/2_Download_Source_Code.sh create mode 100644 browser/linux/binary_tarball/scripts/3_Configure_Source_Code.sh create mode 100644 browser/linux/binary_tarball/scripts/4_Build_Binary_Tarball.sh create mode 100644 browser/linux/binary_tarball/scripts/5_Configure_Binary_Tarball.sh delete mode 100644 browser/linux/build_output/.gitignore create mode 100644 browser/linux/flatpak/build_flatpak.sh rename browser/linux/{resources/flatpak => flatpak/content}/io.gitlab.LibreWolf.json (100%) delete mode 100644 browser/linux/resources/appimage/.gitignore diff --git a/browser/linux/appimage/build_appimage.sh b/browser/linux/appimage/build_appimage.sh new file mode 100644 index 0000000..3efa9e8 --- /dev/null +++ b/browser/linux/appimage/build_appimage.sh @@ -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; diff --git a/browser/linux/appimage/content/.DirIcon b/browser/linux/appimage/content/.DirIcon new file mode 120000 index 0000000..2653ffb --- /dev/null +++ b/browser/linux/appimage/content/.DirIcon @@ -0,0 +1 @@ +librewolf.svg \ No newline at end of file diff --git a/browser/linux/resources/appimage/AppRun b/browser/linux/appimage/content/AppRun similarity index 100% rename from browser/linux/resources/appimage/AppRun rename to browser/linux/appimage/content/AppRun diff --git a/browser/linux/resources/appimage/librewolf.desktop b/browser/linux/appimage/content/librewolf.desktop similarity index 100% rename from browser/linux/resources/appimage/librewolf.desktop rename to browser/linux/appimage/content/librewolf.desktop diff --git a/browser/linux/appimage/content/librewolf.svg b/browser/linux/appimage/content/librewolf.svg new file mode 100644 index 0000000..2c6262a --- /dev/null +++ b/browser/linux/appimage/content/librewolf.svg @@ -0,0 +1,90 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/browser/linux/resources/launch_librewolf.sh b/browser/linux/binary_tarball/content/launch_librewolf.sh similarity index 100% rename from browser/linux/resources/launch_librewolf.sh rename to browser/linux/binary_tarball/content/launch_librewolf.sh diff --git a/browser/linux/binary_tarball/scripts/1_Install_Dependencies.sh b/browser/linux/binary_tarball/scripts/1_Install_Dependencies.sh new file mode 100755 index 0000000..9519b22 --- /dev/null +++ b/browser/linux/binary_tarball/scripts/1_Install_Dependencies.sh @@ -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; diff --git a/browser/linux/binary_tarball/scripts/2_Download_Source_Code.sh b/browser/linux/binary_tarball/scripts/2_Download_Source_Code.sh new file mode 100755 index 0000000..c973038 --- /dev/null +++ b/browser/linux/binary_tarball/scripts/2_Download_Source_Code.sh @@ -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; + diff --git a/browser/linux/binary_tarball/scripts/3_Configure_Source_Code.sh b/browser/linux/binary_tarball/scripts/3_Configure_Source_Code.sh new file mode 100644 index 0000000..e4e3a9a --- /dev/null +++ b/browser/linux/binary_tarball/scripts/3_Configure_Source_Code.sh @@ -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; + diff --git a/browser/linux/binary_tarball/scripts/4_Build_Binary_Tarball.sh b/browser/linux/binary_tarball/scripts/4_Build_Binary_Tarball.sh new file mode 100644 index 0000000..6cf3866 --- /dev/null +++ b/browser/linux/binary_tarball/scripts/4_Build_Binary_Tarball.sh @@ -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 ./; + diff --git a/browser/linux/binary_tarball/scripts/5_Configure_Binary_Tarball.sh b/browser/linux/binary_tarball/scripts/5_Configure_Binary_Tarball.sh new file mode 100644 index 0000000..346f702 --- /dev/null +++ b/browser/linux/binary_tarball/scripts/5_Configure_Binary_Tarball.sh @@ -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; + + diff --git a/browser/linux/build.sh b/browser/linux/build.sh index 75ee988..cd0b650 100755 --- a/browser/linux/build.sh +++ b/browser/linux/build.sh @@ -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; diff --git a/browser/linux/build_output/.gitignore b/browser/linux/build_output/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/browser/linux/build_output/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/browser/linux/flatpak/build_flatpak.sh b/browser/linux/flatpak/build_flatpak.sh new file mode 100644 index 0000000..c2f487d --- /dev/null +++ b/browser/linux/flatpak/build_flatpak.sh @@ -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; diff --git a/browser/linux/resources/flatpak/io.gitlab.LibreWolf.json b/browser/linux/flatpak/content/io.gitlab.LibreWolf.json similarity index 100% rename from browser/linux/resources/flatpak/io.gitlab.LibreWolf.json rename to browser/linux/flatpak/content/io.gitlab.LibreWolf.json diff --git a/browser/linux/resources/appimage/.gitignore b/browser/linux/resources/appimage/.gitignore deleted file mode 100644 index 9f0e081..0000000 --- a/browser/linux/resources/appimage/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.DirIcon -librewolf.svg