forked from len0rd/rockbox
autoconf.pl: Add support for build folders with screen resolution (e.g. build-android-320x480).
Change-Id: If2ab767f44db604177a0028e86100633631ca8b8
This commit is contained in:
parent
d220940443
commit
0d5883d07a
1 changed files with 25 additions and 3 deletions
|
@ -30,7 +30,7 @@ my @dirs = split(/\//, $builddir);
|
||||||
my $test = pop(@dirs);
|
my $test = pop(@dirs);
|
||||||
|
|
||||||
sub doconfigure {
|
sub doconfigure {
|
||||||
my ($target, $type) = @_;
|
my ($target, $type, $width, $height) = @_;
|
||||||
if (!exists($builds{$target})) {
|
if (!exists($builds{$target})) {
|
||||||
for $key (keys(%builds)) {
|
for $key (keys(%builds)) {
|
||||||
if ($key =~ $target) {
|
if ($key =~ $target) {
|
||||||
|
@ -40,9 +40,23 @@ sub doconfigure {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$command = "${srcdir}/configure --type=${type} --target=${target}";
|
$command = "${srcdir}/configure --type=${type} --target=${target}";
|
||||||
|
if (defined $width) {
|
||||||
|
$command .= " --lcdwidth=${width}";
|
||||||
|
}
|
||||||
|
if (defined $height) {
|
||||||
|
$command .= " --lcdheight=${height}";
|
||||||
|
}
|
||||||
%typenames = ("n" => "Normal", "s" => "Simulator", "b" => "Bootloader" );
|
%typenames = ("n" => "Normal", "s" => "Simulator", "b" => "Bootloader" );
|
||||||
unless (@ARGV[0] eq "-y") {
|
unless (@ARGV[0] eq "-y") {
|
||||||
print "Rockbox autoconf: \n\tTarget: $target \n\tType: $typenames{$type} \nCorrect? [Y/n] ";
|
$prompt = "Rockbox autoconf: \n\tTarget: $target \n\tType: $typenames{$type} \n";
|
||||||
|
if (defined $width) {
|
||||||
|
$prompt .= "\tLCD width: $width\n";
|
||||||
|
}
|
||||||
|
if (defined $height) {
|
||||||
|
$prompt .= "\tLCD height: $height\n";
|
||||||
|
}
|
||||||
|
print $prompt . "Correct? [Y/n] ";
|
||||||
|
|
||||||
chomp($response = <>);
|
chomp($response = <>);
|
||||||
if ($response eq "") {
|
if ($response eq "") {
|
||||||
$response = "y";
|
$response = "y";
|
||||||
|
@ -69,7 +83,15 @@ sub buildtype {
|
||||||
return $build;
|
return $build;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($test =~ /(.*)-(.*)/)
|
if ($test =~ /(.*)-(.*)-([0-9]+)x([0-9]+)/)
|
||||||
|
{
|
||||||
|
if (buildtype($2)) {
|
||||||
|
doconfigure($1, buildtype($2), $3, $4);
|
||||||
|
} elsif (buildtype($1)) {
|
||||||
|
doconfigure($2, buildtype($1), $3, $4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif ($test =~ /(.*)-(.*)/)
|
||||||
{
|
{
|
||||||
if (buildtype($2)) {
|
if (buildtype($2)) {
|
||||||
doconfigure($1, buildtype($2));
|
doconfigure($1, buildtype($2));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue