Subversion Repositories DevTools

Rev

Rev 4371 | Rev 4752 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4371 Rev 4595
Line 408... Line 408...
408
# Returns         : 
408
# Returns         : 
409
#
409
#
410
sub injectDependencies
410
sub injectDependencies
411
{
411
{
412
    my @jlist;
412
    my @jlist;
-
 
413
    my @jpathlist;
413
    my @liblist;
414
    my @liblist;
414
 
415
 
415
    #
416
    #
416
    #   Only if we need to do something
417
    #   Only if we need to do something
417
    #
418
    #
418
    return unless (@opt_jars || @opt_elibs || @opt_jlibs);
419
    return unless (@opt_jars || @opt_elibs || @opt_jlibs);
419
 
420
 
420
    #
421
    #
421
    #   Create search entries suitable for the CopyDir
422
    #   Create search entries suitable for the CopyDir
422
    #   We will delete entries as the files are copied
423
    #   We will delete entries as the files are copied
-
 
424
    #   Allow for:
-
 
425
    #       jar files to have a .jar suffix (optional)
-
 
426
    #       jar files to have path specifuied with a package
423
    #
427
    #
424
    foreach my $item ( @opt_jars) {
428
    foreach my $item ( @opt_jars) {
-
 
429
        $item =~ s~\.jar~~i;
-
 
430
        if ($item =~ m~/~)
-
 
431
        {
-
 
432
            UniquePush \@jpathlist, $item . '.jar';
-
 
433
        } else {
425
        UniquePush \@jlist, $item . '.jar';
434
            UniquePush \@jlist, $item . '.jar';
-
 
435
        }
426
    }
436
    }
427
 
437
 
428
    foreach my $item ( @opt_elibs) {
438
    foreach my $item ( @opt_elibs) {
429
        UniquePush \@liblist, 'lib' . $item . '.so';
439
        UniquePush \@liblist, 'lib' . $item . '.so';
430
    }
440
    }
Line 444... Line 454...
444
    foreach my $pkg ( @pkg_paths)
454
    foreach my $pkg ( @pkg_paths)
445
    {
455
    {
446
        #
456
        #
447
        #   Copy in all JAR files found in dependent packages
457
        #   Copy in all JAR files found in dependent packages
448
        #
458
        #
449
        my $jarDir = catdir($pkg,'jar'); 
459
        my $jarDir = catdir($pkg,'jar');
450
        if (-d $jarDir && @jlist)
460
        if (-d $jarDir && @jlist)
451
        {
461
        {
452
            Verbose("Jar Dir Found found", $jarDir);
462
            Verbose("Jar Dir Found found", $jarDir);
453
            Message ("Copy in: $jarDir");
463
            Message ("Copy in: $jarDir");
454
            CopyDir ( $jarDir, $androidLibs,
464
            CopyDir ( $jarDir, $androidLibs,
Line 462... Line 472...
462
                            },
472
                            },
463
                        );
473
                        );
464
        }
474
        }
465
 
475
 
466
        #
476
        #
-
 
477
        #   Copy in JARs specified by a full pathname
-
 
478
        #
-
 
479
        foreach my $file (@jpathlist) 
-
 
480
        {
-
 
481
            my $jarFile = catdir($pkg, $file);
-
 
482
            if (-f $jarFile)
-
 
483
            {
-
 
484
                Verbose("Jar File Found found", $jarDir);
-
 
485
                Message ("Copy in: $jarFile");
-
 
486
                CopyFile ( $jarFile, $androidLibs,
-
 
487
                            'Log' => $opt_verbose + 1,
-
 
488
                            'SymlinkFiles' => 1,
-
 
489
                         );
-
 
490
                ArrayDelete \@jpathlist, $file;
-
 
491
            }
-
 
492
        }
-
 
493
        
-
 
494
        #
467
        #   Build up the Shared Library structure as used by JNI
495
        #   Build up the Shared Library structure as used by JNI
468
        #   Note: Only support current JATS format
496
        #   Note: Only support current JATS format
469
        #   Copy in .so files and in to process massage the pathname so that
497
        #   Copy in .so files and in to process massage the pathname so that
470
        #   it confirms to that expected by the Android Project
498
        #   it confirms to that expected by the Android Project
471
        #
499
        #
Line 499... Line 527...
499
    #   Report files that could not be located. They were deleted from the lists
527
    #   Report files that could not be located. They were deleted from the lists
500
    #   as they were processed
528
    #   as they were processed
501
    #       These are Warnings in populate Mode
529
    #       These are Warnings in populate Mode
502
    #       and errors at build time
530
    #       and errors at build time
503
    #
531
    #
504
    if (@jlist || @liblist)
532
    if (@jlist || @liblist || @jpathlist)
505
    {
533
    {
506
        my $fn = $opt_populate ? \&Warning : \&Error; 
534
        my $fn = $opt_populate ? \&Warning : \&Error; 
507
        &$fn("External dependencies not found:", @jlist, @liblist);
535
        &$fn("External dependencies not found:", @jlist, @jpathlist, @liblist);
508
    }
536
    }
509
}
537
}
510
 
538
 
511
#-------------------------------------------------------------------------------
539
#-------------------------------------------------------------------------------
512
# Function        : deleteGeneratedFiles 
540
# Function        : deleteGeneratedFiles