0
|
1 |
#
|
|
2 |
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
# All rights reserved.
|
|
4 |
# This component and the accompanying materials are made available
|
|
5 |
# under the terms of "Eclipse Public License v1.0"
|
|
6 |
# which accompanies this distribution, and is available
|
|
7 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
#
|
|
9 |
# Initial Contributors:
|
|
10 |
# Nokia Corporation - initial contribution.
|
|
11 |
#
|
|
12 |
# Contributors:
|
|
13 |
#
|
|
14 |
# Description:
|
|
15 |
#
|
|
16 |
#################################################################################
|
|
17 |
#
|
|
18 |
# Nokia/NMP/TWS S60 SDK TF
|
|
19 |
#
|
|
20 |
# Series 60 & Series 90 SDK example apps builder
|
|
21 |
#
|
|
22 |
# [TBD]
|
|
23 |
#
|
|
24 |
# Mike Smyslov
|
|
25 |
# 15.07.2003
|
|
26 |
#
|
|
27 |
$version = "buildS60ex.pl v0.22";
|
|
28 |
#
|
|
29 |
# CHANGES
|
|
30 |
#
|
|
31 |
# 0.21 -> 0.22: Smart handling of creating .sis files for ARMV5 and GCCE targets:
|
|
32 |
# .sis file is created from the .pkg file corresponding to target,
|
|
33 |
# both UREL armv5 and gcce are assumed; .pkg file is either
|
|
34 |
# <appname>_armv5.pkg or <appname>_gcce.pkg
|
|
35 |
#
|
|
36 |
# 0.20 -> 0.21: GCCE udeb / urel made valid targets
|
|
37 |
#
|
|
38 |
# 0.19 -> 0.20: .sis creation removed for armv5_udeb target
|
|
39 |
#
|
|
40 |
# 0.18 -> 0.19: Separate targets armv5_udeb & armv5_urel;
|
|
41 |
# separate targets winscw_udeb & wincw urel
|
|
42 |
#
|
|
43 |
# 0.17 -> 0.18: More correct parsing of example apps grouped in subdirs (openglex).
|
|
44 |
#
|
|
45 |
# 0.16 -> 0.17: Target "armv5" added".
|
|
46 |
#
|
|
47 |
#################################################################################
|
|
48 |
|
|
49 |
|
|
50 |
# we will measure walking time in seconds
|
|
51 |
$starttime = (time);
|
|
52 |
|
|
53 |
# current time and date
|
|
54 |
chomp($time = `time /T`);
|
|
55 |
chomp($date = `date /T`);
|
|
56 |
|
|
57 |
|
|
58 |
# Target token to control build process' target
|
|
59 |
$target = $ARGV[0] || die "\nError!\nUsage: build.pl target sdk_location\n\n";
|
|
60 |
|
|
61 |
chomp($target);
|
|
62 |
$target =~ tr/A-Z/a-z/;
|
|
63 |
|
|
64 |
# targets: wins, winscw, armv5, gcce, thumb, clean, reallyclean
|
|
65 |
|
|
66 |
if ( ($target ne "wins") &&
|
|
67 |
($target ne "winscw_urel") &&
|
|
68 |
($target ne "winscw_udeb") &&
|
|
69 |
($target ne "thumb") &&
|
|
70 |
($target ne "armv5_udeb") &&
|
|
71 |
($target ne "armv5_urel") &&
|
|
72 |
($target ne "gcce_udeb") &&
|
|
73 |
($target ne "gcce_urel") &&
|
|
74 |
($target ne "clean") &&
|
|
75 |
($target ne "reallyclean") )
|
|
76 |
{
|
|
77 |
print "\nError!\nTarget wins|winscw_urel|winscw_udeb|thumb|armv5_urel|armv5_udeb|gcce_urel|gcce_udeb|clean|reallyclean\n";
|
|
78 |
exit;
|
|
79 |
}
|
|
80 |
|
|
81 |
$path = $ARGV[1] || die "\nError!\nUsage: build.pl target [SDK location]\n\n";
|
|
82 |
|
|
83 |
# LOGFILE
|
|
84 |
$curd = `cd`;
|
|
85 |
chomp($curd);
|
|
86 |
$log = $curd."\\build_S60ex_".$target."_.txt";
|
|
87 |
|
|
88 |
|
|
89 |
# write script's starting information to logfile and console
|
|
90 |
|
|
91 |
print "\nStarting to build SDK example apps ($target)\n";
|
|
92 |
open( LOG, ">$log") || die "Cannot open file $log!";
|
|
93 |
print LOG "Starting to build SDK example apps ($target).\n";
|
|
94 |
print LOG "Path to example apps: $path\n";
|
|
95 |
print "Path to example apps: $path\n";
|
|
96 |
|
|
97 |
|
|
98 |
|
|
99 |
|
|
100 |
# try to follow the path to example applications
|
|
101 |
$dir_exist = chdir $path;
|
|
102 |
|
|
103 |
if (not $dir_exist)
|
|
104 |
{
|
|
105 |
print "Error: could not enter target path!\n";
|
|
106 |
print LOG "\nError: could not enter target path!\n";
|
|
107 |
close LOG;
|
|
108 |
exit;
|
|
109 |
}
|
|
110 |
|
|
111 |
# find all applications
|
|
112 |
@apps = `dir /S /B bld.inf`;
|
|
113 |
|
|
114 |
|
|
115 |
# the number of found applications
|
|
116 |
$appCount = @apps;
|
|
117 |
|
|
118 |
|
|
119 |
# write the number of found applications to logfile and console
|
|
120 |
|
|
121 |
if ($appCount eq 0)
|
|
122 |
{
|
|
123 |
print "Error: could not find Series 60 example applications!\n";
|
|
124 |
print LOG "\nError: could not find Series 60 example applications!";
|
|
125 |
close LOG;
|
|
126 |
exit;
|
|
127 |
}
|
|
128 |
|
|
129 |
|
|
130 |
print "Build started: $date $time\n";
|
|
131 |
print LOG "Build started: $date $time\n";
|
|
132 |
print "$appCount applications found.\n\n";
|
|
133 |
print LOG "$appCount applications found.\n\n\n\n\n\n\n\n\n\n";
|
|
134 |
close LOG;
|
|
135 |
|
|
136 |
|
|
137 |
|
|
138 |
# set default target device prior to building
|
|
139 |
# NOTE: this has been dropped since SDK builds
|
|
140 |
# suppose to carry variable device mappings
|
|
141 |
#system("devices -setdefault \@Series60_v20:com.nokia.series60");
|
|
142 |
|
|
143 |
|
|
144 |
|
|
145 |
while( @apps ) # build all found applications
|
|
146 |
{
|
|
147 |
chomp($app = shift @apps); # parse application name from path
|
|
148 |
|
|
149 |
# debug # print "\napp=$app\n";
|
|
150 |
$app =~ /(.*)\\bld\.inf$/i;
|
|
151 |
$appPath = $1;
|
|
152 |
|
|
153 |
$appPathLC = $appPath;
|
|
154 |
$appPathLC =~ tr/A-Z/a-z/;
|
|
155 |
|
|
156 |
next if ($appPathLC =~ m /tsrc/); # skip /tsrc/ dirs from handling
|
|
157 |
# debug # print "appPath = $appPath\n";
|
|
158 |
$shortpath = $appPath;
|
|
159 |
$shortpath =~ s/\Q$path//; # remove common dir prefix from $path
|
|
160 |
|
|
161 |
# debug# print "\nshortpath = $shortpath\n";
|
|
162 |
|
|
163 |
$shortpath =~/\\(.*)/; # remove leading "\"
|
|
164 |
$shortpath = $1;
|
|
165 |
$shortpath =~/(.*)(\\group)/i; # remove trailing "\group"
|
|
166 |
$appName = $1;
|
|
167 |
# debug # print "\nappName = $appName\n";
|
|
168 |
# build application
|
|
169 |
build($appPath, $appName);
|
|
170 |
}
|
|
171 |
|
|
172 |
|
|
173 |
|
|
174 |
# walking time calculation in seconds
|
|
175 |
$endtime = (time);
|
|
176 |
$runtime = $endtime - $starttime;
|
|
177 |
|
|
178 |
|
|
179 |
|
|
180 |
# write ending information of building process to logfile and console
|
|
181 |
|
|
182 |
chomp($time = `time /T`);
|
|
183 |
chomp($date = `date /T`);
|
|
184 |
open( LOG, ">>$log") || die "Cannot open file $log!";
|
|
185 |
print LOG '_' x 80;
|
|
186 |
print LOG "\nBuild ended: $date $time ($runtime seconds spent)\n";
|
|
187 |
print "\nBuild ended: $date $time ($runtime seconds spent)\n";
|
|
188 |
close LOG;
|
|
189 |
|
|
190 |
exit;
|
|
191 |
|
|
192 |
|
|
193 |
|
|
194 |
|
|
195 |
|
|
196 |
|
|
197 |
# Subroutine for build commands
|
|
198 |
#
|
|
199 |
sub build($appPath, $appName)
|
|
200 |
{
|
|
201 |
# change dir
|
|
202 |
chdir $appPath;
|
|
203 |
|
|
204 |
print "$appName";
|
|
205 |
|
|
206 |
# write error messages to logfile
|
|
207 |
open( STDERR, ">>$log") || die "Cannot open file $log!";
|
|
208 |
|
|
209 |
$heading = $appName." (".$appPath.")";
|
|
210 |
$spc_count = length($heading);
|
|
211 |
|
|
212 |
print STDERR '-' x $spc_count . "\n";
|
|
213 |
print STDERR $heading."\n";
|
|
214 |
print STDERR '-' x $spc_count . "\n\n";
|
|
215 |
|
|
216 |
|
|
217 |
|
|
218 |
|
|
219 |
if ( ($target ne "clean") && ($target ne "reallyclean") ) # makefiles needs to be generated
|
|
220 |
{ # only for build process, not for cleaning
|
|
221 |
# generate makefiles and abld.bat from bld.inf
|
|
222 |
#
|
|
223 |
print STDERR "---> bldmake -v bldfiles:\n";
|
|
224 |
$res = `bldmake -v bldfiles`;
|
|
225 |
print STDERR "$res\n\n";
|
|
226 |
print ".";
|
|
227 |
}
|
|
228 |
|
|
229 |
|
|
230 |
|
|
231 |
|
|
232 |
if ($target eq "winscw_urel") # WINSCW
|
|
233 |
{
|
|
234 |
# build winscw
|
|
235 |
#
|
|
236 |
print STDERR "---> abld build winscw urel (before freeze):\n";
|
|
237 |
$res = `abld build winscw urel`;
|
|
238 |
print STDERR "$res\n\n";
|
|
239 |
print ".";
|
|
240 |
|
|
241 |
# freeze exports winscw
|
|
242 |
#
|
|
243 |
print STDERR "---> abld freeze winscw:\n";
|
|
244 |
$res = `abld freeze winscw`;
|
|
245 |
print STDERR "$res\n\n";
|
|
246 |
print ".";
|
|
247 |
|
|
248 |
# build app after freeze
|
|
249 |
#
|
|
250 |
print STDERR "---> abld build winscw urel (after freeze):\n";
|
|
251 |
$res = `abld build winscw urel`;
|
|
252 |
print STDERR "$res\n\n";
|
|
253 |
print ".";
|
|
254 |
|
|
255 |
# generate Codewarrior IDE project file
|
|
256 |
#
|
|
257 |
print STDERR "---> abld makefile cw_ide:\n";
|
|
258 |
$res = `abld makefile cw_ide`;
|
|
259 |
print STDERR "$res\n\n";
|
|
260 |
print ".";
|
|
261 |
}
|
|
262 |
|
|
263 |
|
|
264 |
|
|
265 |
|
|
266 |
if ($target eq "winscw_udeb") # WINSCW only UREL branch for S90 SDK
|
|
267 |
{
|
|
268 |
# build winscw
|
|
269 |
#
|
|
270 |
print STDERR "---> abld build winscw udeb (before freeze):\n";
|
|
271 |
$res = `abld build winscw udeb`;
|
|
272 |
print STDERR "$res\n\n";
|
|
273 |
print ".";
|
|
274 |
|
|
275 |
# freeze exports winscw
|
|
276 |
#
|
|
277 |
print STDERR "---> abld freeze winscw:\n";
|
|
278 |
$res = `abld freeze winscw`;
|
|
279 |
print STDERR "$res\n\n";
|
|
280 |
print ".";
|
|
281 |
|
|
282 |
# build app after freeze
|
|
283 |
#
|
|
284 |
print STDERR "---> abld build winscw udeb (after freeze):\n";
|
|
285 |
$res = `abld build winscw udeb`;
|
|
286 |
print STDERR "$res\n\n";
|
|
287 |
print ".";
|
|
288 |
|
|
289 |
# generate Codewarrior IDE project file
|
|
290 |
#
|
|
291 |
print STDERR "---> abld makefile cw_ide:\n";
|
|
292 |
$res = `abld makefile cw_ide`;
|
|
293 |
print STDERR "$res\n\n";
|
|
294 |
print ".";
|
|
295 |
}
|
|
296 |
|
|
297 |
|
|
298 |
|
|
299 |
|
|
300 |
if ($target eq "wins") # WINS
|
|
301 |
{
|
|
302 |
# build wins
|
|
303 |
#
|
|
304 |
print STDERR "---> abld build wins (before freeze):\n";
|
|
305 |
$res = `abld build wins`;
|
|
306 |
print STDERR "$res\n\n";
|
|
307 |
print ".";
|
|
308 |
|
|
309 |
# freeze exports wins
|
|
310 |
#
|
|
311 |
print STDERR "---> abld freeze wins:\n";
|
|
312 |
$res = `abld freeze wins`;
|
|
313 |
print STDERR "$res\n\n";
|
|
314 |
print ".";
|
|
315 |
|
|
316 |
# build app after freeze wins
|
|
317 |
#
|
|
318 |
print STDERR "---> abld build wins (after freeze):\n";
|
|
319 |
$res = `abld build wins`;
|
|
320 |
print STDERR "$res\n\n";
|
|
321 |
print ".";
|
|
322 |
|
|
323 |
# generate MSVC project file
|
|
324 |
#
|
|
325 |
print STDERR "---> abld makefile vc6:\n";
|
|
326 |
$res = `abld makefile vc6`;
|
|
327 |
print STDERR "$res\n\n";
|
|
328 |
print ".";
|
|
329 |
}
|
|
330 |
|
|
331 |
|
|
332 |
|
|
333 |
|
|
334 |
if ($target eq "armi") # ARMI UREL
|
|
335 |
{
|
|
336 |
# build armi urel
|
|
337 |
#
|
|
338 |
print STDERR "---> abld build armi urel (before freeze):\n";
|
|
339 |
$res = `abld build armi urel`;
|
|
340 |
print STDERR "$res\n\n";
|
|
341 |
print ".";
|
|
342 |
|
|
343 |
# freeze exports armi
|
|
344 |
#
|
|
345 |
print STDERR "---> abld freeze armi:\n";
|
|
346 |
$res = `abld freeze armi`;
|
|
347 |
print STDERR "$res\n\n";
|
|
348 |
print ".";
|
|
349 |
|
|
350 |
# build app after freeze
|
|
351 |
#
|
|
352 |
print STDERR "---> abld build armi urel (after freeze):\n";
|
|
353 |
$res = `abld build armi urel`;
|
|
354 |
print STDERR "$res\n\n";
|
|
355 |
print ".";
|
|
356 |
}
|
|
357 |
|
|
358 |
|
|
359 |
|
|
360 |
|
|
361 |
|
|
362 |
if ($target eq "thumb") # THUMB UREL
|
|
363 |
{
|
|
364 |
# build thumb urel
|
|
365 |
#
|
|
366 |
print STDERR "---> abld build thumb urel (before freeze):\n";
|
|
367 |
$res = `abld build thumb urel`;
|
|
368 |
print STDERR "$res\n\n";
|
|
369 |
print ".";
|
|
370 |
|
|
371 |
# freeze exports thumb
|
|
372 |
#
|
|
373 |
print STDERR "---> abld freeze thumb:\n";
|
|
374 |
$res = `abld freeze thumb`;
|
|
375 |
print STDERR "$res\n\n";
|
|
376 |
print ".";
|
|
377 |
|
|
378 |
# build app after freeze
|
|
379 |
#
|
|
380 |
print STDERR "---> abld build thumb urel (after freeze):\n";
|
|
381 |
$res = `abld build thumb urel`;
|
|
382 |
print STDERR "$res\n\n";
|
|
383 |
print ".";
|
|
384 |
|
|
385 |
# make sis
|
|
386 |
#
|
|
387 |
print STDERR "---> makesis";
|
|
388 |
chdir "..\\sis";
|
|
389 |
$res = `cd`;
|
|
390 |
|
|
391 |
if (not ($res =~ m /sis/))
|
|
392 |
{
|
|
393 |
chdir "..\\..\\sis";
|
|
394 |
}
|
|
395 |
|
|
396 |
$res = `cd`;
|
|
397 |
$pkgPath = $res;
|
|
398 |
|
|
399 |
$res = `dir /b *.pkg`;
|
|
400 |
chomp ($res);
|
|
401 |
|
|
402 |
if ($res eq "")
|
|
403 |
{
|
|
404 |
print STDERR " failed: .pkg file is not found!\n\n";
|
|
405 |
}
|
|
406 |
else
|
|
407 |
{
|
|
408 |
$pkgName = $res;
|
|
409 |
chomp($pkgName);
|
|
410 |
|
|
411 |
print STDERR " $pkgName:";
|
|
412 |
|
|
413 |
checkHardcodedPath($pkgName);
|
|
414 |
|
|
415 |
$res = `makesis $pkgName`;
|
|
416 |
print STDERR "\n$res\n\n";
|
|
417 |
}
|
|
418 |
}
|
|
419 |
|
|
420 |
|
|
421 |
|
|
422 |
|
|
423 |
|
|
424 |
if ($target eq "armv5_urel") # ARMV5 UREL
|
|
425 |
{
|
|
426 |
# build armv5 urel
|
|
427 |
#
|
|
428 |
print STDERR "---> abld build armv5 urel (before freeze):\n";
|
|
429 |
$res = `abld build armv5 urel`;
|
|
430 |
print STDERR "$res\n\n";
|
|
431 |
print ".";
|
|
432 |
|
|
433 |
# freeze exports armv5
|
|
434 |
#
|
|
435 |
print STDERR "---> abld freeze armv5:\n";
|
|
436 |
$res = `abld freeze armv5`;
|
|
437 |
print STDERR "$res\n\n";
|
|
438 |
print ".";
|
|
439 |
|
|
440 |
# build app after freeze
|
|
441 |
#
|
|
442 |
print STDERR "---> abld build armv5 urel (after freeze):\n";
|
|
443 |
$res = `abld build armv5 urel`;
|
|
444 |
print STDERR "$res\n\n";
|
|
445 |
print ".";
|
|
446 |
|
|
447 |
# make sis
|
|
448 |
#
|
|
449 |
print STDERR "---> makesis";
|
|
450 |
chdir "..\\sis";
|
|
451 |
$res = `cd`;
|
|
452 |
|
|
453 |
if (not ($res =~ m /sis/))
|
|
454 |
{
|
|
455 |
chdir "..\\..\\sis";
|
|
456 |
}
|
|
457 |
|
|
458 |
$res = `cd`;
|
|
459 |
$pkgPath = $res;
|
|
460 |
|
|
461 |
$res = `dir /b *_armv5.pkg`;
|
|
462 |
chomp ($res);
|
|
463 |
|
|
464 |
if ($res eq "")
|
|
465 |
{
|
|
466 |
print STDERR " failed: .pkg file is not found!\n\n";
|
|
467 |
}
|
|
468 |
else
|
|
469 |
{
|
|
470 |
$pkgName = $res;
|
|
471 |
chomp($pkgName);
|
|
472 |
|
|
473 |
print STDERR " $pkgName:";
|
|
474 |
|
|
475 |
checkHardcodedPath($pkgName);
|
|
476 |
|
|
477 |
$res = `makesis $pkgName`;
|
|
478 |
print STDERR "\n$res\n\n";
|
|
479 |
}
|
|
480 |
}
|
|
481 |
|
|
482 |
|
|
483 |
|
|
484 |
|
|
485 |
|
|
486 |
|
|
487 |
if ($target eq "armv5_udeb") # ARMV5 UDEB
|
|
488 |
{
|
|
489 |
# build armv5 udeb
|
|
490 |
#
|
|
491 |
print STDERR "---> abld build armv5 udeb (before freeze):\n";
|
|
492 |
$res = `abld build armv5 udeb`;
|
|
493 |
print STDERR "$res\n\n";
|
|
494 |
print ".";
|
|
495 |
|
|
496 |
# freeze exports armv5
|
|
497 |
#
|
|
498 |
print STDERR "---> abld freeze armv5:\n";
|
|
499 |
$res = `abld freeze armv5`;
|
|
500 |
print STDERR "$res\n\n";
|
|
501 |
print ".";
|
|
502 |
|
|
503 |
# build app after freeze
|
|
504 |
#
|
|
505 |
print STDERR "---> abld build armv5 udeb (after freeze):\n";
|
|
506 |
$res = `abld build armv5 udeb`;
|
|
507 |
print STDERR "$res\n\n";
|
|
508 |
print ".";
|
|
509 |
}
|
|
510 |
|
|
511 |
|
|
512 |
|
|
513 |
|
|
514 |
|
|
515 |
|
|
516 |
|
|
517 |
|
|
518 |
|
|
519 |
|
|
520 |
|
|
521 |
|
|
522 |
|
|
523 |
|
|
524 |
|
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
529 |
|
|
530 |
|
|
531 |
|
|
532 |
|
|
533 |
|
|
534 |
|
|
535 |
|
|
536 |
|
|
537 |
|
|
538 |
|
|
539 |
|
|
540 |
|
|
541 |
|
|
542 |
if ($target eq "gcce_urel") # GCCE UREL
|
|
543 |
{
|
|
544 |
# build armv5 urel
|
|
545 |
#
|
|
546 |
print STDERR "---> abld build gcce urel (before freeze):\n";
|
|
547 |
$res = `abld build gcce urel`;
|
|
548 |
print STDERR "$res\n\n";
|
|
549 |
print ".";
|
|
550 |
|
|
551 |
# freeze exports gcce
|
|
552 |
#
|
|
553 |
print STDERR "---> abld freeze gcce:\n";
|
|
554 |
$res = `abld freeze gcce`;
|
|
555 |
print STDERR "$res\n\n";
|
|
556 |
print ".";
|
|
557 |
|
|
558 |
# build app after freeze
|
|
559 |
#
|
|
560 |
print STDERR "---> abld build gcce urel (after freeze):\n";
|
|
561 |
$res = `abld build gcce urel`;
|
|
562 |
print STDERR "$res\n\n";
|
|
563 |
print ".";
|
|
564 |
|
|
565 |
# make sis
|
|
566 |
#
|
|
567 |
print STDERR "---> makesis";
|
|
568 |
chdir "..\\sis";
|
|
569 |
$res = `cd`;
|
|
570 |
|
|
571 |
if (not ($res =~ m /sis/))
|
|
572 |
{
|
|
573 |
chdir "..\\..\\sis";
|
|
574 |
}
|
|
575 |
|
|
576 |
$res = `cd`;
|
|
577 |
$pkgPath = $res;
|
|
578 |
|
|
579 |
$res = `dir /b *_gcce.pkg`;
|
|
580 |
chomp ($res);
|
|
581 |
|
|
582 |
if ($res eq "")
|
|
583 |
{
|
|
584 |
print STDERR " failed: .pkg file is not found!\n\n";
|
|
585 |
}
|
|
586 |
else
|
|
587 |
{
|
|
588 |
|
|
589 |
|
|
590 |
$pkgName = $res;
|
|
591 |
chomp($pkgName);
|
|
592 |
|
|
593 |
print STDERR " $pkgName:";
|
|
594 |
|
|
595 |
checkHardcodedPath($pkgName);
|
|
596 |
|
|
597 |
$res = `makesis $pkgName`;
|
|
598 |
print STDERR "\n$res\n\n";
|
|
599 |
}
|
|
600 |
}
|
|
601 |
|
|
602 |
|
|
603 |
|
|
604 |
|
|
605 |
|
|
606 |
|
|
607 |
if ($target eq "gcce_udeb") # GCCE UDEB
|
|
608 |
{
|
|
609 |
# build gcce udeb
|
|
610 |
#
|
|
611 |
print STDERR "---> abld build gcce udeb (before freeze):\n";
|
|
612 |
$res = `abld build gcce udeb`;
|
|
613 |
print STDERR "$res\n\n";
|
|
614 |
print ".";
|
|
615 |
|
|
616 |
# freeze exports gcce
|
|
617 |
#
|
|
618 |
print STDERR "---> abld freeze gcce:\n";
|
|
619 |
$res = `abld freeze gcce`;
|
|
620 |
print STDERR "$res\n\n";
|
|
621 |
print ".";
|
|
622 |
|
|
623 |
# build app after freeze
|
|
624 |
#
|
|
625 |
print STDERR "---> abld build gcce udeb (after freeze):\n";
|
|
626 |
$res = `abld build gcce udeb`;
|
|
627 |
print STDERR "$res\n\n";
|
|
628 |
print ".";
|
|
629 |
}
|
|
630 |
|
|
631 |
|
|
632 |
|
|
633 |
|
|
634 |
|
|
635 |
|
|
636 |
|
|
637 |
|
|
638 |
|
|
639 |
|
|
640 |
|
|
641 |
|
|
642 |
|
|
643 |
|
|
644 |
|
|
645 |
|
|
646 |
|
|
647 |
|
|
648 |
|
|
649 |
|
|
650 |
|
|
651 |
|
|
652 |
if ($target eq "clean") # CLEAN
|
|
653 |
{
|
|
654 |
# clean
|
|
655 |
#
|
|
656 |
print STDERR "---> abld clean:\n";
|
|
657 |
$res = `abld clean`;
|
|
658 |
print STDERR "$res\n\n";
|
|
659 |
print ".";
|
|
660 |
}
|
|
661 |
|
|
662 |
|
|
663 |
|
|
664 |
|
|
665 |
if ($target eq "reallyclean") # REALLYCLEAN
|
|
666 |
{
|
|
667 |
# reallyclean
|
|
668 |
#
|
|
669 |
print STDERR "---> abld reallyclean:\n";
|
|
670 |
$res = `abld reallyclean`;
|
|
671 |
print STDERR "$res\n\n";
|
|
672 |
print ".";
|
|
673 |
}
|
|
674 |
|
|
675 |
|
|
676 |
|
|
677 |
# close logfile
|
|
678 |
print STDERR "\n\n\n\n\n\n";
|
|
679 |
close STDERR;
|
|
680 |
print "\n";
|
|
681 |
}
|
|
682 |
|
|
683 |
|
|
684 |
|
|
685 |
|
|
686 |
|
|
687 |
sub checkHardcodedPath($pkgName)
|
|
688 |
{
|
|
689 |
$pkg=$pkgName;
|
|
690 |
|
|
691 |
unless (open FILE, "<$pkg")
|
|
692 |
{
|
|
693 |
print "\nError: can't open $pkg\n\n";
|
|
694 |
return;
|
|
695 |
}
|
|
696 |
|
|
697 |
my @pkgFileLines = <FILE>;
|
|
698 |
|
|
699 |
foreach my $line (@pkgFileLines)
|
|
700 |
{
|
|
701 |
$line =~ s#;.*?\n##gs; # remove comment lines
|
|
702 |
$line =~ tr/A-Z/a-z/;
|
|
703 |
|
|
704 |
if ($line =~ m /c:\\/)
|
|
705 |
{
|
|
706 |
print STDERR " Warning: hardcoded installation path!";
|
|
707 |
print " Warning: hardcoded installation path!";
|
|
708 |
last;
|
|
709 |
}
|
|
710 |
}
|
|
711 |
close FILE;
|
|
712 |
} |