summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/buildzip.pl51
1 files changed, 38 insertions, 13 deletions
diff --git a/tools/buildzip.pl b/tools/buildzip.pl
index 1942071565..eabf739d0d 100755
--- a/tools/buildzip.pl
+++ b/tools/buildzip.pl
@@ -10,24 +10,49 @@
10 10
11$ROOT=".."; 11$ROOT="..";
12 12
13if($ARGV[0] eq "-r") {
14 $ROOT=$ARGV[1];
15 shift @ARGV;
16 shift @ARGV;
17}
18 13
14
15my $ziptool="zip";
16my $output="rockbox.zip";
19my $verbose; 17my $verbose;
20if($ARGV[0] eq "-v") { 18my $exe;
21 $verbose =1; 19my $target;
22 shift @ARGV; 20
21while(1) {
22 if($ARGV[0] eq "-r") {
23 $ROOT=$ARGV[1];
24 shift @ARGV;
25 shift @ARGV;
26 }
27
28 elsif($ARGV[0] eq "-z") {
29 $ziptool=$ARGV[1];
30 shift @ARGV;
31 shift @ARGV;
32 }
33
34 elsif($ARGV[0] eq "-o") {
35 $output=$ARGV[1];
36 shift @ARGV;
37 shift @ARGV;
38 }
39
40 elsif($ARGV[0] eq "-v") {
41 $verbose =1;
42 shift @ARGV;
43 }
44 else {
45 $target = $ARGV[0];
46 $exe = $ARGV[1];
47 last;
48 }
23} 49}
24 50
51
25my $firmdir="$ROOT/firmware"; 52my $firmdir="$ROOT/firmware";
26 53
27my $target = $ARGV[0];
28my $cppdef = $target; 54my $cppdef = $target;
29 55
30my $exe = $ARGV[1];
31 56
32sub filesize { 57sub filesize {
33 my ($filename)=@_; 58 my ($filename)=@_;
@@ -198,10 +223,10 @@ sub buildzip {
198 buildlangs(".rockbox/langs"); 223 buildlangs(".rockbox/langs");
199 224
200 `rm -f $zip`; 225 `rm -f $zip`;
201 `find .rockbox | zip $zip -@ >/dev/null`; 226 `find .rockbox | xargs $ziptool $zip >/dev/null`;
202 227
203 if($image) { 228 if($image) {
204 `zip $zip $image`; 229 `$ziptool $zip $image`;
205 } 230 }
206 231
207 # remove the .rockbox afterwards 232 # remove the .rockbox afterwards
@@ -222,7 +247,7 @@ sub runone {
222 my ($type, $target)=@_; 247 my ($type, $target)=@_;
223 248
224 # build a full install zip file 249 # build a full install zip file
225 buildzip("rockbox.zip", $target, 250 buildzip($output, $target,
226 ($type eq "player")?0:1); 251 ($type eq "player")?0:1);
227}; 252};
228 253