head     1.1;
branch   1.1.1;
access   ;
symbols  unknown:1.1.1.1 orion:1.1.1;
locks    ; strict;
comment  @# @;


1.1
date     2008.01.09.19.34.17;  author chessman;  state Exp;
branches 1.1.1.1;
next     ;

1.1.1.1
date     2008.01.09.19.34.17;  author chessman;  state Exp;
branches ;
next     ;


desc
@@



1.1
log
@Initial revision
@
text
@#!/bin/bash

ECHO="echo.exe"

getsrcfile()
{
	devel=`echo $MK_DEVEL\\\\ | sed -e 's/\\\\/\\\\\\//g'`
	filename=`echo $1 | sed -e 's/\\\\/\\//g'`
	echo $filename | sed -e 's/'$devel'//g'
}

filepath=$2
prefix=$3
header="// AUTOMATICALLY GENERATED FILE\r\n"

case "$1" in

"caption")
	filename=$filepath/${prefix}.h
	srcfile=`getsrcfile $filename`
#	if [ -f $filename ]; then
		$ECHO -n $header"#define __SYMBIAN__\r\n#include \"`getsrcfile $filepath/${prefix}res.c`\"\r\n" > $MK_DEVEL/etc/$prefix.rss
		if [ $SYMBIANSDK -gt 2 ]; then
			if [ -f $filepath/$prefix.svg ]; then
				iconext=mif
			else
				iconext=mbm
			fi
			$ECHO -n "\r\n#include <appinfo.rh>\r\n#include \""$srcfile"\"\r\n\r\nRESOURCE LOCALISABLE_APP_INFO app_info\r\n{\r\n\tshort_caption = GEAPP_SHORT_NAME;\r\n\tcaption_and_icon =\r\n\t\r\n\tCAPTION_AND_ICON_INFO\r\n\t{\r\n\t\tcaption = GEAPP_NAME;\r\n\t\tnumber_of_icons = 1;\r\n\t\ticon_file = \"\\\\\\\\resource\\\\\\\\apps\\\\\\\\${prefix}_aif.$iconext\";\r\n\t};\r\n}\r\n" >> $MK_DEVEL/etc/$prefix.rss
		fi
		resname=$MK_DEVEL/etc/${prefix}_caption.rss
		$ECHO -n $header"#include <apcaptionfile.rh>\r\n#include \""$srcfile"\"\r\n\r\nRESOURCE CAPTION_DATA {\r\n\tcaption=GEAPP_NAME;\r\n\tshortcaption=GEAPP_SHORT_NAME;\r\n}\r\n" > $resname
		shift 3
		$@@ $resname
#	fi
;;


"aif")
	resname=${prefix}aif.rss
	$ECHO -n $header"#include <aiftool.rh>\r\n#include \""`getsrcfile $4`"\"\r\n\r\nRESOURCE AIF_DATA {\r\n\tapp_uid = SYMBIAN_APP_ID;\r\n\tnum_icons = 2;\r\n\tembeddability = KAppNotEmbeddable;\r\n\tnewfile = KAppDoesNotSupportNewFile;\r\n}\r\n" > $filepath/$resname

	shift 4
	cmd /c $MK_TEMPLATE_ROOT/etc/util/symicon.bat $prefix
	$@@ $MK_OUT/${prefix}.aif $filepath $resname c12 ${prefix}.bmp ${prefix}m.bmp ${prefix}s.bmp ${prefix}sm.bmp
;;

"reg")
	resname=${prefix}reg.rss
	$ECHO -n $header"\
#include <appinfo.rh>\r\n\
#include <$prefix.rsg>\r\n\r\n\
UID2 KUidAppRegistrationResourceFile\r\nUID3 " $4 "\r\n\
RESOURCE APP_REGISTRATION_INFO {\r\n\tapp_file=\""$prefix"\";\r\n\
\tlocalisable_resource_file = \"\\\\\\\\resource\\\\\\\\apps\\\\\\\\$prefix\";\r\n\
\tlocalisable_resource_id = APP_INFO;\r\n\
\tembeddability=KAppNotEmbeddable;\r\n\
\tnewfile=KAppDoesNotSupportNewFile;\r\n\
}" > $MK_DEVEL/etc/$resname
;;

esac
@


1.1.1.1
log
@make
@
text
@@
