@@ -9,38 +9,42 @@ printf "\nSetting up script variables\n";
99SCRIPT_FOLDER=$( realpath $( dirname $0 ) ) ;
1010REPOSITORY_FOLDER=$( realpath $SCRIPT_FOLDER /../) ;
1111BRANDING_FOLDER=$SCRIPT_FOLDER /resources/source_files/browser/branding/librewolf;
12- ICON_FILE =$REPOSITORY_FOLDER /branding/icon/icon.svg ;
12+ ICON_FOLDER =$REPOSITORY_FOLDER /branding/icon/;
1313PACKAGE_FILE=" librewolf*.tar.bz2" ;
1414APPIMAGE_RESOURCE_FOLDER=$SCRIPT_FOLDER /resources/appimage;
1515printf " SCRIPT_FOLDER: $SCRIPT_FOLDER \n" ;
1616printf " REPOSITORY_FOLDER: $REPOSITORY_FOLDER \n" ;
1717printf " BRANDING_FOLDER: $BRANDING_FOLDER \n" ;
18- printf " ICON_FILE : $ICON_FILE \n" ;
18+ printf " ICON_FOLDER : $ICON_FOLDER \n" ;
1919printf " PACKAGE_FILE: $PACKAGE_FILE \n" ;
2020printf " APPIMAGE_RESOURCE_FOLDER: $APPIMAGE_RESOURCE_FOLDER \n" ;
2121
2222# Installs some needed dependencies
2323printf " \nInstalling script dependencies\n" ;
2424apt update;
25- apt install sudo python python3 inkscape wget -y;
25+ apt install sudo python python3 inkscape icnsutils wget -y;
2626
2727printf " \n\n---------------------------------- ICON GENERATION ------------------------------------------\n" ;
2828
29- printf " \nGenerating icons from $ICON_FILE and moving to $BRANDING_FOLDER \n" ;
29+ printf " \nGenerating icons from $ICON_FOLDER and moving to $BRANDING_FOLDER \n" ;
3030
3131# Linux Icons
32- inkscape -z -f $ICON_FILE -e $BRANDING_FOLDER /default16.png -w 16 -h16 ;
33- inkscape -z -f $ICON_FILE -e $BRANDING_FOLDER /default32.png -w 32 -h32 ;
34- inkscape -z -f $ICON_FILE -e $BRANDING_FOLDER /default48.png -w 48 -h48 ;
35- inkscape -z -f $ICON_FILE -e $BRANDING_FOLDER /default64.png -w 64 -h64 ;
36- inkscape -z -f $ICON_FILE -e $BRANDING_FOLDER /default128.png -w 128 -h128 ;
32+ inkscape -z -f $ICON_FOLDER /icon.svg -e $BRANDING_FOLDER /default16.png -w 16 -h 16 ;
33+ inkscape -z -f $ICON_FOLDER /icon.svg -e $BRANDING_FOLDER /default32.png -w 32 -h 32 ;
34+ inkscape -z -f $ICON_FOLDER /icon.svg -e $BRANDING_FOLDER /default48.png -w 48 -h 48 ;
35+ inkscape -z -f $ICON_FOLDER /icon.svg -e $BRANDING_FOLDER /default64.png -w 64 -h 64 ;
36+ inkscape -z -f $ICON_FOLDER /icon.svg -e $BRANDING_FOLDER /default128.png -w 128 -h 128 ;
3737
3838# Windows Icons
39- inkscape -z -f $ICON_FILE -e $BRANDING_FOLDER /VisualElements_70.png -w 70 -h70;
40- inkscape -z -f $ICON_FILE -e $BRANDING_FOLDER /VisualElements_150.png -w 150 -h150;
39+ inkscape -z -f $ICON_FOLDER /icon.svg -e $BRANDING_FOLDER /VisualElements_70.png -w 70 -h70;
40+ inkscape -z -f $ICON_FOLDER /icon.svg -e $BRANDING_FOLDER /VisualElements_150.png -w 150 -h150;
4141
4242# TODO: Add Apple Icons
43+ png2icns $BRANDING_FOLDER /firefox.icns $BRANDING_FOLDER /default128.png;
4344
45+ inkscape -z -f $ICON_FOLDER /document-icon.svg -e $BRANDING_FOLDER /document-icon.png -w 128 -h 128;
46+ png2icns $BRANDING_FOLDER /document.icns $BRANDING_FOLDER /document-icon.png;
47+ rm -r $BRANDING_FOLDER /document-icon.png
4448printf " \n\n-------------------------------------- PREBUILD ---------------------------------------------\n" ;
4549
4650# Downloads and runs bootstrapper to install dependencies.
@@ -109,7 +113,7 @@ printf "\n\n------------------------------------ APPIMAGE BUILD ----------------
109113
110114# Copy and generate icons
111115printf " \nGenerating AppImage Icons\n" ;
112- cp $ICON_FILE $APPIMAGE_RESOURCE_FOLDER /librewolf.svg;
116+ cp $ICON_FOLDER /icon.svg $APPIMAGE_RESOURCE_FOLDER /librewolf.svg;
113117ln -rs $APPIMAGE_RESOURCE_FOLDER /librewolf.svg $SCRIPT_FOLDER /resources/appimage/.DirIcon;
114118
115119# Copy appimage resources to main tarball
0 commit comments