Android release v6.7_preview1
[xcsoar.git] / tools / GenerateAndroidResources.pl
blobb4038a48010ceb7c520269dd2bdf63884213a999
1 #!/usr/bin/perl -w
3 use strict;
5 print <<EOT;
6 static const struct {
7 unsigned id;
8 const char *name;
9 } DrawableNames[] = {
10 EOT
12 while (<>) {
13 # merge adjacent strings
14 while (s/"([^"]*)"\s+"([^"]*)"\s*$/"$1$2"/) {}
16 print qq| { $1, \"$2\" },\n|
17 if /^\s*(\d+)\s+BITMAP\s+DISCARDABLE\s+"(?:.*\/)?([\w]+)\.png"\s*$/;
20 print <<EOT;
21 { 0, NULL }
23 EOT