2013-03-26 09:38:37 +01:00
|
|
|
##############################################################################
|
|
|
|
# This optional file "builder-targets-cb.sh" will be called by builder.sh
|
|
|
|
#
|
|
|
|
# The targets will be called from thde opsi-builder using the following
|
|
|
|
# order: config, prepare, retrieve, create, package, publish, commit, cleanup
|
|
|
|
# You can overwrite the target functions in builder-targets-cb.sh
|
|
|
|
#
|
|
|
|
# You can define callback functions. The functions are called from
|
|
|
|
# opsi-builder within processing a target
|
|
|
|
# cb_package_makeproductfile
|
|
|
|
#
|
|
|
|
# You can use every variable defined in any configuration file or by
|
|
|
|
# the defined builder script itself. Also, calling the predefined
|
|
|
|
# targets builder_<targetname> is possible.
|
|
|
|
#
|
|
|
|
# Abstract:
|
|
|
|
# target order: config, prepare, retrieve, create, package, publish, commit, cleanup
|
|
|
|
# callbacks: <none>
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
function cleanup() {
|
|
|
|
echo "Cleanup"
|
|
|
|
builder_cleanup
|
|
|
|
}
|
2013-03-26 11:43:57 +01:00
|
|
|
function create() {
|
|
|
|
echo "Create"
|
|
|
|
builder_create
|
2013-03-27 11:07:06 +01:00
|
|
|
cp $INST_DIR/CLIENT_DATA/opsi-${PN}.ini $INST_DIR/CLIENT_DATA/Imagine.ini
|
2013-03-27 13:41:11 +01:00
|
|
|
mkdir $INST_DIR/CLIENT_DATA/X86/Icons
|
|
|
|
mkdir $INST_DIR/CLIENT_DATA/X86_64/Icons
|
2013-05-07 17:03:05 +02:00
|
|
|
mkdir $INST_DIR/CLIENT_DATA/ALL/Icons
|
|
|
|
|
|
|
|
pushd $INST_DIR/CLIENT_DATA/ALL/
|
2013-05-08 08:15:00 +02:00
|
|
|
for typenr in ${WINST_VALUE[0]}
|
2013-05-07 17:03:05 +02:00
|
|
|
do
|
2013-05-09 08:58:53 +02:00
|
|
|
type=${typenr/*-/}
|
2013-05-07 22:32:11 +02:00
|
|
|
### 24bit #############################################################################################################################################
|
2013-05-07 17:03:05 +02:00
|
|
|
# 256x256
|
2013-05-09 08:58:53 +02:00
|
|
|
convert -verbose -size 256x256 xc:transparent -font DejaVu-Sans-Condensed-Bold -pointsize 68 -fill white -stroke black -strokewidth 2 -draw "gravity south text 0,5 '$type'" $type-256x256-txt.png
|
2013-05-08 17:16:41 +02:00
|
|
|
composite -verbose -quality 100 $type-256x256-txt.png $INST_DIR/CLIENT_DATA/ALL/Template/icon_imagine_24bit_256x256.png $type-256x256-24bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 180x180
|
2013-05-08 17:16:41 +02:00
|
|
|
convert -verbose -resize 180x180 $type-256x256-24bit.png $type-180x180-24bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 150x150
|
2013-05-08 17:16:41 +02:00
|
|
|
convert -verbose -resize 150x150 $type-256x256-24bit.png $type-150x150-24bit.png
|
2013-05-07 17:03:05 +02:00
|
|
|
# 128x128
|
2013-05-09 08:58:53 +02:00
|
|
|
convert -verbose -size 128x128 xc:transparent -font DejaVu-Sans-Condensed-Bold -pointsize 37 -fill white -stroke black -strokewidth 2 -draw "gravity south text 0,3 '$type'" $type-128x128-txt.png
|
2013-05-08 17:16:41 +02:00
|
|
|
composite -verbose -quality 100 $type-128x128-txt.png $INST_DIR/CLIENT_DATA/ALL/Template/icon_imagine_24bit_128x128.png $type-128x128-24bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 96x96
|
2013-05-08 17:16:41 +02:00
|
|
|
convert -verbose -resize 96x96 $type-256x256-24bit.png $type-96x96-24bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 72x72
|
2013-05-08 17:16:41 +02:00
|
|
|
convert -verbose -resize 72x72 $type-256x256-24bit.png $type-72x72-24bit.png
|
2013-05-07 17:03:05 +02:00
|
|
|
# 64x64
|
2013-05-09 08:58:53 +02:00
|
|
|
convert -verbose -size 64x64 xc:transparent -font DejaVu-Sans-Condensed-Bold -pointsize 18 -fill white -stroke black -strokewidth 1 -draw "gravity south text 0,2 '$type'" $type-64x64-txt.png
|
2013-05-08 17:16:41 +02:00
|
|
|
composite -verbose -quality 100 $type-64x64-txt.png $INST_DIR/CLIENT_DATA/ALL/Template/icon_imagine_24bit_64x64.png $type-64x64-24bit.png
|
2013-05-08 08:15:00 +02:00
|
|
|
# 50x50
|
2013-05-08 17:16:41 +02:00
|
|
|
convert -verbose -resize 50x50 $type-64x64-24bit.png $type-50x50-24bit.png
|
2013-05-07 17:03:05 +02:00
|
|
|
# 48x48
|
2013-05-09 08:58:53 +02:00
|
|
|
convert -verbose -size 48x48 xc:transparent -font DejaVu-Sans-Condensed-Bold -pointsize 14 -fill black -draw "gravity south text 0,1 '$type'" $type-48x48-txt.png
|
2013-05-08 17:16:41 +02:00
|
|
|
composite -verbose -quality 100 $type-48x48-txt.png $INST_DIR/CLIENT_DATA/ALL/Template/icon_imagine_24bit_48x48.png $type-48x48-24bit.png
|
2013-05-08 08:15:00 +02:00
|
|
|
# 40x40
|
2013-05-08 17:16:41 +02:00
|
|
|
convert -verbose -resize 40x40 $type-48x48-24bit.png $type-40x40-24bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 32x32
|
2013-05-08 17:16:41 +02:00
|
|
|
convert -verbose -resize 32x32 $type-48x48-24bit.png $type-32x32-24bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 30x30
|
2013-05-08 17:16:41 +02:00
|
|
|
convert -verbose -resize 30x30 $type-48x48-24bit.png $type-30x30-24bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 24x24
|
2013-05-08 17:16:41 +02:00
|
|
|
convert -verbose -resize 24x24 $type-48x48-24bit.png $type-24x24-24bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 16x16
|
2013-05-09 08:58:53 +02:00
|
|
|
convert -verbose -size 16x16 xc:transparent -font DejaVu-Sans-Condensed-Bold -pointsize 5 -fill black -draw "gravity south text 0,1 '$type'" $type-16x16-txt.png
|
2013-05-08 17:16:41 +02:00
|
|
|
composite -verbose -quality 100 $type-16x16-txt.png $INST_DIR/CLIENT_DATA/ALL/Template/icon_imagine_24bit_16x16.png $type-16x16-24bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
|
|
|
|
#### 8bit #############################################################################################################################################
|
|
|
|
# 256x256
|
2013-05-08 17:16:41 +02:00
|
|
|
cp $type-256x256-24bit.png $type-256x256.png
|
2013-05-08 19:59:06 +02:00
|
|
|
pngquant 256 $type-256x256.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-256x256-??8.png png8:$type-256x256-8bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 180x180
|
2013-05-08 17:16:41 +02:00
|
|
|
cp $type-180x180-24bit.png $type-180x180.png
|
2013-05-08 19:59:06 +02:00
|
|
|
pngquant 256 $type-180x180.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-180x180-??8.png png8:$type-180x180-8bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 150x150
|
2013-05-08 17:16:41 +02:00
|
|
|
cp $type-150x150-24bit.png $type-150x150.png
|
2013-05-08 19:59:06 +02:00
|
|
|
pngquant 256 $type-150x150.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-150x150-??8.png png8:$type-150x150-8bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 128x128
|
2013-05-08 17:16:41 +02:00
|
|
|
cp $type-128x128-24bit.png $type-128x128.png
|
2013-05-08 19:59:06 +02:00
|
|
|
pngquant 256 $type-128x128.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-128x128-??8.png png8:$type-128x128-8bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 96x96
|
2013-05-08 17:16:41 +02:00
|
|
|
cp $type-96x96-24bit.png $type-96x96.png
|
2013-05-08 19:59:06 +02:00
|
|
|
pngquant 256 $type-96x96.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-96x96-??8.png png8:$type-96x96-8bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 72x72
|
2013-05-08 17:16:41 +02:00
|
|
|
cp $type-72x72-24bit.png $type-72x72.png
|
2013-05-08 19:59:06 +02:00
|
|
|
pngquant 256 $type-72x72.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-72x72-??8.png png8:$type-72x72-8bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 64x64
|
2013-05-08 17:16:41 +02:00
|
|
|
cp $type-64x64-24bit.png $type-64x64.png
|
2013-05-08 19:59:06 +02:00
|
|
|
pngquant 256 $type-64x64.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-64x64-??8.png png8:$type-64x64-8bit.png
|
2013-05-08 08:15:00 +02:00
|
|
|
# 50x50
|
2013-05-08 17:16:41 +02:00
|
|
|
cp $type-50x50-24bit.png $type-50x50.png
|
2013-05-08 19:59:06 +02:00
|
|
|
pngquant 256 $type-50x50.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-50x50-??8.png png8:$type-50x50-8bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 48x48
|
2013-05-08 17:16:41 +02:00
|
|
|
cp $type-48x48-24bit.png $type-48x48.png
|
2013-05-08 19:59:06 +02:00
|
|
|
pngquant 256 $type-48x48.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-48x48-??8.png png8:$type-48x48-8bit.png
|
2013-05-08 08:15:00 +02:00
|
|
|
# 40x40
|
2013-05-08 17:16:41 +02:00
|
|
|
cp $type-40x40-24bit.png $type-40x40.png
|
2013-05-08 19:59:06 +02:00
|
|
|
pngquant 256 $type-40x40.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-40x40-??8.png png8:$type-40x40-8bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 32x32
|
2013-05-08 17:16:41 +02:00
|
|
|
cp $type-32x32-24bit.png $type-32x32.png
|
2013-05-08 19:59:06 +02:00
|
|
|
pngquant 256 $type-32x32.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-32x32-??8.png png8:$type-32x32-8bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 30x30
|
2013-05-08 17:16:41 +02:00
|
|
|
cp $type-30x30-24bit.png $type-30x30.png
|
2013-05-08 19:59:06 +02:00
|
|
|
pngquant 256 $type-30x30.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-30x30-??8.png png8:$type-30x30-8bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 24x24
|
2013-05-08 17:16:41 +02:00
|
|
|
cp $type-24x24-24bit.png $type-24x24.png
|
2013-05-08 19:59:06 +02:00
|
|
|
pngquant 256 $type-24x24.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-24x24-??8.png png8:$type-24x24-8bit.png
|
2013-05-07 17:03:05 +02:00
|
|
|
# 16x16
|
2013-05-08 17:16:41 +02:00
|
|
|
cp $type-16x16-24bit.png $type-16x16.png
|
2013-05-08 19:59:06 +02:00
|
|
|
pngquant 256 $type-16x16.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-16x16-??8.png png8:$type-16x16-8bit.png
|
|
|
|
|
|
|
|
rm $type-*x*-??8.png
|
2013-05-07 22:32:11 +02:00
|
|
|
|
|
|
|
#### 4bit #############################################################################################################################################
|
|
|
|
# 256x256
|
2013-05-08 22:37:58 +02:00
|
|
|
cp $type-256x256-8bit.png $type-256x256.png
|
2013-05-08 19:25:16 +02:00
|
|
|
pngquant 16 $type-256x256.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-256x256-??8.png -depth 4 -colors 16 +dither $type-256x256-4bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 180x180
|
2013-05-08 22:37:58 +02:00
|
|
|
cp $type-180x180-8bit.png $type-180x180.png
|
2013-05-08 19:25:16 +02:00
|
|
|
pngquant 16 $type-180x180.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-180x180-??8.png -depth 4 -colors 16 +dither $type-180x180-4bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 150x150
|
2013-05-08 22:37:58 +02:00
|
|
|
cp $type-150x150-8bit.png $type-150x150.png
|
2013-05-08 19:25:16 +02:00
|
|
|
pngquant 16 $type-150x150.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-150x150-??8.png -depth 4 -colors 16 +dither $type-150x150-4bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 128x128
|
2013-05-08 22:37:58 +02:00
|
|
|
cp $type-128x128-8bit.png $type-128x128.png
|
2013-05-08 19:25:16 +02:00
|
|
|
pngquant 16 $type-128x128.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-128x128-??8.png -depth 4 -colors 16 +dither $type-128x128-4bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 96x96
|
2013-05-08 22:37:58 +02:00
|
|
|
cp $type-96x96-8bit.png $type-96x96.png
|
2013-05-08 19:25:16 +02:00
|
|
|
pngquant 16 $type-96x96.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-96x96-??8.png -depth 4 -colors 16 +dither $type-96x96-4bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 72x72
|
2013-05-08 22:37:58 +02:00
|
|
|
cp $type-72x72-8bit.png $type-72x72.png
|
2013-05-08 19:25:16 +02:00
|
|
|
pngquant 16 $type-72x72.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-72x72-??8.png -depth 4 -colors 16 +dither $type-72x72-4bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 64x64
|
2013-05-08 22:37:58 +02:00
|
|
|
cp $type-64x64-8bit.png $type-64x64.png
|
2013-05-08 19:25:16 +02:00
|
|
|
pngquant 16 $type-64x64.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-64x64-??8.png -depth 4 -colors 16 +dither $type-64x64-4bit.png
|
2013-05-08 08:15:00 +02:00
|
|
|
# 50x50
|
2013-05-08 22:37:58 +02:00
|
|
|
cp $type-50x50-8bit.png $type-50x50.png
|
2013-05-08 19:25:16 +02:00
|
|
|
pngquant 16 $type-50x50.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-50x50-??8.png -depth 4 -colors 16 +dither $type-50x50-4bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 48x48
|
2013-05-08 22:37:58 +02:00
|
|
|
cp $type-48x48-8bit.png $type-48x48.png
|
2013-05-08 19:25:16 +02:00
|
|
|
pngquant 16 $type-48x48.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-48x48-??8.png -depth 4 -colors 16 +dither $type-48x48-4bit.png
|
2013-05-08 08:15:00 +02:00
|
|
|
# 40x40
|
2013-05-08 22:37:58 +02:00
|
|
|
cp $type-40x40-8bit.png $type-40x40.png
|
2013-05-08 19:25:16 +02:00
|
|
|
pngquant 16 $type-40x40.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-40x40-??8.png -depth 4 -colors 16 +dither $type-40x40-4bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 32x32
|
2013-05-08 22:37:58 +02:00
|
|
|
cp $type-32x32-8bit.png $type-32x32.png
|
2013-05-08 19:25:16 +02:00
|
|
|
pngquant 16 $type-32x32.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-32x32-??8.png -depth 4 -colors 16 +dither $type-32x32-4bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 30x30
|
2013-05-08 22:37:58 +02:00
|
|
|
cp $type-30x30-8bit.png $type-30x30.png
|
2013-05-08 19:25:16 +02:00
|
|
|
pngquant 16 $type-30x30.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-30x30-??8.png -depth 4 -colors 16 +dither $type-30x30-4bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 24x24
|
2013-05-08 22:37:58 +02:00
|
|
|
cp $type-24x24-8bit.png $type-24x24.png
|
2013-05-08 19:25:16 +02:00
|
|
|
pngquant 16 $type-24x24.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-24x24-??8.png -depth 4 -colors 16 +dither $type-24x24-4bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
# 16x16
|
2013-05-08 22:37:58 +02:00
|
|
|
cp $type-16x16-8bit.png $type-16x16.png
|
2013-05-08 19:25:16 +02:00
|
|
|
pngquant 16 $type-16x16.png
|
2013-05-08 22:37:58 +02:00
|
|
|
convert -verbose $type-16x16-??8.png -depth 4 -colors 16 +dither $type-16x16-4bit.png
|
2013-05-07 22:32:11 +02:00
|
|
|
|
2013-05-08 22:37:58 +02:00
|
|
|
rm $type-*x*-??8.png
|
2013-05-07 22:32:11 +02:00
|
|
|
|
2013-05-07 17:03:05 +02:00
|
|
|
# combine the images into a icon
|
2013-05-08 08:15:00 +02:00
|
|
|
icotool -c -o $INST_DIR/CLIENT_DATA/ALL/Icons/$type.ico \
|
2013-05-09 08:58:53 +02:00
|
|
|
$type-256x256-24bit.png $type-128x128-24bit.png $type-64x64-24bit.png \
|
|
|
|
$type-48x48-24bit.png $type-32x32-24bit.png $type-24x24-24bit.png $type-16x16-24bit.png \
|
|
|
|
$type-256x256-8bit.png $type-128x128-8bit.png $type-64x64-8bit.png \
|
|
|
|
$type-48x48-8bit.png $type-32x32-8bit.png $type-24x24-8bit.png $type-16x16-8bit.png \
|
|
|
|
$type-256x256-4bit.png $type-128x128-4bit.png $type-64x64-4bit.png \
|
|
|
|
$type-48x48-4bit.png $type-32x32-4bit.png $type-24x24-4bit.png $type-16x16-4bit.png
|
|
|
|
|
|
|
|
|
|
|
|
# $type-256x256-24bit.png $type-180x180-24bit.png $type-150x150-24bit.png $type-128x128-24bit.png $type-96x96-24bit.png $type-72x72-24bit.png $type-64x64-24bit.png \
|
|
|
|
# $type-50x50-24bit.png $type-48x48-24bit.png $type-40x40-24bit.png $type-32x32-24bit.png $type-30x30-24bit.png $type-24x24-24bit.png $type-16x16-24bit.png \
|
|
|
|
# $type-256x256-8bit.png $type-180x180-8bit.png $type-150x150-8bit.png $type-128x128-8bit.png $type-96x96-8bit.png $type-72x72-8bit.png $type-64x64-8bit.png \
|
|
|
|
# $type-50x50-8bit.png $type-48x48-8bit.png $type-40x40-8bit.png $type-32x32-8bit.png $type-30x30-8bit.png $type-24x24-8bit.png $type-16x16-8bit.png \
|
|
|
|
# $type-256x256-4bit.png $type-180x180-4bit.png $type-150x150-4bit.png $type-128x128-4bit.png $type-96x96-4bit.png $type-72x72-4bit.png $type-64x64-4bit.png \
|
|
|
|
# $type-50x50-4bit.png $type-48x48-4bit.png $type-40x40-4bit.png $type-32x32-4bit.png $type-30x30-4bit.png $type-24x24-4bit.png $type-16x16-4bit.png
|
|
|
|
|
|
|
|
|
2013-05-07 17:03:05 +02:00
|
|
|
done
|
2013-05-09 08:58:53 +02:00
|
|
|
popd
|
2013-05-07 17:03:05 +02:00
|
|
|
|
|
|
|
cp $INST_DIR/CLIENT_DATA/ALL/Icons/*.ico $INST_DIR/CLIENT_DATA/X86/Icons
|
|
|
|
cp $INST_DIR/CLIENT_DATA/ALL/Icons/*.ico $INST_DIR/CLIENT_DATA/X86_64/Icons
|
2013-03-27 13:41:11 +01:00
|
|
|
|
2013-05-08 08:15:00 +02:00
|
|
|
rm -rf $INST_DIR/CLIENT_DATA/ALL/
|
2013-03-27 11:07:06 +01:00
|
|
|
}
|