Rework script
This commit is contained in:
parent
1b51b70b9a
commit
d926f2f5a4
1 changed files with 28 additions and 29 deletions
|
|
@ -31,31 +31,33 @@ apt install sudo python python3 inkscape icnsutils wget -y;
|
||||||
|
|
||||||
printf "\n\n---------------------------------- ICON GENERATION ------------------------------------------\n";
|
printf "\n\n---------------------------------- ICON GENERATION ------------------------------------------\n";
|
||||||
|
|
||||||
|
# Displays message
|
||||||
printf "\nGenerating icons from $ICON_FOLDER and moving to $BRANDING_FOLDER\n";
|
printf "\nGenerating icons from $ICON_FOLDER and moving to $BRANDING_FOLDER\n";
|
||||||
|
|
||||||
# Linux Icons
|
# Generates Linux Icons
|
||||||
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/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/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/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/default64.png -w 64 -h 64;
|
||||||
inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/default128.png -w 128 -h 128;
|
inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/default128.png -w 128 -h 128;
|
||||||
|
|
||||||
# Windows Icons
|
# Generates Windows Icons
|
||||||
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_70.png -w 70 -h70;
|
||||||
inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/VisualElements_150.png -w 150 -h150;
|
inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/VisualElements_150.png -w 150 -h150;
|
||||||
|
|
||||||
# TODO: Add Apple Icons
|
# Generates Apple Icons
|
||||||
png2icns $BRANDING_FOLDER/firefox.icns $BRANDING_FOLDER/default128.png;
|
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;
|
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;
|
png2icns $BRANDING_FOLDER/document.icns $BRANDING_FOLDER/document-icon.png;
|
||||||
rm -r $BRANDING_FOLDER/document-icon.png
|
rm -r $BRANDING_FOLDER/document-icon.png
|
||||||
|
|
||||||
printf "\n\n-------------------------------------- PREBUILD ---------------------------------------------\n";
|
printf "\n\n-------------------------------------- PREBUILD ---------------------------------------------\n";
|
||||||
|
|
||||||
# Downloads and runs bootstrapper to install dependencies.
|
# Downloads and runs bootstrapper to install dependencies.
|
||||||
printf "\nRunning bootstrapper to install build dependencies\n";
|
printf "\nRunning bootstrapper to install build dependencies\n";
|
||||||
wget https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py;
|
wget https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py;
|
||||||
python ./bootstrap.py --application-choice=browser --no-interactive || true
|
python ./bootstrap.py --application-choice=browser --no-interactive || true
|
||||||
|
rm -f ./bootstrap.py;
|
||||||
|
|
||||||
# adds the new rust install to PATH
|
# adds the new rust install to PATH
|
||||||
printf "\nAdding new rust install to PATH\n";
|
printf "\nAdding new rust install to PATH\n";
|
||||||
|
|
@ -71,15 +73,14 @@ cd compile_folder;
|
||||||
# Clones the firefox source code for compiling
|
# Clones the firefox source code for compiling
|
||||||
printf "\nCloning Firefox Source Code\n";
|
printf "\nCloning Firefox Source Code\n";
|
||||||
hg clone https://hg.mozilla.org/releases/mozilla-release;
|
hg clone https://hg.mozilla.org/releases/mozilla-release;
|
||||||
|
cd mozilla-release;
|
||||||
|
|
||||||
# Copies our branding to the source code, changing it from firefox to librewolf
|
# Copies our branding to the source code, changing it from firefox to librewolf
|
||||||
printf "\nCopying branding to firefox source code\n";
|
printf "\nCopying branding to firefox source code\n";
|
||||||
cp -r $SOURCE_FOLDER/* ./mozilla-release;
|
cp -r $SOURCE_FOLDER/* ./;
|
||||||
|
|
||||||
#Disables pocket
|
#Disables pocket
|
||||||
sed -i "s/'pocket'/#'pocket'/g" ./mozilla-release/browser/components/moz.build;
|
sed -i "s/'pocket'/#'pocket'/g" ./browser/components/moz.build;
|
||||||
|
|
||||||
cd mozilla-release;
|
|
||||||
|
|
||||||
# Bootstraps librewolf again (using the ./mach script inside the source code)
|
# 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";
|
printf "\nRunning bootstrapper to install build dependencies (using ./mach script within source code)\n";
|
||||||
|
|
@ -93,11 +94,15 @@ printf "\nBuilding LibreWolf\n";
|
||||||
printf "\nPackaging LibreWolf\n";
|
printf "\nPackaging LibreWolf\n";
|
||||||
./mach package;
|
./mach package;
|
||||||
|
|
||||||
cd $SCRIPT_FOLDER;
|
# 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;
|
||||||
|
|
||||||
# moves the packaged tarball to the main folder
|
|
||||||
printf "\nRelocating binary tarball to script folder\n"
|
|
||||||
cp ./compile_folder/mozilla-release/obj*/dist/librewolf*.tar.bz2 ./;
|
|
||||||
|
|
||||||
printf "\n\n--------------------------------- SETTINGS INTEGRATION --------------------------------------\n";
|
printf "\n\n--------------------------------- SETTINGS INTEGRATION --------------------------------------\n";
|
||||||
|
|
||||||
|
|
@ -139,25 +144,19 @@ printf "\nGenerating AppImage\n";
|
||||||
./squashfs-root/AppRun ./librewolf;
|
./squashfs-root/AppRun ./librewolf;
|
||||||
chmod +x ./LibreWolf*.AppImage;
|
chmod +x ./LibreWolf*.AppImage;
|
||||||
|
|
||||||
# Move AppImage to build_output folder
|
|
||||||
printf "\nMoving AppImage to build_output folder\n";
|
|
||||||
mv ./LibreWolf*.AppImage ./build_output;
|
|
||||||
|
|
||||||
printf "\n\n---------------------------------------- CLEANUP --------------------------------------------\n";
|
|
||||||
|
|
||||||
# Remove the compile folder
|
|
||||||
printf "\nDeleting the compile_folder\n";
|
|
||||||
rm -rf ./compile_folder;
|
|
||||||
|
|
||||||
# Delete the extracted binary tarball folder
|
|
||||||
printf "\nDeleting extracted binary tarball folder\n";
|
|
||||||
rm -rf ./librewolf;
|
|
||||||
|
|
||||||
# Delete the appimage tool
|
# Delete the appimage tool
|
||||||
printf "\nRemoving AppImage tool\n";
|
printf "\nRemoving AppImage tool\n";
|
||||||
rm -f ./appimagetool;
|
rm -f ./appimagetool;
|
||||||
rm -rf ./squashfs-root;
|
rm -rf ./squashfs-root;
|
||||||
|
|
||||||
# Delete the bootstrapper script
|
# Move AppImage to build_output folder
|
||||||
printf "\nRemoving bootstrapper.py\n";
|
printf "\nMoving AppImage to build_output folder\n";
|
||||||
rm -f ./bootstrap.py;
|
mv ./LibreWolf*.AppImage ./build_output;
|
||||||
|
|
||||||
|
# Delete the extracted binary tarball folder
|
||||||
|
printf "\nDeleting extracted binary tarball folder\n";
|
||||||
|
rm -rf ./librewolf;
|
||||||
|
|
||||||
|
#printf "\n\n---------------------------------------- FLATPAK BUILD --------------------------------------------\n";
|
||||||
|
#sudo apt install flatpak-builder;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue