From 80aac924e8321e7d50f31d0b62e48fee469282ef Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 13 Jan 2014 23:05:35 +0100 Subject: [PATCH] wpsbuild: Call gcc without having to create a temp file. Change-Id: I7adc48209fd3050243770137df2022c617c68dc8 Reviewed-on: http://gerrit.rockbox.org/721 Reviewed-by: Thomas Martitz --- wps/wpsbuild.pl | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/wps/wpsbuild.pl b/wps/wpsbuild.pl index a420faddd8..35febe3bcb 100755 --- a/wps/wpsbuild.pl +++ b/wps/wpsbuild.pl @@ -10,6 +10,7 @@ use strict; use Getopt::Long qw(:config pass_through); # pass_through so not confused by -DTYPE_STUFF +use IPC::Open2; my $ROOT=".."; my $wpsdir; @@ -87,11 +88,11 @@ if(!$wpslist) { sub getlcdsizes { my ($remote) = @_; + my $str; - open(GCC, ">gcctemp"); if($remote) { # Get the remote LCD screen size - print GCC <) { + my ($height, $width, $depth, $touch); + while() { if($_ =~ /^Height: (\d*)/) { $height = $1; } @@ -129,12 +131,11 @@ STOP elsif($_ =~ /^Depth: (\d*)/) { $depth = $1; } - if($height && $width && $depth) { - last; + if($_ =~ /^Touchscreen/) { + $touch = 1; } } - close(GETSIZE); - unlink("gcctemp"); + close(COUT); return ($height, $width, $depth); }