icon generation & copy during build
86
build.sh
@@ -33,6 +33,58 @@ _root_dir=$(dirname $(greadlink -f $0)) # Gets the absolute path of the script
|
||||
_src_dir="$_root_dir/build/src/" # Chromium source code directory
|
||||
_out_dir="Default"
|
||||
|
||||
chromium_version="135.0.7049.95"
|
||||
|
||||
# Function to copy icons from resources to the Chromium theme directory
|
||||
copy_icons() {
|
||||
local src_dir="$1"
|
||||
local chromium_theme_dir="$2"
|
||||
|
||||
echo "Copying icon files to Chromium theme directory: $chromium_theme_dir"
|
||||
|
||||
if [ -d "$src_dir" ]; then
|
||||
# Main PNG files
|
||||
echo "Copying PNG files..."
|
||||
cp -f "$src_dir/"*.png "$chromium_theme_dir/"
|
||||
|
||||
# SVG and AI files
|
||||
echo "Copying SVG and AI files..."
|
||||
cp -f "$src_dir/"*.svg "$chromium_theme_dir/"
|
||||
cp -f "$src_dir/"*.ai "$chromium_theme_dir/"
|
||||
|
||||
# Copy subdirectories
|
||||
echo "Copying platform-specific icons..."
|
||||
|
||||
# Mac icons
|
||||
if [ -d "$src_dir/mac" ]; then
|
||||
mkdir -p "$chromium_theme_dir/mac"
|
||||
cp -f "$src_dir/mac/"* "$chromium_theme_dir/mac/"
|
||||
fi
|
||||
|
||||
# Windows icons
|
||||
if [ -d "$src_dir/win" ]; then
|
||||
mkdir -p "$chromium_theme_dir/win"
|
||||
cp -rf "$src_dir/win/"* "$chromium_theme_dir/win/"
|
||||
fi
|
||||
|
||||
# Linux icons
|
||||
if [ -d "$src_dir/linux" ]; then
|
||||
mkdir -p "$chromium_theme_dir/linux"
|
||||
cp -f "$src_dir/linux/"* "$chromium_theme_dir/linux/"
|
||||
fi
|
||||
|
||||
# ChromeOS icons
|
||||
if [ -d "$src_dir/chromeos" ]; then
|
||||
mkdir -p "$chromium_theme_dir/chromeos"
|
||||
cp -f "$src_dir/chromeos/"* "$chromium_theme_dir/chromeos/"
|
||||
fi
|
||||
|
||||
echo "Icon files copied successfully."
|
||||
else
|
||||
echo "Warning: Icon source directory $src_dir not found. Skipping icon copy step."
|
||||
fi
|
||||
}
|
||||
|
||||
# Parse command line options
|
||||
release=false # Default is debug build
|
||||
non_interactive=false # Default is interactive mode
|
||||
@@ -52,12 +104,21 @@ shift "$(($OPTIND - 1))" # Shift positional parameters to access non-option arg
|
||||
_arch=${1:-arm64} # Set build architecture, default to arm64 if not specified
|
||||
|
||||
# Variables for build steps - will be prompted
|
||||
should_apply_patches=true
|
||||
should_sign_package=true
|
||||
should_clean_build=true
|
||||
should_reset_git=true
|
||||
# Initialize to false so pressing Enter means "No"
|
||||
should_apply_patches=false
|
||||
should_sign_package=false
|
||||
should_clean_build=false
|
||||
should_reset_git=false
|
||||
should_clean_git=false
|
||||
|
||||
if [ "$non_interactive" = true ]; then
|
||||
should_apply_patches=true
|
||||
should_sign_package=true
|
||||
should_clean_build=true
|
||||
should_reset_git=true
|
||||
should_clean_git=false
|
||||
fi
|
||||
|
||||
# Handle interactive vs non-interactive mode
|
||||
if [ "$non_interactive" = false ]; then
|
||||
read -p "Clean previous build artifacts (out/ directory)? (y/N). Press enter for NO: " -r reply
|
||||
@@ -107,6 +168,19 @@ if [ "$should_clean_git" = true ]; then
|
||||
cd "$_root_dir"
|
||||
fi
|
||||
|
||||
# Fetch tags and switch to Chromium version tag
|
||||
cd "$_src_dir"
|
||||
echo "Fetching tags and switching to Chromium version $chromium_version..."
|
||||
git fetch --tags
|
||||
git checkout tags/$chromium_version
|
||||
|
||||
echo "Running gclient sync with minimal history..."
|
||||
# Use --no-history to skip git history and --shallow for minimal checkout
|
||||
# These reduce checkout size and time significantly
|
||||
gclient sync --no-history --shallow
|
||||
cd "$_root_dir"
|
||||
|
||||
|
||||
# Clean up previous build artifacts
|
||||
if [ "$should_clean_build" = true ]; then
|
||||
echo "Cleaning up previous build artifacts..."
|
||||
@@ -158,6 +232,10 @@ echo " to: $_ai_side_panel_dir"
|
||||
cp -r $_root_dir/files/ai_agent_side_panel/* "$_ai_agent_side_panel_dir"
|
||||
cp -r $_root_dir/files/ai_side_panel/* "$_ai_side_panel_dir"
|
||||
|
||||
# Copy icons from resources/output to the Chromium theme directory
|
||||
_chromium_theme_dir="$_src_dir/chrome/app/theme/chromium"
|
||||
copy_icons "$_root_dir/resources/gen" "$_chromium_theme_dir"
|
||||
|
||||
# Change to source directory for building
|
||||
cd "$_src_dir"
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 231 KiB After Width: | Height: | Size: 182 KiB |
|
Before Width: | Height: | Size: 1.6 MiB |
BIN
resources/gen/chromeos/chrome_app_icon_192.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
resources/gen/chromeos/chrome_app_icon_32.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
resources/gen/chromeos/crosh_app_icon_256.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
resources/gen/chromeos/webstore_app_icon_128.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
resources/gen/chromeos/webstore_app_icon_16.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
0
resources/gen/chromium.ai
Normal file
BIN
resources/gen/linux/product_logo_128.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
resources/gen/linux/product_logo_24.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
resources/gen/linux/product_logo_256.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
170
resources/gen/linux/product_logo_32.xpm
Normal file
@@ -0,0 +1,170 @@
|
||||
/* XPM */
|
||||
static char *product_logo_32[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"32 32 132 2 ",
|
||||
" c None",
|
||||
". c #C74109",
|
||||
"X c #CB430A",
|
||||
"o c #D44407",
|
||||
"O c #D2460B",
|
||||
"+ c #D8470A",
|
||||
"@ c #D5490D",
|
||||
"# c #DB4C0D",
|
||||
"$ c #DF500F",
|
||||
"% c #D64E15",
|
||||
"& c #DC4E10",
|
||||
"* c #DE5113",
|
||||
"= c #D7521A",
|
||||
"- c #DC581D",
|
||||
"; c #E14F0E",
|
||||
": c #E2500F",
|
||||
"> c #E45413",
|
||||
", c #E95713",
|
||||
"< c #E75816",
|
||||
"1 c #EA5916",
|
||||
"2 c #E45A1C",
|
||||
"3 c #ED5D19",
|
||||
"4 c #F05E17",
|
||||
"5 c #F15F18",
|
||||
"6 c #EF601B",
|
||||
"7 c #F1601B",
|
||||
"8 c #DD5A23",
|
||||
"9 c #E35D21",
|
||||
"0 c #DA642F",
|
||||
"q c #DB6935",
|
||||
"w c #DF713E",
|
||||
"e c #EC6424",
|
||||
"r c #E1652F",
|
||||
"t c #E26933",
|
||||
"y c #E86A31",
|
||||
"u c #EB7137",
|
||||
"i c #E77039",
|
||||
"p c #E9713A",
|
||||
"a c #DE7748",
|
||||
"s c #DE7B4C",
|
||||
"d c #E07343",
|
||||
"f c #E07847",
|
||||
"g c #E97844",
|
||||
"h c #EB7C48",
|
||||
"j c #F27C41",
|
||||
"k c #DD855B",
|
||||
"l c #ED814F",
|
||||
"z c #E78354",
|
||||
"x c #EB8354",
|
||||
"c c #E5865E",
|
||||
"v c #E68A5F",
|
||||
"b c #EB8858",
|
||||
"n c #F08857",
|
||||
"m c #F48D5B",
|
||||
"M c #D98963",
|
||||
"N c #E38D67",
|
||||
"B c #EB8D63",
|
||||
"V c #E78E68",
|
||||
"C c #EB9067",
|
||||
"Z c #E59069",
|
||||
"A c #EA936D",
|
||||
"S c #E49571",
|
||||
"D c #E49A78",
|
||||
"F c #F59D73",
|
||||
"G c #D69E84",
|
||||
"H c #D9A086",
|
||||
"J c #DEB19D",
|
||||
"K c #EEA481",
|
||||
"L c #EFA788",
|
||||
"P c #E2A98E",
|
||||
"I c #EFAE92",
|
||||
"U c #F7B89A",
|
||||
"Y c #D4B2A2",
|
||||
"T c #D5BAAD",
|
||||
"R c #DBBEB1",
|
||||
"E c #E6B8A1",
|
||||
"W c #E1BEAE",
|
||||
"Q c #F3BDA5",
|
||||
"! c #F1BEA8",
|
||||
"~ c #D9C1B7",
|
||||
"^ c #EDC0AC",
|
||||
"/ c #F5C3AC",
|
||||
"( c #E3C2B3",
|
||||
") c #DACFCA",
|
||||
"_ c #D9D2CE",
|
||||
"` c #F6D5C8",
|
||||
"' c #F7DACE",
|
||||
"] c #FBDBCC",
|
||||
"[ c #E7D8D0",
|
||||
"{ c #E3DDDB",
|
||||
"} c #F1E0D7",
|
||||
"| c #F9E2D8",
|
||||
" . c #FBE3D9",
|
||||
".. c #E2E4E5",
|
||||
"X. c #E4E4E4",
|
||||
"o. c #EAE4E1",
|
||||
"O. c #ECE5E1",
|
||||
"+. c #EAE8E7",
|
||||
"@. c #E7E8E8",
|
||||
"#. c #EAE9E9",
|
||||
"$. c #E9EAEA",
|
||||
"%. c #E9EBEB",
|
||||
"&. c #EAECED",
|
||||
"*. c #ECEEEF",
|
||||
"=. c #EDEEEF",
|
||||
"-. c #FBE8E0",
|
||||
";. c #FBEAE3",
|
||||
":. c #FCEAE2",
|
||||
">. c #F1F2F2",
|
||||
",. c #F3F3F2",
|
||||
"<. c #F1F3F4",
|
||||
"1. c gray96",
|
||||
"2. c #FEF5F1",
|
||||
"3. c #FEF7F3",
|
||||
"4. c #FDF7F4",
|
||||
"5. c #FEF8F6",
|
||||
"6. c #F9F8F8",
|
||||
"7. c #F8F9F9",
|
||||
"8. c #F9F9F9",
|
||||
"9. c #FBFAFA",
|
||||
"0. c #FEFAF8",
|
||||
"q. c #FEFAF9",
|
||||
"w. c #FEFBFA",
|
||||
"e. c #FFFCFB",
|
||||
"r. c gray99",
|
||||
"t. c #FFFDFC",
|
||||
"y. c #FEFEFE",
|
||||
"u. c #FFFEFE",
|
||||
"i. c #FFFFFE",
|
||||
"p. c #FEFEFF",
|
||||
"a. c #FEFFFF",
|
||||
"s. c white",
|
||||
/* pixels */
|
||||
" > # O O ",
|
||||
" > & O O # ",
|
||||
" > > > @ X @ > > ",
|
||||
" 1 h B p > > > > @ X O * > ",
|
||||
" g W S > > > > # @ X X * > , ",
|
||||
" t 9 > > > > # # O . X > , 1 ",
|
||||
" > > > > > > # # # X . X > 1 3 ",
|
||||
" 1 > > > > > > # # # @ X X @ 1 3 3 ",
|
||||
" 1 1 > > > > > > # # # # X X X & 3 3 3 ",
|
||||
" 3 1 1 > > > > > > # # # # O X X X > 3 3 ",
|
||||
" 3 3 1 1 > > > : ; # # # # # @ X X X & 3 3 7 ",
|
||||
" 3 3 3 1 1 > > y x B C x r # # # X X . O 1 3 7 ",
|
||||
" 7 3 3 1 1 3 l Q :.s.s.s.s.:.I 8 + O X X X < 3 6 7 ",
|
||||
" 7 5 4 1 1 e n / 2.s.s.s.s.s.s.s.s.! * O X @ & > 3 3 7 ",
|
||||
" j m m m F U ] 5.s.s.s.s.s.s.s.s.s.s.s.c o X @ > < 3 3 7 ",
|
||||
" K } s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.Q @ X @ 1 1 3 3 7 ",
|
||||
" b E [ o.+.*.*.*.*.*.<.s.s.s.s.s.s.` % X @ 1 3 3 3 7 ",
|
||||
" e u h z v Z D P ( { @.<.s.s.s.s.' = . & 1 1 3 3 7 ",
|
||||
" 1 , , > > < N { @.s.s.s.Q / % X * 1 1 3 3 6 ",
|
||||
" > > < W X.s.s.2.B V O X > 1 1 3 3 ",
|
||||
" > > J X.s.s. .t 8 X @ > 1 1 3 3 ",
|
||||
" > < R @.s.s.I # O X & > 1 1 3 ",
|
||||
" > d _ <.s.:.t # O X > > > 1 3 ",
|
||||
" > > H X.s.s.A # # X @ > > > 1 ",
|
||||
" > > a ) s.s.L * # O X * > > > ",
|
||||
" > t T <.2.K * # O X # > > > ",
|
||||
" , t Y *. .B > # O X @ & > > ",
|
||||
" 1 w T o.Q t ; # O X @ # & ",
|
||||
" e M ~ ^ x > > # X X @ # # ",
|
||||
" s G P x 3 > & O X O O # ",
|
||||
" f k k i < $ # O X O O ",
|
||||
" q 0 - # @ O O O "
|
||||
};
|
||||
BIN
resources/gen/linux/product_logo_48.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
resources/gen/linux/product_logo_64.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
resources/gen/mac/app.icns
Normal file
BIN
resources/gen/mac/document.icns
Normal file
0
resources/gen/product_logo.ai
Normal file
BIN
resources/gen/product_logo.png
Normal file
|
After Width: | Height: | Size: 182 KiB |
0
resources/gen/product_logo.svg
Normal file
BIN
resources/gen/product_logo_128.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
resources/gen/product_logo_16.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
resources/gen/product_logo_192.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
resources/gen/product_logo_22.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
resources/gen/product_logo_22_mono.png
Normal file
|
After Width: | Height: | Size: 882 B |
BIN
resources/gen/product_logo_24.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
resources/gen/product_logo_256.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
resources/gen/product_logo_32.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
resources/gen/product_logo_48.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
resources/gen/product_logo_64.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
0
resources/gen/product_logo_animation.svg
Normal file
7
resources/gen/win/README
Normal file
@@ -0,0 +1,7 @@
|
||||
The icons in this directory are used by the Windows version of the browser.
|
||||
- chromium.ico: Main application icon
|
||||
- incognito.ico: Icon for incognito mode
|
||||
- app_list.ico: Icon for app list
|
||||
- chromium_doc.ico: Icon for HTML documents
|
||||
- chromium_pdf.ico: Icon for PDF documents
|
||||
- tiles/: Contains icons used for Windows tiles
|
||||
BIN
resources/gen/win/app_list.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
resources/gen/win/chromium.ico
Normal file
|
After Width: | Height: | Size: 279 KiB |
BIN
resources/gen/win/chromium_doc.ico
Normal file
|
After Width: | Height: | Size: 212 KiB |
BIN
resources/gen/win/chromium_pdf.ico
Normal file
|
After Width: | Height: | Size: 212 KiB |
BIN
resources/gen/win/incognito.ico
Normal file
|
After Width: | Height: | Size: 279 KiB |
BIN
resources/gen/win/tiles/Logo.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
resources/gen/win/tiles/SmallLogo.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |