Changeset 11178

Show
Ignore:
Timestamp:
01.02.2006 10:11:10 (14 years ago)
Author:
kjdon
Message:

modifications to support bundling netscape, needs the language pack installed, and the nav_ns4 compatibility macros.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/exportcol.pl

    r10339 r11178  
    160160    } 
    161161 
     162    # if we want to use netscape, check that the lanugage pack has been installed. What's best to check? for now, use one of the english image files 
     163    if ($use_netscape) { 
     164    my $search_image = &util::filename_cat ($ENV{'GSDLHOME'}, "images", "en", "tsrchgr.gif"); 
     165    if (!-e $search_image) { 
     166        &gsprintf($out, "{exportcol.fail} {exportcol.lang_pack_not_installed}\n"); 
     167        die "\n"; 
     168    } 
     169    } 
     170 
    162171    # check each collection 
    163172    my @valid_coll_list = (); 
     
    286295    } 
    287296 
    288     &util::cp_r ($imagesdir, $gsdldir); 
     297    # images. If not using netscape, copy only the top level, not any subdirs 
     298    if ($use_netscape) { 
     299    &util::cp_r ($imagesdir, $gsdldir); 
     300    } else { 
     301    &util::cp_r_toplevel ($imagesdir, $gsdldir); 
     302    } 
    289303    &util::cp_r ($macrosdir, $gsdldir); 
    290304    &util::cp_r ($mappingsdir, $gsdldir); 
     
    300314    &util::cp ($gsdlcollageappletjar, $binjavadir); 
    301315 
     316 
     317    # if we have netscape 4 bundled, then switch to ns4 compat macro file 
     318    if ($use_netscape) { 
     319    my $main_cfg_file = &util::filename_cat($etcdir, "main.cfg"); 
     320    open INFILE, "<$main_cfg_file"; 
     321    open OUTFILE, ">$main_cfg_file.tmp"; 
     322    my $line; 
     323    while ($line = <INFILE>) { 
     324        if ($line =~ s/nav_css\.dm/nav_ns4\.dm/) { 
     325        print OUTFILE $line; 
     326        last; # stop matching once we have found the line 
     327        } else { 
     328        print OUTFILE "$line"; 
     329        } 
     330    } 
     331    # continue with no checking 
     332    while ($line = <INFILE>) { 
     333        print OUTFILE "$line"; 
     334    } 
     335    close INFILE; 
     336    close OUTFILE; 
     337    &util::mv("$main_cfg_file.tmp", $main_cfg_file); 
     338    } 
     339 
    302340    # now change the home.dm macro file to a simple version 
    303341    my $newmacrodir = &util::filename_cat ($gsdldir, "macros");