Changeset 9227
- Timestamp:
- 2005-03-01T15:20:16+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/create_distributions.pl
r9212 r9227 50 50 # docs directory - up-to-date copy of everything to go in the docs directory 51 51 # (including the README.txt) is expected to live here 52 my $docdir = '/home/nzdl/gsdl-docs'; 52 my $docs_dir = '/home/nzdl/gsdl-docs'; 53 54 my $for_distributions_dir = '/home/nzdl/for-distributions'; 53 55 54 56 # where the windows binaries live (including library.exe and server.exe) … … 163 165 164 166 # Remove bits used by none of the distributions 167 &util::rm(&util::filename_cat($tmpdir, "gsdl", "packages", "cpan", "XML-Parser-2.27.tar.gz")); 165 168 &util::rm(&util::filename_cat($tmpdir, "gsdl", "packages", "kea", "kea-3.0", "CSTR")); 166 169 … … 173 176 174 177 # &create_windows_distribution(); 175 #&create_unix_distribution();178 &create_unix_distribution(); 176 179 &create_source_distribution(); 177 180 &create_cdrom_distribution() unless $no_cdrom; … … 208 211 # we want to include the unbuilt bits of the demo collection too 209 212 my $demodir = &util::filename_cat($windows_dist_dir, "gsdl", "collect", "demo"); 210 my $demoetc = &util::filename_cat($demodir, "etc");211 213 my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo"); 212 214 die "oops, no demo dir\n" unless -d $demodir; … … 217 219 218 220 219 sub create_unix_distribution { 221 sub create_unix_distribution 222 { 223 print STDERR "Creating Unix distribution...\n"; 224 225 my $unix_dist_dir = &util::filename_cat($output_dir, "gsdl-" . $version_num . "-unix"); 226 mkdir ($unix_dist_dir, 0777); 227 228 # Web release has a slightly customised version of Install.sh 229 &util::cp(&util::filename_cat($tmpdir, "gsdl", "Install.sh"), $unix_dist_dir); 230 my $Install_sh_file = &util::filename_cat($unix_dist_dir, "Install.sh"); 231 open (INSTALL_SH, $Install_sh_file) || die "Failed to open $Install_sh_file\n"; 232 my $found = 0; my $line = ""; my $file = ""; 233 while (defined ($line = <INSTALL_SH>)) { 234 if ($line =~ /^iscdrom=\"/) { 235 $line = "iscdrom=\"no\"\n"; 236 $found = 1; 237 } 238 $file .= $line; 239 } 240 close INSTALL_SH; 241 242 if ($found != 1) { 243 die "Error while editing $Install_sh_file\n"; 244 } 245 246 open (INSTALL_SH, ">$Install_sh_file") || die; 247 print INSTALL_SH $file; 248 close INSTALL_SH; 249 } 250 251 252 sub create_unix_distribution_old { 220 253 print STDERR "Creating Unix distribution...\n"; 221 254 … … 254 287 # we want to include the unbuilt bits of the demo collection too 255 288 my $demodir = &util::filename_cat($unix_dist_dir, "gsdl", "collect", "demo"); 256 my $demoetc = &util::filename_cat($demodir, "etc");257 289 my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo"); 258 290 die "oops, no demo dir\n" unless -d $demodir; … … 276 308 277 309 # We want the COPYING file in the source distribution too 278 &util::cp(&util::filename_cat($doc dir, "COPYING"), $gsdldir);310 &util::cp(&util::filename_cat($docs_dir, "COPYING"), $gsdldir); 279 311 280 312 # We shouldn't distribute the GLI applet signed by us … … 282 314 &util::rm(&util::filename_cat($source_dist_dir, "gsdl", "bin", "java", "SignedGatherer.jar")); 283 315 } 316 317 # Get the modified main.cfg file with only core language interfaces enabled 318 &util::cp(&util::filename_cat($for_distributions_dir, "etc", "main.cfg"), &util::filename_cat($gsdldir, "etc")); 284 319 285 320 # Remove the copied "images" and "macros" folders and copy over just the core languages … … 311 346 mkdir ($cdrom_dist_dir, 0777); 312 347 313 # collect directory (empty for now; we'll add collections later) 314 mkdir (&util::filename_cat ($cdrom_dist_dir, "collect"), 0777); 348 # collect directory, with customised home.dm file for documented example collections 349 my $cdrom_collect_dir = &util::filename_cat ($cdrom_dist_dir, "collect"); 350 mkdir($cdrom_collect_dir, 0777); 351 &util::cp(&util::filename_cat($for_distributions_dir, "macros", "home.dm"), $cdrom_collect_dir); 315 352 316 353 # docs directory … … 334 371 # for the cd-rom we want to include the unbuilt bits of the demo collection too 335 372 my $demodir = &util::filename_cat($cdrom_dist_dir, "gsdl", "collect", "demo"); 336 my $demoetc = &util::filename_cat($demodir, "etc");337 373 my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo"); 338 374 die "oops, no demo dir\n" unless -d $demodir; … … 351 387 352 388 # COPYING, README*.txt and Support.htm 353 &util::cp (&util::filename_cat($doc dir, "COPYING"), $install_dir);354 &util::cp (&util::filename_cat($doc dir, "READMEen.txt"), $install_dir);355 &util::cp (&util::filename_cat($doc dir, "READMEes.txt"), $install_dir);356 &util::cp (&util::filename_cat($doc dir, "READMEfr.txt"), $install_dir);357 &util::cp (&util::filename_cat($doc dir, "READMEru.txt-cp1251"), $install_dir);358 &util::cp (&util::filename_cat($doc dir, "READMEru.txt-koi8-r"), $install_dir);359 &util::cp (&util::filename_cat($doc dir, "Support.htm"), $install_dir);389 &util::cp (&util::filename_cat($docs_dir, "COPYING"), $install_dir); 390 &util::cp (&util::filename_cat($docs_dir, "READMEen.txt"), $install_dir); 391 &util::cp (&util::filename_cat($docs_dir, "READMEes.txt"), $install_dir); 392 &util::cp (&util::filename_cat($docs_dir, "READMEfr.txt"), $install_dir); 393 &util::cp (&util::filename_cat($docs_dir, "READMEru.txt-cp1251"), $install_dir); 394 &util::cp (&util::filename_cat($docs_dir, "READMEru.txt-koi8-r"), $install_dir); 395 &util::cp (&util::filename_cat($docs_dir, "Support.htm"), $install_dir); 360 396 361 397 &force_windows_line_endings(&util::filename_cat($install_dir, "COPYING")); … … 368 404 369 405 # docs directory, but not any of the Word files or Latex files 370 &util::cp_r (&util::filename_cat($doc dir, "docs"), $install_dir);406 &util::cp_r (&util::filename_cat($docs_dir, "docs"), $install_dir); 371 407 $en_docs = &util::filename_cat ($install_dir, "docs", "english", "*.doc"); 372 408 `rm $en_docs`; … … 394 430 &util::cp_r (&util::filename_cat ($tmpdir, "gsdl", "etc"), $gsdldir); 395 431 432 # Get the modified main.cfg file with only core language interfaces enabled 433 &util::cp(&util::filename_cat($for_distributions_dir, "etc", "main.cfg"), &util::filename_cat($gsdldir, "etc")); 434 396 435 &force_windows_line_endings(&util::filename_cat($gsdldir, "cgi-bin", "gsdlsite.cfg")); 397 436 &force_windows_line_endings(&util::filename_cat($gsdldir, "etc", "main.cfg")); … … 420 459 `touch $stringsrbfile`; 421 460 422 # untar Ping.tgz461 # Untar Ping.tgz and XML-Parser.tar.gz 423 462 my $wd = cwd; 424 463 chdir (&util::filename_cat($gsdldir, "perllib", "cpan")); 425 464 `tar xvzf Ping.tgz`; 426 465 unlink ("Ping.tgz"); 466 &util::cp(&util::filename_cat($for_distributions_dir, "perllib", "cpan", "XML-Parser.tar.gz"), 467 &util::filename_cat($gsdldir, "perllib", "cpan")); 468 `tar xvzf XML-Parser.tar.gz`; 469 unlink ("XML-Parser.tar.gz"); 427 470 chdir ($wd); 428 471 … … 448 491 die "Couldn't get built version of demo collection\n"; 449 492 } 493 494 # Get modified version of demo collect.cfg file with only core language strings 495 &util::cp(&util::filename_cat($for_distributions_dir, "collect", "demo", "etc", "collect.cfg"), 496 &util::filename_cat($collectdir, "demo", "etc")); 450 497 } 451 498 … … 525 572 my $makejar_sh = &util::filename_cat($gli_dir, "makejar.sh"); 526 573 `chmod a+x $makejar_sh`; 574 575 # Copy the customised languages.xml file with only core languages enabled 576 &util::cp(&util::filename_cat($for_distributions_dir, "gli", "classes", "xml", "languages.xml"), 577 &util::filename_cat($gli_dir, "classes", "xml")); 527 578 528 579 # Make sure there is a dictionary_en.properties to prevent GLI problems
Note:
See TracChangeset
for help on using the changeset viewer.