From 3458675b5ee4c207798707981f11844ae5cc0f41 Mon Sep 17 00:00:00 2001 From: yosiokat Date: Thu, 15 May 2008 11:55:45 +0000 Subject: [PATCH] =?UTF-8?q?=E5=85=B1=E6=9C=89=E3=83=95=E3=82=A9=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=83=86=E3=83=BC=E3=83=96=E3=83=AB=E3=81=AE=E3=82=BF?= =?UTF-8?q?=E3=82=A4=E3=83=A0=E3=82=B9=E3=82=BF=E3=83=B3=E3=83=97=E3=82=92?= =?UTF-8?q?=E5=BC=95=E6=95=B0=E3=81=A7=E4=B8=8E=E3=81=88=E3=82=8C=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E5=A4=89=E6=9B=B4=E3=80=82=20=E5=85=B1?= =?UTF-8?q?=E6=9C=89=E3=83=95=E3=82=A9=E3=83=B3=E3=83=88=E3=83=86=E3=83=BC?= =?UTF-8?q?=E3=83=96=E3=83=AB=E3=81=AE=E3=82=A8=E3=83=B3=E3=83=88=E3=83=AA?= =?UTF-8?q?=E3=81=ABNULL=E3=82=A8=E3=83=B3=E3=83=88=E3=83=AA=E3=82=92?= =?UTF-8?q?=E5=8A=A0=E3=81=88=E3=82=89=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1366 b08762b0-b915-fc4b-9d8c-17b2551a87ff --- build/systemMenu_RED/sharedFont/Makefile | 3 ++- tools/bin/genFontTable.plx | 30 ++++++++++++++++++------ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/build/systemMenu_RED/sharedFont/Makefile b/build/systemMenu_RED/sharedFont/Makefile index fbfeb8a9..aa12d9b2 100644 --- a/build/systemMenu_RED/sharedFont/Makefile +++ b/build/systemMenu_RED/sharedFont/Makefile @@ -20,6 +20,7 @@ TARGET_FIRM = SYSTEMMENU include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs +FONT_TIMESTAMP = 08041700 FONT_DIR = WW FONTS = TWL_BF00_l.NFTR \ TWL_BF00_m.NFTR \ @@ -45,6 +46,6 @@ include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules do-build : $(FONT_TABLE) $(FONT_TABLE): $(FONT_RSC) - $(GEN_FONT_TABLE) $(FONT_RSC) + $(GEN_FONT_TABLE) $(FONT_TIMESTAMP) $(FONT_RSC) #===== End of Makefile ===== diff --git a/tools/bin/genFontTable.plx b/tools/bin/genFontTable.plx index 268dc874..7db4a83c 100644 --- a/tools/bin/genFontTable.plx +++ b/tools/bin/genFontTable.plx @@ -28,8 +28,8 @@ use POSIX 'strftime'; use File::Basename; -if ($#ARGV < 1) { - printf STDOUT ("Usage: %s [genFontTable] [Target font files...]\n", $0); +if ($#ARGV < 2) { + printf STDOUT ("Usage: %s [genFontTable] timestamp [Target font files...]\n", $0); exit(-1); } @@ -51,10 +51,13 @@ sub deleteTemp { my $signSize = 0x80; my $headerSize = 0x20; +my @files; # 要素数算出 my $num = 0; foreach ( @ARGV ) { + next if( $_ eq $ARGV[0] ); + $files[ $num ] = $_; $num++; } @@ -74,7 +77,13 @@ foreach ( @ARGV ) { my $offset = $signSize + $headerSize + $num * $elementSize; if( ( $offset % 32 ) > 0 ) { $offset += 32 - ( $offset % 32 ); } - foreach ( @ARGV ) { + foreach ( @files ) { + # NULL指定時は、NULL出力 + if( "NULL" eq basename( $_ ) ) { + syswrite( INFO, pack( "x$elementSize") ); + next; + } + # ファイルネームの出力 if( !( -e $_ ) ) { close( INFO ); @@ -132,8 +141,10 @@ foreach ( @ARGV ) { binmode HEADER; # タイムスタンプの出力 - my $date = strftime "%y%m%d%H", localtime; - syswrite( HEADER, pack( "H8", $date ) ); +# my $timestamp = strftime "%y%m%d%H", localtime; + my $timestamp = $ARGV[ 0 ]; + printf "timestamp = %s\n", $timestamp; + syswrite( HEADER, pack( "N", unpack( "L", pack( "H8", $timestamp ) ) ) ); # 要素数の出力 syswrite( HEADER, pack( "S", $num ) ); @@ -187,8 +198,13 @@ if (!$KEYROOT) { my $padding = pack( "x$padNum" ); syswrite( FONTTABLE, $padding, $padNum ); } - - foreach ( @ARGV ) { + + foreach ( @files ) { + # NULL指定時はスキップ + if( "NULL" eq basename( $_ ) ) { + next; + } + # フォント出力 my $fileLen = -s $_; open TEST, $_ or die;