Chameleon

Chameleon Commit Details

Date:2010-07-25 23:16:37 (9 years 2 months ago)
Author:Tamás Kosárszky
Commit:248
Parents: 247
Message:Updated boot2's Makefile with Kabyl's version for generating the embeddedImages[] array. Added optional Apple HFS RAID device icon support, using device_hfsraid.png + device_hfsraid_o.png files
Changes:
M/branches/zef/i386/boot2/Makefile
M/branches/zef/i386/boot2/gui.c

File differences

branches/zef/i386/boot2/gui.c
4545
4646
4747
48
49
4850
4951
5052
......
9092
9193
9294
95
96
9397
9498
9599
......
297301
298302
299303
304
305
300306
301307
302308
......
707713
708714
709715
710
716
711717
712718
713719
......
716722
717723
718724
719
720
721
725
726
722727
723
728
724729
725730
726731
727
732
728733
729734
730735
731
736
732737
733738
734739
735
740
736741
737742
738743
739
744
740745
741746
742747
iDeviceGeneric_o,
iDeviceHFS,
iDeviceHFS_o,
iDeviceHFSRAID,
iDeviceHFSRAID_o,
iDeviceEXT3,
iDeviceEXT3_o,
iDeviceFAT16,
{.name = "device_generic_o", .image = NULL},
{.name = "device_hfsplus", .image = NULL},
{.name = "device_hfsplus_o", .image = NULL},
{.name = "device_hfsraid", .image = NULL},
{.name = "device_hfsraid_o", .image = NULL},
{.name = "device_ext3", .image = NULL},
{.name = "device_ext3_o", .image = NULL},
{.name = "device_fat16", .image = NULL},
LOADPNG(device_generic_o, iDeviceGeneric);
LOADPNG(device_hfsplus, iDeviceGeneric);
LOADPNG(device_hfsplus_o, iDeviceHFS);
LOADPNG(device_hfsraid, iDeviceGeneric);
LOADPNG(device_hfsraid_o, iDeviceHFSRAID);
LOADPNG(device_ext3, iDeviceGeneric);
LOADPNG(device_ext3_o, iDeviceEXT3);
LOADPNG(device_fat16, iDeviceGeneric);
void drawDeviceIcon(BVRef device, pixmap_t *buffer, position_t p, bool isSelected)
{
int devicetype;
if( diskIsCDROM(device) )
devicetype = iDeviceCDROM;// Use CDROM icon
else
{
case kPartitionTypeHFS:
// TODO: add apple raid icon choices
devicetype = iDeviceHFS;// Use HFS icon
// Use HFS or HFSRAID icon depending on bvr flags.
devicetype = (device->flags & kBVFlagBooter) ? iDeviceHFSRAID : iDeviceHFS;
break;
case kPartitionTypeHPFS:
devicetype = iDeviceNTFS;// Use HPFS / NTFS icon
break;
case kPartitionTypeFAT16:
devicetype = iDeviceFAT16;// Use FAT16 icon
break;
case kPartitionTypeFAT32:
devicetype = iDeviceFAT32;// Use FAT32 icon
break;
case kPartitionTypeEXT3:
devicetype = iDeviceEXT3;// Use EXT2/3 icon
break;
default:
devicetype = iDeviceGeneric;// Use Generic icon
break;
branches/zef/i386/boot2/Makefile
103103
104104
105105
106
107
108
109
106
107
110108
111109
112110
@echo "} embeddedpng_t;" >> $(SYMROOT)/art.h
@echo "" >> $(SYMROOT)/art.h
@echo "embeddedpng_t embeddedImages[] = {" >> $(SYMROOT)/art.h
@cd $(SYMROOT)/embed && find . -name '*.png' -exec sh -c \
"echo {.name = \`echo '\"'\`\`echo '{}' | sort | cut -f 2 -d \"/\" | cut -f 1 -d \".\" \`\`echo '\"'\`, \
.pngdata = \`echo {} | sort | tr / _ | tr . _ \`, .length = \&\`echo {} | sort | tr / _ | tr . _ \`_len}," \; >> $(SYMROOT)/art.h
@cd $(SYMROOT)/embed && find . -name '*.png' | sort | cut -f 2 -d '/' | cut -f 1 -d '.' | \
awk '{ printf "{.name = \"%s\", .pngdata = __%s_png, .length = &__%s_png_len},\n", $$1, $$1, $$1 }' >> $(SYMROOT)/art.h
@echo "};" >> $(SYMROOT)/art.h
@echo "#endif /* !__BOOT2_ART_H */" >> $(SYMROOT)/art.h ;\

Archive Download the corresponding diff file

Revision: 248