Ignore:
Timestamp:
2005-03-23T14:22:26+12:00 (19 years ago)
Author:
nzdl
Message:

Lots of improvements for the Installshield X installer and also commented out some unused code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/for-distributions/bin/script/create_distributions.pl

    r9254 r9492  
    157157    `makegli.sh`;
    158158
    159     # JAR up the gli, then clean up the class files
     159    # JAR up the gli, then delete the class files
    160160    print STDERR "jarring gli...\n";
    161161    `makejar.sh`;
    162162    &util::rm_r(&util::filename_cat($tmpdir, "gsdl", "gli", "jar"));
    163163    &util::rm(&util::filename_cat($tmpdir, "gsdl", "gli", "metadata.zip"));
    164     `clean.sh`;
     164    &util::rm_r(&util::filename_cat($tmpdir, "gsdl", "gli", "classes", "org"));
    165165
    166166    # Remove bits used by none of the distributions
    167167    &util::rm(&util::filename_cat($tmpdir, "gsdl", "packages", "cpan", "XML-Parser-2.27.tar.gz"));
    168     &util::rm(&util::filename_cat($tmpdir, "gsdl", "packages", "kea", "kea-3.0", "CSTR"));
    169168
    170169    # copy ChangeLog into $tmpdir/gsdl
     
    181180    }
    182181
    183     &create_collection_distributions() unless $no_cols;
    184 }
    185 
    186 
    187 sub create_windows_distribution {
    188     print STDERR "Creating Windows distribution...\n";
    189 
    190     my $windows_dist_dir = &util::filename_cat($output_dir, "gsdl-" . $version_num . "-win32");
    191     mkdir ($windows_dist_dir, 0777);
    192 
    193     # empty "collect" directory (just because all the other distributions have one)
    194     mkdir (&util::filename_cat($windows_dist_dir, "collect"), 0777);
    195 
    196     # docs directory (with none of the manuals), README.TXT, COPYING and Support.htm
    197     &install_docs ($windows_dist_dir, 1);
    198 
    199     # gsdl directory
    200     &install_gsdl ($windows_dist_dir);
    201 
    202     # gli directory (in gsdl)
    203     &install_gli($windows_dist_dir, "windows");
    204 
    205     # src directory
    206     &install_src ($windows_dist_dir, "windows");
    207 
    208     # Windows directory
    209     &install_windows_specific ($windows_dist_dir, 0);
    210 
    211     # we want to include the unbuilt bits of the demo collection too
    212     my $demodir = &util::filename_cat($windows_dist_dir, "gsdl", "collect", "demo");
    213     my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo");
    214     die "oops, no demo dir\n" unless -d $demodir;
    215     &util::cp (&util::filename_cat ($tmpdemo, "demo.col"), $demodir);
    216     &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir);
    217     &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir);
    218 }
     182    # &create_collection_distributions() unless $no_cols;
     183}
     184
     185
     186# sub create_windows_distribution {
     187#     print STDERR "Creating Windows distribution...\n";
     188
     189#     my $windows_dist_dir = &util::filename_cat($output_dir, "gsdl-" . $version_num . "-win32");
     190#     mkdir ($windows_dist_dir, 0777);
     191
     192#     # empty "collect" directory (just because all the other distributions have one)
     193#     mkdir (&util::filename_cat($windows_dist_dir, "collect"), 0777);
     194
     195#     # docs directory (with none of the manuals), README.TXT, COPYING and Support.htm
     196#     &install_docs ($windows_dist_dir, 1);
     197
     198#     # gsdl directory
     199#     &install_gsdl ($windows_dist_dir);
     200
     201#     # gli directory (in gsdl)
     202#     &install_gli($windows_dist_dir, "windows");
     203
     204#     # src directory
     205#     &install_src ($windows_dist_dir, "windows");
     206
     207#     # Windows directory
     208#     &install_windows_specific ($windows_dist_dir, 0);
     209
     210#     # we want to include the unbuilt bits of the demo collection too
     211#     my $demodir = &util::filename_cat($windows_dist_dir, "gsdl", "collect", "demo");
     212#     my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo");
     213#     die "oops, no demo dir\n" unless -d $demodir;
     214#     &util::cp (&util::filename_cat ($tmpdemo, "demo.col"), $demodir);
     215#     &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir);
     216#     &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir);
     217# }
    219218
    220219
     
    250249
    251250
    252 sub create_unix_distribution_old {
    253     print STDERR "Creating Unix distribution...\n";
    254 
    255     my $unix_dist_dir = &util::filename_cat($output_dir, "gsdl-" . $version_num . "-unix");
    256     mkdir ($unix_dist_dir, 0777);
    257 
    258     # empty "collect" directory
    259     mkdir (&util::filename_cat($unix_dist_dir, "collect"), 0777);
    260 
    261     # docs directory (with none of the manuals), README.TXT, COPYING and Support.htm
    262     &install_docs ($unix_dist_dir, 1);
    263 
    264     # Don't need Windows README file
    265     &util::rm(&util::filename_cat($unix_dist_dir, "READMEru.txt-cp1251"));
    266 
    267     # Rename Unix README file
    268     &util::cp(&util::filename_cat($unix_dist_dir, "READMEru.txt-koi8-r"),
    269           &util::filename_cat($unix_dist_dir, "READMEru.txt"));
    270     &util::rm(&util::filename_cat($unix_dist_dir, "READMEru.txt-koi8-r"));
    271 
    272     # gsdl directory
    273     &install_gsdl ($unix_dist_dir);
    274 
    275     # gli directory (in gsdl)
    276     &install_gli($unix_dist_dir, "unix");
    277 
    278     # src directory
    279     &install_src ($unix_dist_dir, "unix");
    280 
    281     # Unix directory
    282     &install_unix_specific ($unix_dist_dir);
    283 
    284     # Make sure all configure scripts are executable
    285     `cd $unix_dist_dir; pwd; find -name "configure" -exec chmod a+x {} \\;`;
    286 
    287     # we want to include the unbuilt bits of the demo collection too
    288     my $demodir = &util::filename_cat($unix_dist_dir, "gsdl", "collect", "demo");
    289     my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo");
    290     die "oops, no demo dir\n" unless -d $demodir;
    291     &util::cp (&util::filename_cat ($tmpdemo, "demo.col"), $demodir);
    292     &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir);
    293     &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir);
    294 }
     251# sub create_unix_distribution_old {
     252#     print STDERR "Creating Unix distribution...\n";
     253
     254#     my $unix_dist_dir = &util::filename_cat($output_dir, "gsdl-" . $version_num . "-unix");
     255#     mkdir ($unix_dist_dir, 0777);
     256
     257#     # empty "collect" directory
     258#     mkdir (&util::filename_cat($unix_dist_dir, "collect"), 0777);
     259
     260#     # docs directory (with none of the manuals), README.TXT, COPYING and Support.htm
     261#     &install_docs ($unix_dist_dir, 1);
     262
     263#     # Don't need Windows README file
     264#     &util::rm(&util::filename_cat($unix_dist_dir, "READMEru.txt-cp1251"));
     265
     266#     # Rename Unix README file
     267#     &util::cp(&util::filename_cat($unix_dist_dir, "READMEru.txt-koi8-r"),
     268#         &util::filename_cat($unix_dist_dir, "READMEru.txt"));
     269#     &util::rm(&util::filename_cat($unix_dist_dir, "READMEru.txt-koi8-r"));
     270
     271#     # gsdl directory
     272#     &install_gsdl ($unix_dist_dir);
     273
     274#     # gli directory (in gsdl)
     275#     &install_gli($unix_dist_dir, "unix");
     276
     277#     # src directory
     278#     &install_src ($unix_dist_dir, "unix");
     279
     280#     # Unix directory
     281#     &install_unix_specific ($unix_dist_dir);
     282
     283#     # Make sure all configure scripts are executable
     284#     `cd $unix_dist_dir; pwd; find -name "configure" -exec chmod a+x {} \\;`;
     285
     286#     # we want to include the unbuilt bits of the demo collection too
     287#     my $demodir = &util::filename_cat($unix_dist_dir, "gsdl", "collect", "demo");
     288#     my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo");
     289#     die "oops, no demo dir\n" unless -d $demodir;
     290#     &util::cp (&util::filename_cat ($tmpdemo, "demo.col"), $demodir);
     291#     &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir);
     292#     &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir);
     293# }
    295294
    296295
     
    333332
    334333    # Make sure there is a dictionary_en.properties to prevent GLI problems
    335     &util::cp(&util::filename_cat($source_dist_dir, "gsdl", "gli", "classes", "dictionary.properties"),
    336           &util::filename_cat($source_dist_dir, "gsdl", "gli", "classes", "dictionary_en.properties"));
     334    # &util::cp(&util::filename_cat($source_dist_dir, "gsdl", "gli", "classes", "dictionary.properties"),
     335    #       &util::filename_cat($source_dist_dir, "gsdl", "gli", "classes", "dictionary_en.properties"));
    337336
    338337    # (We don't include the built demo collection in the source distribution)
     
    376375    &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir);
    377376    &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir);
     377
     378    # Include the documented example collections
     379    my $source_collect_dir = &util::filename_cat($for_distributions_dir, "collect");
     380    my $target_collect_dir = &util::filename_cat($cdrom_dist_dir, "collect");
     381
     382    &util::cp_r(&util::filename_cat($source_collect_dir, "MARC-e"), $target_collect_dir);
     383    &util::cp_r(&util::filename_cat($source_collect_dir, "authen-e"), $target_collect_dir);
     384    &util::cp_r(&util::filename_cat($source_collect_dir, "cltbib-e"), $target_collect_dir);
     385    &util::cp_r(&util::filename_cat($source_collect_dir, "cltext-e"), $target_collect_dir);
     386    &util::cp_r(&util::filename_cat($source_collect_dir, "dls-e"), $target_collect_dir);
     387    &util::cp_r(&util::filename_cat($source_collect_dir, "garish"), $target_collect_dir);
     388    &util::cp_r(&util::filename_cat($source_collect_dir, "gsarch-e"), $target_collect_dir);
     389    &util::cp_r(&util::filename_cat($source_collect_dir, "image-e"), $target_collect_dir);
     390    &util::cp_r(&util::filename_cat($source_collect_dir, "isis-e"), $target_collect_dir);
     391    &util::cp_r(&util::filename_cat($source_collect_dir, "oai-e"), $target_collect_dir);
     392    &util::cp_r(&util::filename_cat($source_collect_dir, "wrdpdf-e"), $target_collect_dir);
    378393
    379394    # Make sure the whole thing is user-writeable
     
    596611
    597612    # Make sure there is a dictionary_en.properties to prevent GLI problems
    598     &util::cp(&util::filename_cat($gli_dir, "classes", "dictionary.properties"),
    599           &util::filename_cat($gli_dir, "classes", "dictionary_en.properties"));
     613    # &util::cp(&util::filename_cat($gli_dir, "classes", "dictionary.properties"),
     614#         &util::filename_cat($gli_dir, "classes", "dictionary_en.properties"));
    600615
    601616    # Remove unwanted stuff - all distributions
     
    913928    my ($tag, $date, $file);
    914929
    915     my $datefile = &util::filename_cat ($ENV{'GSDLHOME'}, "DistDates");
     930    my $datefile = &util::filename_cat ($for_distributions_dir, "DistDates");
    916931    if ($changelogdate !~ /\w/) {
    917     # get date from $GSDLHOME/DistDates (and update DistDates)
     932    # get date from for-distributions/DistDates (and update DistDates)
    918933    open (DATES, $datefile) || die "can't open $datefile\n";
    919934    my $line = "";
     
    938953
    939954    chdir($ENV{'GSDLHOME'});
    940     my $cmd = "cvs2cl.pl -P -F trunk -r -S -l \"-d'$changelogdate<tomorrow'\"";
     955    my $cmd = "$for_distributions_dir/bin/script/cvs2cl.pl -P -F trunk -r -S -l \"-d'$changelogdate<tomorrow'\"";
    941956    system ($cmd);
    942957}
     
    945960# makes a copy of the initial version of gsdlsite.cfg in
    946961# /tmp (if it doesn't exist already).
    947 sub edit_gsdlsite {
    948     my ($gsdlhome) = @_;
    949 
    950     my $gsdlsite_file = &util::filename_cat ($tmpdir, "gsdl", "cgi-bin", "gsdlsite.cfg");
    951     my $tmp_gsdlsite_file = &util::filename_cat ($tmpdir, "gsdlsite.cfg");
    952 
    953     if (-e $tmp_gsdlsite_file) {
    954     &util::cp ($tmp_gsdlsite_file, $gsdlsite_file);
    955     } else {
    956     &util::cp ($gsdlsite_file, $tmp_gsdlsite_file);
    957     }
    958 
    959     open (GSDLSITE, $gsdlsite_file) || die;
    960     my $line = ""; my $file = ""; my $found = 0;
    961     while (defined ($line = <GSDLSITE>)) {
    962     if ($line =~ s/\*\*GSDLHOME\*\*/$gsdlhome/g) {
    963         $found = 1;
    964     }
    965     $file .= $line;
    966     }
    967     close GSDLSITE;
    968 
    969     if (!$found) {
    970     die "ERROR: $gsdlsite_file contains no **GSDLHOME** string\n";
    971     }
    972 
    973     open (GSDLSITE, ">$gsdlsite_file") || die;
    974     print GSDLSITE $file;
    975     close GSDLSITE;
    976 }
     962# sub edit_gsdlsite {
     963#     my ($gsdlhome) = @_;
     964
     965#     my $gsdlsite_file = &util::filename_cat ($tmpdir, "gsdl", "cgi-bin", "gsdlsite.cfg");
     966#     my $tmp_gsdlsite_file = &util::filename_cat ($tmpdir, "gsdlsite.cfg");
     967
     968#     if (-e $tmp_gsdlsite_file) {
     969#   &util::cp ($tmp_gsdlsite_file, $gsdlsite_file);
     970#     } else {
     971#   &util::cp ($gsdlsite_file, $tmp_gsdlsite_file);
     972#     }
     973
     974#     open (GSDLSITE, $gsdlsite_file) || die;
     975#     my $line = ""; my $file = ""; my $found = 0;
     976#     while (defined ($line = <GSDLSITE>)) {
     977#   if ($line =~ s/\*\*GSDLHOME\*\*/$gsdlhome/g) {
     978#       $found = 1;
     979#   }
     980#   $file .= $line;
     981#     }
     982#     close GSDLSITE;
     983
     984#     if (!$found) {
     985#   die "ERROR: $gsdlsite_file contains no **GSDLHOME** string\n";
     986#     }
     987
     988#     open (GSDLSITE, ">$gsdlsite_file") || die;
     989#     print GSDLSITE $file;
     990#     close GSDLSITE;
     991# }
    977992
    978993# currently just checks that iconcollection fields are correct and that
Note: See TracChangeset for help on using the changeset viewer.