Changeset 4431
- Timestamp:
- 04/14/09 23:32:57 (4 years ago)
- Files:
-
- 1 modified
-
luci/trunk/build/mklar.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
luci/trunk/build/mklar.pl
r4430 r4431 40 40 41 41 # Skip .svn foo 42 ( $File::Find::name !~ m{/\.svn\z} ) || return; 43 44 # Skip non-lua files 45 ( $File::Find::name =~ m{\.lua\z} ) || return; 46 47 # Skip i18n files 48 ( $File::Find::name !~ m{/i18n/} ) || return; 49 50 # Exclude cbi models and controllers for now 51 ( $File::Find::name !~ m{/controller/} && $File::Find::name !~ m{/model/cbi/} ) || return; 42 ( $File::Find::name !~ m{/\.svn\b} ) || return; 52 43 53 44 # Exclude luci-statistics and lucittpd for now … … 58 49 $file =~ s{^.+/luasrc/}{luci/}; 59 50 60 if( open F, "< $_" ) 51 my $command = ( $File::Find::name =~ m{\.lua\z} && $ENV{LUAC} ) 52 ? "$ENV{LUAC} -o - $_ |" : "< $_"; 53 54 if( open F, $command ) 61 55 { 62 56 warn sprintf "Member at 0x%08X: %s\n", $offset, $file; … … 67 61 68 62 $index[-1][0] = $offset; 69 63 70 64 while( read F, my $buffer, 4096 ) { 71 65 $size += length $buffer; … … 98 92 my $listsize = length $filelist; 99 93 push @index, [ $offset, $listsize, "", 0xFFFF, undef ]; 100 warn sprintf "Filelist at 0x%08X\n", $offset; 94 95 warn sprintf "Filelist at 0x%08X, length 0x%08X\n", $offset, $listsize; 96 97 print $filelist; 98 $offset += $listsize; 101 99 102 100 if( $listsize % 4 ) 103 101 { 104 $ listsize+= ( 4 - ($listsize % 4) );105 $filelist .="\0" x ( 4 - ($listsize % 4) );102 $offset += ( 4 - ($listsize % 4) ); 103 print "\0" x ( 4 - ($listsize % 4) ); 106 104 } 107 108 print $filelist;109 $offset += $listsize;110 105 111 106
