Ignore:
Timestamp:
2013-06-27T21:29:18+12:00 (11 years ago)
Author:
ak19
Message:

Mac now gets its imagemagick binary from where linux gets it at svn, since a new mac binary .tar.gz file has been added to gs2-extensions/imagemagick. In task.pl, the move operation that shifts the unzipped imagick binary happens after compilation, since bin/darwin is overwritten during compilation, so moving imagemagick into there has to happen at the end.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/nightly-tasks/diffcol/trunk/task.pl

    r27710 r27724  
    263263    # imagmagick binary
    264264    print STDERR "Getting imagemagick binary\n";
     265
     266    my $os = $isMac ? "darwin" : "linux";
     267    my $imagickzip = "imagemagick-$os";
    265268   
    266269    if($isMac) {
    267         $cmd = "svn export http://svn.greenstone.org/main/trunk/binaries/mac/intel/imagemagick bin/darwin/imagemagick";
    268         $status = system($cmd);
     270        $imagickzip .= "-10.5.tar.gz";
     271#       &File::Path::make_path($ENV{'DATA_DIR'}."$sep$gsdl$sep$os"); # need to ensure gsdl/bin/darwin exists
     272# the following mac img bin contains binaries that points to libraries containing fixed paths to /home/max
     273#       $cmd = "svn export http://svn.greenstone.org/main/trunk/binaries/mac/intel/imagemagick bin/darwin/imagemagick";
     274#       $status = system($cmd);
    269275    } else { # linux
    270276        my $extension64 = ($bit_arch =~ m/64$/) ? "-x64" : "";
    271         my $imagickzip = "imagemagick-linux$extension64.tar.gz";
    272         $cmd = "svn export http://svn.greenstone.org/gs2-extensions/imagemagick/trunk/imagemagick-linux$extension64.tar.gz ext/$imagickzip";
    273         $status = system ($cmd);
    274         system("cd ext && tar -xvzf $imagickzip");
    275 
    276         move("$ENV{'DATA_DIR'}$sep$gsdl$sep"."ext/imagemagick/linux", "$ENV{'DATA_DIR'}$sep$gsdl$sep"."bin/linux/imagemagick"); # http://www.perlmonks.org/?node_id=586537
    277         unlink "ext/$imagickzip" or warn "Could not unlink ext/$imagickzip: $!";
    278         &File::Path::remove_tree("$ENV{'DATA_DIR'}$sep$gsdl$sep"."ext/imagemagick"); # the untarred parent folder
    279     }
     277        $imagickzip .= "$extension64.tar.gz";
     278    }
     279
     280    $cmd = "svn export http://svn.greenstone.org/gs2-extensions/imagemagick/trunk/$imagickzip ext/$imagickzip";
     281    $status = system ($cmd);
     282    system("cd ext && tar -xvzf $imagickzip");
    280283   
    281284    # gnomelib binary
     
    343346    $cmd .= "\""; # close off cmd to bash and run it
    344347    $status = system $cmd;
     348
     349
     350    # Moving imagemagick after instead of before compilation, since bin/darwin gets overwritten during compilation
     351    move("$ENV{'DATA_DIR'}$sep$gsdl$sep"."ext/imagemagick/$os", "$ENV{'DATA_DIR'}$sep$gsdl$sep"."bin/$os/imagemagick"); # http://www.perlmonks.org/?node_id=586537
     352    unlink "$ENV{'DATA_DIR'}/$gsdl"."/ext/$imagickzip" or warn "Could not unlink ext/$imagickzip: $!";
     353    &File::Path::remove_tree("$ENV{'DATA_DIR'}$sep$gsdl$sep"."ext/imagemagick"); # the untarred parent folder
     354
    345355    }
    346356   
     
    349359        exit -1;
    350360    }
    351    
     361
    352362    # set the path to the greenstone_home variable                             
    353363    $greenstone_home="$ENV{'DATA_DIR'}$sep$gsdl";
     
    363373    print $xml_fh "<test time=\"$dateid\" id=\"$dateid\">\n";
    364374   
    365     # make sure that diffcol/model-collect is up to date before copying it over to greenstone-home                                                                           
     375    # make sure that diffcol/model-collect is up to date before copying it over to greenstone-home
     376
    366377    print $xml_fh "Updating $ENV{'TASK_HOME'}/model-collect:\n";
    367378    my $cmd = "svn up $ENV{'TASK_HOME'}/model-collect"; #chdir("$ENV{'TASK_HOME'}/model-collect");
Note: See TracChangeset for help on using the changeset viewer.