summaryrefslogtreecommitdiff
path: root/tools/release/bins.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/release/bins.pl')
-rwxr-xr-xtools/release/bins.pl169
1 files changed, 169 insertions, 0 deletions
diff --git a/tools/release/bins.pl b/tools/release/bins.pl
new file mode 100755
index 0000000000..49fe8c1d73
--- /dev/null
+++ b/tools/release/bins.pl
@@ -0,0 +1,169 @@
1#!/usr/bin/perl
2
3$version="3.0";
4
5my $verbose;
6if($ARGV[0] eq "-v") {
7 $verbose =1;
8 shift @ARGV;
9}
10
11my $update;
12if($ARGV[0] eq "-u") {
13 $update =1;
14 shift @ARGV;
15}
16
17my $doonly;
18if($ARGV[0]) {
19 $doonly = $ARGV[0];
20 print "only build $doonly\n" if($verbose);
21}
22
23if($update) {
24 # svn update!
25 system("svn -q up");
26}
27
28$rev = `svnversion`;
29chomp $rev;
30print "rev $rev\n" if($verbose);
31
32# made once for all targets
33sub runone {
34 my ($dir, $confnum, $extra)=@_;
35 my $a;
36
37 if($doonly && ($doonly ne $dir)) {
38 return;
39 }
40
41 mkdir "build-$dir";
42 chdir "build-$dir";
43 print "Build in build-$dir\n" if($verbose);
44
45 # build the manual(s)
46 $a = buildit($dir, $confnum, $extra);
47
48 chdir "..";
49
50 my $o="build-$dir/rockbox.zip";
51 if (-f $o) {
52 my $newo="output/rockbox-$dir-$version.zip";
53 system("mkdir -p output");
54 system("mv $o $newo");
55 print "moved $o to $newo\n" if($verbose);
56 }
57
58 print "remove all contents in build-$dir\n" if($verbose);
59 system("rm -rf build-$dir");
60
61 return $a;
62};
63
64sub fonts {
65 my ($dir, $confnum, $newl)=@_;
66 my $a;
67
68 if($doonly && ($doonly ne $dir)) {
69 return;
70 }
71
72 mkdir "build-$dir";
73 chdir "build-$dir";
74 print "Build fonts in build-$dir\n" if($verbose);
75
76 # build the manual(s)
77 $a = buildfonts($dir, $confnum, $newl);
78
79 chdir "..";
80
81 my $o="build-$dir/rockbox-fonts.zip";
82 if (-f $o) {
83 my $newo="output/rockbox-fonts-$version.zip";
84 system("mv $o $newo");
85 print "moved $o to $newo\n" if($verbose);
86 }
87
88 print "remove all contents in build-$dir\n" if($verbose);
89 system("rm -rf build-$dir");
90
91 return $a;
92};
93
94
95
96sub buildit {
97 my ($target, $confnum, $extra)=@_;
98
99 `rm -rf * >/dev/null 2>&1`;
100
101 my $c = sprintf('echo -e "%s\n%sn\n" | ../tools/configure',
102 $confnum, $extra);
103
104 print "C: $c\n" if($verbose);
105 `$c`;
106
107 print "Run 'make'\n" if($verbose);
108 `make -j 2>/dev/null`;
109
110 print "Run 'make zip'\n" if($verbose);
111 `make zip 2>/dev/null`;
112
113 print "Run 'make mapzip'\n" if($verbose);
114 `make mapzip 2>/dev/null`;
115}
116
117sub buildfonts {
118 my ($target, $confnum, $newl)=@_;
119
120 `rm -rf * >/dev/null 2>&1`;
121
122 my $c = sprintf('echo -e "%s\n%sn\n" | ../tools/configure',
123 $confnum, $newl?'\n':'');
124
125 print "C: $c\n" if($verbose);
126 `$c`;
127
128 print "Run 'make fontzip'\n" if($verbose);
129 `make fontzip 2>/dev/null`;
130}
131
132# run make in tools first to make sure they're up-to-date
133print "cd tools && make\n" if($verbose);
134`(cd tools && make ) >/dev/null 2>&1`;
135
136runone("player", "player", '\n');
137runone("recorder", "recorder", '\n');
138runone("recorder8mb", "recorder", '8\n');
139runone("fmrecorder", "fmrecorder", '\n');
140runone("fmrecorder8mb", "fmrecorder", '8\n');
141runone("recorderv2", "recorderv2", '\n');
142runone("ondiosp", "ondiosp", '\n');
143runone("ondiofm", "ondiofm", '\n');
144runone("h100", "h100");
145runone("h120", "h120");
146runone("h300", "h300");
147runone("ipodcolor", "ipodcolor");
148runone("ipodnano", "ipodnano");
149runone("ipod4gray", "ipod4g");
150runone("ipodvideo", "ipodvideo", '32\n');
151runone("ipodvideo64mb", "ipodvideo", '64\n');
152runone("ipod3g", "ipod3g");
153runone("ipod1g2g", "ipod1g2g");
154runone("iaudiox5", "x5");
155runone("iaudiom5", "m5");
156runone("iaudiom3", "m3");
157runone("ipodmini1g", "ipodmini");
158runone("ipodmini2g", "ipodmini2g");
159runone("h10", "h10");
160runone("h10_5gb", "h10_5gb");
161runone("gigabeatf", "gigabeatf");
162runone("sansae200", "e200");
163runone("sansac200", "c200");
164#runone("mrobe500", "mrobe500");
165runone("mrobe100", "mrobe100");
166runone("cowond2", "cowond2");
167fonts("fonts", "x5");
168
169