Changeset 11747
- Timestamp:
- 2006-05-01T10:31:22+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/exportcol.pl
r11178 r11747 48 48 'type' => "string", 49 49 'deft' => "STDERR", 50 'reqd' => "no" },51 { 'name' => "nonetscape",52 'desc' => "{exportcol.nonetscape}",53 'type' => "flag",54 50 'reqd' => "no" }, 55 51 { 'name' => "cdname", … … 92 88 93 89 my $xml = 0; 94 my $nonetscape = 0;95 90 96 91 my $hashParsingResult = {}; … … 120 115 } 121 116 122 my $use_netscape = ($nonetscape) ? 0 : 1;123 124 117 # If $language has been specified, load the appropriate resource bundle 125 118 # (Otherwise, the default resource bundle will be loaded automatically) … … 158 151 &gsprintf($out, "{exportcol.fail} {exportcol.export_coll_not_installed}\n"); 159 152 die "\n"; 160 }161 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 files163 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 153 } 170 154 … … 269 253 my $net32dir = &util::filename_cat ($ENV{'GSDLHOME'}, "bin", "windows", "net32"); 270 254 my $net16dir = &util::filename_cat ($ENV{'GSDLHOME'}, "bin", "windows", "net16"); 271 my $netscapedir = &util::filename_cat ($ENV{'GSDLHOME'}, "bin", "windows", "netscape");272 255 my $win32sdir = &util::filename_cat ($ENV{'GSDLHOME'}, "bin", "windows", "Win32s"); 273 256 my $phindjar = &util::filename_cat ($ENV{'GSDLHOME'}, "bin", "java", "Phind.jar"); … … 276 259 if ((!-d $imagesdir) || (!-d $macrosdir) || (!-d $mappingsdir) || (!-e $maincfg) || 277 260 (!-e $serverexe) || (!-e $gssetupexe) || (!-e $setupexe) || (!-d $net32dir) || 278 (!-d $net16dir) || ( $use_netscape && (!-d $netscapedir)) || (!-d $win32sdir) || (!-e $phindjar) ||261 (!-d $net16dir) || (!-d $win32sdir) || (!-e $phindjar) || 279 262 (!-e $gsdlcollageappletjar)) { 280 263 &gsprintf($out, "{exportcol.fail} {exportcol.non_exist_files}\n"); … … 288 271 &gsprintf($out, " $net32dir\n"); 289 272 &gsprintf($out, " $net16dir\n"); 290 &gsprintf($out, " $netscapedir\n") if ($use_netscape);291 273 &gsprintf($out, " $win32sdir\n"); 292 274 &gsprintf($out, " $phindjar\n"); … … 295 277 } 296 278 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 } 279 &util::cp_r ($imagesdir, $gsdldir); 303 280 &util::cp_r ($macrosdir, $gsdldir); 304 281 &util::cp_r ($mappingsdir, $gsdldir); … … 309 286 &util::cp_r ($net32dir, $gsdldir); 310 287 &util::cp_r ($net16dir, $gsdldir); 311 &util::cp_r ($netscapedir, $topdir) if ($use_netscape);312 288 &util::cp_r ($win32sdir, $topdir); 313 289 &util::cp ($phindjar, $binjavadir); 314 290 &util::cp ($gsdlcollageappletjar, $binjavadir); 315 316 317 # if we have netscape 4 bundled, then switch to ns4 compat macro file318 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 line327 } else {328 print OUTFILE "$line";329 }330 }331 # continue with no checking332 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 291 340 292 # now change the home.dm macro file to a simple version
Note:
See TracChangeset
for help on using the changeset viewer.