summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-07-30 20:47:25 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-07-30 20:47:25 +0000
commitd73c81f912f51abcfb034ed3e563fd4b39db5854 (patch)
tree2bedc4c76cb29f1d06ef3bc91eadbe3035cccbcc
parent66f8c73dcdcf98b8c6c2ed0f3c83be19f02dad59 (diff)
downloadrockbox-d73c81f912f51abcfb034ed3e563fd4b39db5854.tar.gz
rockbox-d73c81f912f51abcfb034ed3e563fd4b39db5854.zip
Theme Editor: Modified buildtargetdb.php to read targets list from tools/builds.pm using includetargets.pl
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27630 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-xutils/themeeditor/buildtargetdb.php76
-rwxr-xr-xutils/themeeditor/includetargets.pl58
-rw-r--r--utils/themeeditor/resources/targetdb322
3 files changed, 339 insertions, 117 deletions
diff --git a/utils/themeeditor/buildtargetdb.php b/utils/themeeditor/buildtargetdb.php
index 26b6f119c2..a5ae650426 100755
--- a/utils/themeeditor/buildtargetdb.php
+++ b/utils/themeeditor/buildtargetdb.php
@@ -25,63 +25,21 @@
25echo "# ----------------------------------------------------------- #\n"; 25echo "# ----------------------------------------------------------- #\n";
26echo "# ----------------------------------------------------------- #\n"; 26echo "# ----------------------------------------------------------- #\n";
27echo "# --- This file automatically generated, do not modify! --- #\n"; 27echo "# --- This file automatically generated, do not modify! --- #\n";
28echo "# --- To add a target to the targetdb, add it to the --- #\n";
29echo "# --- \$targets array in buildtargetdb.php and run that --- #\n";
30echo "# --- script, ensuring that your current directory is --- #\n";
31echo "# --- utils/themeeditor, and pipe the output into --- #\n";
32echo "# --- utils/themeeditor/resources/targetdb --- #\n";
33echo "# ----------------------------------------------------------- #\n"; 28echo "# ----------------------------------------------------------- #\n";
34echo "# ----------------------------------------------------------- #\n\n"; 29echo "# ----------------------------------------------------------- #\n\n";
35 30
36// This is the array of targets, with the target id as the key and the 31// Importing the target array
37// plaintext name of the target as the value 32system('./includetargets.pl');
38$targets = array( 'archosfmrecorder' => 'Archos FM Recorder', 33require('./targets.php');
39 'archosondiofm' => 'Archos Ondio FM', 34unlink('./targets.php');
40 'archosondiosp' => 'Archos Ondio SP',
41 'archosplayer' => 'Archos Player/Studio',
42 'archosrecorder' => 'Archos Recorder v1',
43 'archosrecorderv2' => 'Archos Recorder v2',
44 'cowond2' => 'Cowon D2',
45 'iaudiom3' => 'iAudio M3',
46 'iaudiom5' => 'iAudio M5',
47 'iaudiox5' => 'iAudio X5',
48 'ipod1g2g' => 'iPod 1st and 2nd gen',
49 'ipod3g' => 'iPod 3rd gen',
50 'ipod4g' => 'iPod 4th gen Grayscale',
51 'ipodcolor' => 'iPod Color/Photo',
52 'ipodmini1g' => 'iPod Mini 1st gen',
53 'ipodmini2g' => 'iPod Mini 2nd gen',
54 'ipodnano1g' => 'iPod Nano 1st gen',
55 'ipodnano2g' => 'iPod Nano 2nd gen',
56 'ipodvideo' => 'iPod Video',
57 'iriverh10' => 'iriver H10 20GB',
58 'iriverh10_5gb' => 'iriver H10 5GB',
59 'iriverh100' => 'iriver H100/115',
60 'iriverh120' => 'iriver H120/140',
61 'iriverh300' => 'iriver H320/340',
62 'mrobe100' => 'Olympus M-Robe 100',
63 'mrobe500' => 'Olympus M-Robe 500',
64 'vibe500' => 'Packard Bell Vibe 500',
65 'samsungyh820' => 'Samsung YH-820',
66 'samsungyh920' => 'Samsung YH-920',
67 'samsungyh925' => 'Samsung YH-925',
68 'sansac200' => 'SanDisk Sansa c200',
69 'sansaclip' => 'SanDisk Sansa Clip v1',
70 'sansaclipv2' => 'SanDisk Sansa Clip v2',
71 'sansaclipplus' => 'SanDisk Sansa Clip+',
72 'sansae200' => 'SanDisk Sansa e200',
73 'sansae200v2' => 'SanDisk Sansa e200 v2',
74 'sansafuze' => 'SanDisk Sansa Fuze',
75 'sansafuzev2' => 'SanDisk Sansa Fuze v2',
76 'gigabeatfx' => 'Toshiba Gigabeat F/X',
77 'gigabeats' => 'Toshiba Gigabeat S'
78 );
79 35
80// Looping through all the targets 36// Looping through all the targets
81foreach($targets as $target => $plaintext) 37foreach($targets as $target => $plaintext)
82{ 38{
83 // Opening a cpp process 39 // Opening a cpp process
84 $configfile = '../../firmware/export/config/' . $target . '.h'; 40 $configfile = '../../firmware/export/config/' . $target . '.h';
41 if(!file_exists($configfile))
42 continue;
85 $descriptor = array( 0 => array("pipe", "r"), //stdin 43 $descriptor = array( 0 => array("pipe", "r"), //stdin
86 1 => array("pipe", "w") //stdout 44 1 => array("pipe", "w") //stdout
87 ); 45 );
@@ -122,15 +80,19 @@ STR;
122 fclose($pipes[1]); 80 fclose($pipes[1]);
123 $results = explode("\n", $results); 81 $results = explode("\n", $results);
124 82
83 $base = 0;
84 while($results[$base] != 'lcd')
85 $base++;
86
125 // Header for the target 87 // Header for the target
126 echo $target . "\n{\n"; 88 echo $target . "\n{\n";
127 echo ' name : ' . $plaintext . "\n"; 89 echo ' name : ' . $plaintext . "\n";
128 90
129 // Writing the LCD dimensions 91 // Writing the LCD dimensions
130 echo ' screen : ' . $results[7] . ' x ' . $results[8] . ' @ '; 92 echo ' screen : ' . $results[$base + 1] . ' x ' . $results[$base + 2] . ' @ ';
131 if($results[9] == 1) 93 if($results[$base + 3] == 1)
132 echo 'mono'; 94 echo 'mono';
133 else if($results[10] == 2) 95 else if($results[$base + 3] == 2)
134 echo 'grey'; 96 echo 'grey';
135 else 97 else
136 echo 'rgb'; 98 echo 'rgb';
@@ -138,16 +100,16 @@ STR;
138 100
139 // Writing the remote dimensions if necessary 101 // Writing the remote dimensions if necessary
140 echo ' remote : '; 102 echo ' remote : ';
141 if($results[12] == 0) 103 if($results[$base + 6] == 0)
142 { 104 {
143 echo 'no'; 105 echo 'no';
144 } 106 }
145 else 107 else
146 { 108 {
147 echo $results[12] . ' x ' .$results[13] . ' @ '; 109 echo $results[$base + 6] . ' x ' .$results[$base + 7] . ' @ ';
148 if($results[14] == 1) 110 if($results[$base + 8] == 1)
149 echo 'mono'; 111 echo 'mono';
150 else if($results[14] == 2) 112 else if($results[$base + 8] == 2)
151 echo 'grey'; 113 echo 'grey';
152 else 114 else
153 echo 'rgb'; 115 echo 'rgb';
@@ -156,7 +118,7 @@ STR;
156 118
157 // Writing FM capability 119 // Writing FM capability
158 echo ' fm : '; 120 echo ' fm : ';
159 if($results[18] == 'yes') 121 if($results[$base + 12] == 'yes')
160 echo 'yes'; 122 echo 'yes';
161 else 123 else
162 echo 'no'; 124 echo 'no';
@@ -164,7 +126,7 @@ STR;
164 126
165 // Writing record capability 127 // Writing record capability
166 echo ' record : '; 128 echo ' record : ';
167 if($results[22] == 'yes') 129 if($results[$base + 16] == 'yes')
168 echo 'yes'; 130 echo 'yes';
169 else 131 else
170 echo 'no'; 132 echo 'no';
diff --git a/utils/themeeditor/includetargets.pl b/utils/themeeditor/includetargets.pl
new file mode 100755
index 0000000000..3708c6a55c
--- /dev/null
+++ b/utils/themeeditor/includetargets.pl
@@ -0,0 +1,58 @@
1#!/usr/bin/perl
2
3###########################################################################
4# __________ __ ___.
5# Open \______ \ ____ ____ | | _\_ |__ _______ ___
6# Source | _ / _ \_/ ___\| |/ /| __ \ / _ \ \/ /
7# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
8# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
9# \/ \/ \/ \/ \/
10# $Id$
11#
12# Copyright (C) 2010 Robert Bieber
13#
14# This program is free software; you can redistribute it and/or
15# modify it under the terms of the GNU General Public License
16# as published by the Free Software Foundation; either version 2
17# of the License, or (at your option) any later version.
18#
19# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20# KIND, either express or implied.
21#
22############################################################################/
23
24require '../../tools/builds.pm';
25
26open(FOUT, ">targets.php");
27
28print FOUT '<?php $targets = array(';
29
30@keys = sort byname keys %builds;
31$size = @keys;
32$final = @keys[$size - 1];
33for my $b (@keys)
34{
35 $key = $b;
36 $key =~ s/:/%:/;
37 $name = $builds{$b}{name};
38 $name =~ s/:/%:/;
39
40 print FOUT "\"$key\"" . "=>" . '"' . $name . '"' if ($builds{$b}{status} >= 3);
41 print FOUT ',' if $b ne $final && $builds{$b}{status} >= 3;
42}
43
44for my $b (@keys)
45{
46 $key = $b;
47 $key =~ s/:/%:/;
48 $name = $builds{$b}{name};
49 $name =~ s/:/%:/;
50
51 print FOUT "\"$key\"" . "=>" . '"' . $name . '"' if ($builds{$b}{status} < 3);
52 print FOUT ',' if $b ne $final && $builds{$b}{status} < 3;
53}
54
55print FOUT '); ?>';
56
57close(FOUT);
58
diff --git a/utils/themeeditor/resources/targetdb b/utils/themeeditor/resources/targetdb
index e466747b88..18977b305a 100644
--- a/utils/themeeditor/resources/targetdb
+++ b/utils/themeeditor/resources/targetdb
@@ -1,11 +1,6 @@
1# ----------------------------------------------------------- # 1# ----------------------------------------------------------- #
2# ----------------------------------------------------------- # 2# ----------------------------------------------------------- #
3# --- This file automatically generated, do not modify! --- # 3# --- This file automatically generated, do not modify! --- #
4# --- To add a target to the targetdb, add it to the --- #
5# --- $targets array in buildtargetdb.php and run that --- #
6# --- script, ensuring that your current directory is --- #
7# --- utils/themeeditor, and pipe the output into --- #
8# --- utils/themeeditor/resources/targetdb --- #
9# ----------------------------------------------------------- # 4# ----------------------------------------------------------- #
10# ----------------------------------------------------------- # 5# ----------------------------------------------------------- #
11 6
@@ -63,19 +58,10 @@ archosrecorderv2
63 record : yes 58 record : yes
64} 59}
65 60
66cowond2
67{
68 name : Cowon D2
69 screen : 320 x 240 @ rgb
70 remote : no
71 fm : yes
72 record : no
73}
74
75iaudiom3 61iaudiom3
76{ 62{
77 name : iAudio M3 63 name : iAudio M3
78 screen : 128 x 96 @ rgb 64 screen : 128 x 96 @ grey
79 remote : no 65 remote : no
80 fm : yes 66 fm : yes
81 record : yes 67 record : yes
@@ -84,7 +70,7 @@ iaudiom3
84iaudiom5 70iaudiom5
85{ 71{
86 name : iAudio M5 72 name : iAudio M5
87 screen : 160 x 128 @ rgb 73 screen : 160 x 128 @ grey
88 remote : 128 x 96 @ grey 74 remote : 128 x 96 @ grey
89 fm : no 75 fm : no
90 record : yes 76 record : yes
@@ -102,7 +88,7 @@ iaudiox5
102ipod1g2g 88ipod1g2g
103{ 89{
104 name : iPod 1st and 2nd gen 90 name : iPod 1st and 2nd gen
105 screen : 160 x 128 @ rgb 91 screen : 160 x 128 @ grey
106 remote : no 92 remote : no
107 fm : no 93 fm : no
108 record : no 94 record : no
@@ -111,7 +97,7 @@ ipod1g2g
111ipod3g 97ipod3g
112{ 98{
113 name : iPod 3rd gen 99 name : iPod 3rd gen
114 screen : 160 x 128 @ rgb 100 screen : 160 x 128 @ grey
115 remote : no 101 remote : no
116 fm : no 102 fm : no
117 record : no 103 record : no
@@ -120,7 +106,7 @@ ipod3g
120ipod4g 106ipod4g
121{ 107{
122 name : iPod 4th gen Grayscale 108 name : iPod 4th gen Grayscale
123 screen : 160 x 128 @ rgb 109 screen : 160 x 128 @ grey
124 remote : no 110 remote : no
125 fm : yes 111 fm : yes
126 record : yes 112 record : yes
@@ -128,7 +114,7 @@ ipod4g
128 114
129ipodcolor 115ipodcolor
130{ 116{
131 name : iPod Color/Photo 117 name : iPod color/Photo
132 screen : 220 x 176 @ rgb 118 screen : 220 x 176 @ rgb
133 remote : no 119 remote : no
134 fm : yes 120 fm : yes
@@ -138,7 +124,7 @@ ipodcolor
138ipodmini1g 124ipodmini1g
139{ 125{
140 name : iPod Mini 1st gen 126 name : iPod Mini 1st gen
141 screen : 138 x 110 @ rgb 127 screen : 138 x 110 @ grey
142 remote : no 128 remote : no
143 fm : no 129 fm : no
144 record : no 130 record : no
@@ -147,7 +133,7 @@ ipodmini1g
147ipodmini2g 133ipodmini2g
148{ 134{
149 name : iPod Mini 2nd gen 135 name : iPod Mini 2nd gen
150 screen : 138 x 110 @ rgb 136 screen : 138 x 110 @ grey
151 remote : no 137 remote : no
152 fm : no 138 fm : no
153 record : no 139 record : no
@@ -162,18 +148,9 @@ ipodnano1g
162 record : yes 148 record : yes
163} 149}
164 150
165ipodnano2g
166{
167 name : iPod Nano 2nd gen
168 screen : 176 x 132 @ rgb
169 remote : no
170 fm : no
171 record : no
172}
173
174ipodvideo 151ipodvideo
175{ 152{
176 name : iPod Video 153 name : iPod Video 30GB
177 screen : 320 x 240 @ rgb 154 screen : 320 x 240 @ rgb
178 remote : no 155 remote : no
179 fm : yes 156 fm : yes
@@ -201,7 +178,7 @@ iriverh10_5gb
201iriverh100 178iriverh100
202{ 179{
203 name : iriver H100/115 180 name : iriver H100/115
204 screen : 160 x 128 @ rgb 181 screen : 160 x 128 @ grey
205 remote : 128 x 64 @ mono 182 remote : 128 x 64 @ mono
206 fm : yes 183 fm : yes
207 record : yes 184 record : yes
@@ -210,7 +187,7 @@ iriverh100
210iriverh120 187iriverh120
211{ 188{
212 name : iriver H120/140 189 name : iriver H120/140
213 screen : 160 x 128 @ rgb 190 screen : 160 x 128 @ grey
214 remote : 128 x 64 @ mono 191 remote : 128 x 64 @ mono
215 fm : yes 192 fm : yes
216 record : yes 193 record : yes
@@ -234,6 +211,177 @@ mrobe100
234 record : no 211 record : no
235} 212}
236 213
214vibe500
215{
216 name : Packard Bell Vibe 500
217 screen : 160 x 128 @ rgb
218 remote : no
219 fm : no
220 record : yes
221}
222
223sansac200
224{
225 name : SanDisk Sansa c200
226 screen : 132 x 80 @ rgb
227 remote : no
228 fm : yes
229 record : yes
230}
231
232sansae200
233{
234 name : SanDisk Sansa e200
235 screen : 176 x 220 @ rgb
236 remote : no
237 fm : yes
238 record : yes
239}
240
241sansae200v2
242{
243 name : SanDisk Sansa e200 v2
244 screen : 176 x 220 @ rgb
245 remote : no
246 fm : yes
247 record : yes
248}
249
250sansafuze
251{
252 name : SanDisk Sansa Fuze
253 screen : 220 x 176 @ rgb
254 remote : no
255 fm : yes
256 record : yes
257}
258
259gigabeatfx
260{
261 name : Toshiba Gigabeat F/X
262 screen : 240 x 320 @ rgb
263 remote : no
264 fm : no
265 record : no
266}
267
268cowond2
269{
270 name : Cowon D2
271 screen : 320 x 240 @ rgb
272 remote : no
273 fm : yes
274 record : no
275}
276
277zenvision
278{
279 name : Creative Zen Vision
280 screen : 320 x 240 @ rgb
281 remote : no
282 fm : no
283 record : no
284}
285
286zenvisionm30gb
287{
288 name : Creative Zen Vision%:M 30GB
289 screen : 320 x 240 @ rgb
290 remote : no
291 fm : no
292 record : no
293}
294
295zenvisionm60gb
296{
297 name : Creative Zen Vision%:M 60GB
298 screen : 320 x 240 @ rgb
299 remote : no
300 fm : no
301 record : no
302}
303
304iaudio7
305{
306 name : iAudio 7
307 screen : 160 x 128 @ rgb
308 remote : no
309 fm : yes
310 record : yes
311}
312
313ipodnano2g
314{
315 name : iPod Nano 2nd gen
316 screen : 176 x 132 @ rgb
317 remote : no
318 fm : no
319 record : no
320}
321
322iriverifp7xx
323{
324 name : iriver iFP-7xx
325 screen : 128 x 64 @ mono
326 remote : no
327 fm : no
328 record : no
329}
330
331logikdax
332{
333 name : Logik DAX
334 screen : 128 x 64 @ mono
335 remote : no
336 fm : no
337 record : no
338}
339
340lyreproto1
341{
342 name : Lyre Prototype 1
343 screen : 128 x 128 @ rgb
344 remote : no
345 fm : no
346 record : no
347}
348
349meizum3
350{
351 name : Meizu M3
352 screen : 176 x 132 @ rgb
353 remote : no
354 fm : yes
355 record : no
356}
357
358meizum6sl
359{
360 name : Meizu M6SL
361 screen : 320 x 240 @ rgb
362 remote : no
363 fm : yes
364 record : no
365}
366
367meizum6sp
368{
369 name : Meizu M6SP
370 screen : 240 x 320 @ rgb
371 remote : no
372 fm : yes
373 record : no
374}
375
376mini2440
377{
378 name : Mini 2440
379 screen : 240 x 320 @ rgb
380 remote : no
381 fm : no
382 record : no
383}
384
237mrobe500 385mrobe500
238{ 386{
239 name : Olympus M-Robe 500 387 name : Olympus M-Robe 500
@@ -243,15 +391,51 @@ mrobe500
243 record : no 391 record : no
244} 392}
245 393
246vibe500 394ondavx747
247{ 395{
248 name : Packard Bell Vibe 500 396 name : Onda VX747
249 screen : 160 x 128 @ rgb 397 screen : 240 x 400 @ rgb
250 remote : no 398 remote : no
251 fm : no 399 fm : yes
400 record : no
401}
402
403ondavx767
404{
405 name : Onda VX767
406 screen : 320 x 240 @ rgb
407 remote : no
408 fm : yes
409 record : no
410}
411
412ondavx777
413{
414 name : Onda VX777
415 screen : 240 x 400 @ rgb
416 remote : no
417 fm : yes
418 record : no
419}
420
421gogearhdd1630
422{
423 name : Philips GoGear HDD1630
424 screen : 128 x 128 @ rgb
425 remote : no
426 fm : yes
252 record : yes 427 record : yes
253} 428}
254 429
430gogearsa9200
431{
432 name : Philips GoGear SA9200
433 screen : 128 x 160 @ rgb
434 remote : no
435 fm : no
436 record : no
437}
438
255samsungyh820 439samsungyh820
256{ 440{
257 name : Samsung YH-820 441 name : Samsung YH-820
@@ -264,7 +448,7 @@ samsungyh820
264samsungyh920 448samsungyh920
265{ 449{
266 name : Samsung YH-920 450 name : Samsung YH-920
267 screen : 160 x 128 @ rgb 451 screen : 160 x 128 @ grey
268 remote : no 452 remote : no
269 fm : no 453 fm : no
270 record : no 454 record : no
@@ -279,9 +463,27 @@ samsungyh925
279 record : no 463 record : no
280} 464}
281 465
282sansac200 466samsungyps3
283{ 467{
284 name : SanDisk Sansa c200 468 name : Samsung YP-S3
469 screen : 176 x 220 @ rgb
470 remote : no
471 fm : yes
472 record : no
473}
474
475sansac100
476{
477 name : SanDisk Sansa c100
478 screen : 128 x 64 @ rgb
479 remote : no
480 fm : no
481 record : no
482}
483
484sansac200v2
485{
486 name : SanDisk Sansa c200 v2
285 screen : 132 x 80 @ rgb 487 screen : 132 x 80 @ rgb
286 remote : no 488 remote : no
287 fm : yes 489 fm : yes
@@ -315,46 +517,46 @@ sansaclipplus
315 record : yes 517 record : yes
316} 518}
317 519
318sansae200 520sansafuzev2
319{ 521{
320 name : SanDisk Sansa e200 522 name : SanDisk Sansa Fuze v2
321 screen : 176 x 220 @ rgb 523 screen : 220 x 176 @ rgb
322 remote : no 524 remote : no
323 fm : yes 525 fm : yes
324 record : yes 526 record : yes
325} 527}
326 528
327sansae200v2 529sansam200
328{ 530{
329 name : SanDisk Sansa e200 v2 531 name : SanDisk Sansa m200
330 screen : 176 x 220 @ rgb 532 screen : 128 x 64 @ mono
331 remote : no 533 remote : no
332 fm : yes 534 fm : no
333 record : yes 535 record : no
334} 536}
335 537
336sansafuze 538sansam200v4
337{ 539{
338 name : SanDisk Sansa Fuze 540 name : SanDisk Sansa m200 v4
339 screen : 220 x 176 @ rgb 541 screen : 128 x 64 @ mono
340 remote : no 542 remote : no
341 fm : yes 543 fm : yes
342 record : yes 544 record : yes
343} 545}
344 546
345sansafuzev2 547sansaview
346{ 548{
347 name : SanDisk Sansa Fuze v2 549 name : SanDisk Sansa View
348 screen : 220 x 176 @ rgb 550 screen : 240 x 320 @ rgb
349 remote : no 551 remote : no
350 fm : yes 552 fm : no
351 record : yes 553 record : no
352} 554}
353 555
354gigabeatfx 556tatungtpj1022
355{ 557{
356 name : Toshiba Gigabeat F/X 558 name : Tatung Elio TPJ-1022
357 screen : 240 x 320 @ rgb 559 screen : 220 x 176 @ rgb
358 remote : no 560 remote : no
359 fm : no 561 fm : no
360 record : no 562 record : no