Changeset 36643


Ignore:
Timestamp:
2022-09-20T16:51:23+12:00 (2 weeks ago)
Author:
anupama
Message:

Some corrections to get diffcol task.pl's setup_greenstone and run_test subcommands to work again when passing in --gs3. I had also manually added checked out GS3's winbin to PATH in setup_greenstone() as unzip was wanting, to test that winbin on PATH helped GS3 finish compiling, but unzip as well as GS3's wget and any other unixtools need to be setup by diffcol's environment.pl, probably not in the task.pl code.

File:
1 edited

Legend:

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

    r34941 r36643  
    516516
    517517    my $imagickzip = &getImageMagickBins();
     518   
     519    if($isWin) { # steps from http://wiki.greenstone.org/doku.php?id=en:developer:windows_source_install
     520#       my $iconv_dir = filename_concat($greenstone3_home, "gs2build", "common-src", "indexers", "packages", "windows", "iconv");
     521#       chdir ("$iconv_dir");       
     522#       move("iconv-winVS14-VS2015-plus.zip", "iconv.zip"); #move("iconv.zip", "iconv_preVS14.zip");
     523        # https://www.oreilly.com/library/view/perl-cookbook/1565922433/ch09s09.html
     524#       rmtree("iconv");
     525       
     526        # need unzip, and maybe more from winbin   
     527        my $winbin_dir = filename_concat($greenstone3_home, "gs2build", "bin", "windows");
     528        $ENV{'PATH'} = $winbin_dir . ";" . $ENV{'PATH'};
     529    }
    518530    chdir ("$greenstone3_home");
    519531
     
    616628
    617629    # now get the PDFBox extension for PDFBox tutorial 
    618     print STDERR "Getting pdfbox from $PDFBOX_TRAC_URL:\n";     
     630    print STDERR "Getting pdfbox from $PDFBOX_TRAC_URL:\n";
     631   
     632    my $linux_ext = ($install_version eq "3") ? "sh" : "bash";
    619633   
    620634    chdir($greenstone_home);
    621635    my $cmd = "";
    622636    if ($isWin) {
    623         $cmd = "setup.bat && cd ext && $wget $PDFBOX_TRAC_URL.zip && unzip pdf-box-java.zip";
    624        
     637        #$cmd = "setup.bat && cd ext && $wget $PDFBOX_TRAC_URL.zip && unzip pdf-box-java.zip";     
     638        $cmd = "set GSDL3SRCHOME=&& set GSDLHOME=&& $setup_script.bat && cd ext && $wget $PDFBOX_TRAC_URL.zip && unzip pdf-box-java.zip";       
    625639    } elsif ($isMac) { # need to use curl not wget
    626640        $cmd = "cd ext && curl $PDFBOX_TRAC_URL.tar.gz > pdf-box-java.tar.gz && tar -xzf pdf-box-java.tar.gz";
    627641    }
    628642    else { # linux
    629         $cmd = "bash -c \"export GSDLHOME=&& source setup.bash && cd ext && $wget $PDFBOX_TRAC_URL.tar.gz && tar -xzf pdf-box-java.tar.gz\"";
     643        $cmd = "bash -c \"export GSDLHOME=&& source $setup_script.$linux_ext && cd ext && $wget $PDFBOX_TRAC_URL.tar.gz && tar -xzf pdf-box-java.tar.gz\"";
    630644    }
    631645    my $status = system $cmd;
     
    807821   
    808822    for my $collection (@collections) {
     823        chdir($collect_parent); # for GS3 too, ensure we're first in the collect folder for each collection
    809824
    810825    #   next if ($collection ne "Demo-Lucene"); ## TEMPORARY, FOR TESTING THIS SCRIPT
     
    819834   
    820835    if (! -d "collect$sep$collection") {
     836        print STDERR "**** Looked in current dir ".getcwd."\n";
    821837        print STDERR "Collection $collection does not exist\n";
    822838        next;
Note: See TracChangeset for help on using the changeset viewer.