Changeset 19409


Ignore:
Timestamp:
05/12/09 17:29:56 (12 years ago)
Author:
ak19
Message:

Getting the incremental build scripts to work on Windows (it already works on the Vista here, but only because .pl files were associated with Perl).

Location:
gsdl/trunk/bin/script
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/bin/script/full-buildcol.pl

    r18470 r19409  
    3030# Runs:        buildcol.pl -removeold ...
    3131
     32BEGIN {
     33    die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'};
     34    # for windows, need PERLPATH in order to launch Perl
     35    if($ENV{'GSDLOS'} =~ m/windows/) {
     36    die "PERLPATH, which is required for Windows, is not set.\n" unless defined $ENV{'PERLPATH'};
     37    }
     38}
    3239
    3340use strict;
     
    3744
    3845my $buildcol_cmd = "buildcol.pl -removeold $quoted_argv";
     46if($ENV{'GSDLOS'} =~ m/windows/) {
     47    $buildcol_cmd = "$ENV{'PERLPATH'}\\Perl.exe -S $buildcol_cmd";
     48    #$buildcol_cmd = "perl -S $buildcol_cmd";
     49}
    3950
    4051my $buildcol_status = system($buildcol_cmd)/256;
  • gsdl/trunk/bin/script/full-import.pl

    r18470 r19409  
    3131
    3232
     33BEGIN {
     34    die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'};
     35    # for windows, need PERLPATH in order to launch Perl
     36    if($ENV{'GSDLOS'} =~ m/windows/) {
     37    die "PERLPATH, which is required for Windows, is not set.\n" unless defined $ENV{'PERLPATH'};
     38    }
     39}
     40
    3341use strict;
    3442
    3543my $quoted_argv = join(" ", map { "\"$_\"" } @ARGV);
    3644
    37 
    3845my $import_cmd = "import.pl -removeold $quoted_argv";
     46if($ENV{'GSDLOS'} =~ m/windows/) {
     47    $import_cmd = "$ENV{'PERLPATH'}\\Perl.exe -S $import_cmd";
     48    #$import_cmd = "perl -S $import_cmd";
     49}
    3950
    4051my $import_status = system($import_cmd)/256;
  • gsdl/trunk/bin/script/full-rebuild.pl

    r18529 r19409  
    3737    die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'};
    3838    unshift (@INC, "$ENV{'GSDLHOME'}/perllib");
     39
     40    # for windows, need PERLPATH in order to launch Perl
     41    if($ENV{'GSDLOS'} =~ m/windows/) {
     42     die "PERLPATH, which is required for Windows, is not set.\n" unless defined $ENV{'PERLPATH'};
     43    }
    3944}
    4045
     
    102107   
    103108    my $final_status = 0;
     109
     110    my $launch_cmd = "";
     111    $launch_cmd = "$ENV{'PERLPATH'}\\Perl.exe -S " if($ENV{'GSDLOS'} =~ m/windows/);
    104112   
    105113    print "\n";
     
    107115    print "* Running  Import  Stage\n";
    108116    print "************************\n";
    109    
    110     my $import_cmd = "full-import.pl $quoted_argv \"$collect\"";
    111    
     117
     118    my $import_cmd = $launch_cmd . "full-import.pl $quoted_argv \"$collect\"";
     119
    112120    my $import_status = system($import_cmd)/256;
    113121   
     
    118126    print "************************\n";
    119127   
    120     my $buildcol_cmd = "full-buildcol.pl $quoted_argv \"$collect\"";
     128    my $buildcol_cmd = $launch_cmd . "full-buildcol.pl $quoted_argv \"$collect\"";
    121129    my $buildcol_status = system($buildcol_cmd)/256;
    122130    if ($buildcol_status == 0) {
  • gsdl/trunk/bin/script/incremental-buildcol.pl

    r18511 r19409  
    3535    die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'};
    3636    unshift (@INC, "$ENV{'GSDLHOME'}/perllib");
     37
     38    # for windows, need PERLPATH in order to launch Perl
     39    if($ENV{'GSDLOS'} =~ m/windows/) {
     40     die "PERLPATH, which is required for Windows, is not set.\n" unless defined $ENV{'PERLPATH'};
     41    }
    3742}
    3843
     
    104109
    105110    my $buildcol_cmd = "buildcol.pl";
     111    if($ENV{'GSDLOS'} =~ m/windows/) {
     112    $buildcol_cmd = "$ENV{'PERLPATH'}\\Perl.exe -S $buildcol_cmd";
     113    #$buildcol_cmd = "perl -S $buildcol_cmd";
     114    }
    106115
    107116    if (-e $build_cfg_filename) {
  • gsdl/trunk/bin/script/incremental-import.pl

    r18660 r19409  
    3636    die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'};
    3737    unshift (@INC, "$ENV{'GSDLHOME'}/perllib");
     38
     39    # for windows, need PERLPATH in order to launch Perl
     40    if($ENV{'GSDLOS'} =~ m/windows/) {
     41     die "PERLPATH, which is required for Windows, is not set.\n" unless defined $ENV{'PERLPATH'};
     42    }
    3843}
    3944
     
    107112
    108113    my $import_cmd = "import.pl";
     114    if($ENV{'GSDLOS'} =~ m/windows/) {
     115    $import_cmd = "$ENV{'PERLPATH'}\\Perl.exe -S $import_cmd";
     116    #$import_cmd = "perl -S $import_cmd";
     117    }
    109118    if (-e $archiveinf_doc) {
    110119    $import_cmd .= " -incremental";
  • gsdl/trunk/bin/script/incremental-rebuild.pl

    r18510 r19409  
    3737    die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'};
    3838    unshift (@INC, "$ENV{'GSDLHOME'}/perllib");
     39
     40    # for windows, need PERLPATH in order to launch Perl
     41    if($ENV{'GSDLOS'} =~ m/windows/) {
     42     die "PERLPATH, which is required for Windows, is not set.\n" unless defined $ENV{'PERLPATH'};
     43    }
    3944}
    4045
     
    6570    my $final_status = 0;
    6671   
     72    my $launch_cmd = "";
     73    $launch_cmd = "$ENV{'PERLPATH'}\\Perl.exe -S " if($ENV{'GSDLOS'} =~ m/windows/);
     74
    6775    print "\n";
    6876    print "************************\n";
     
    7078    print "************************\n";
    7179   
    72     my $import_cmd = "incremental-import.pl $quoted_argv \"$collect\"";
     80    my $import_cmd = $launch_cmd . "incremental-import.pl $quoted_argv \"$collect\"";
    7381   
    7482    my $import_status = system($import_cmd)/256;
     
    8189   
    8290
    83     my $buildcol_cmd = "incremental-buildcol.pl $quoted_argv \"$collect\"";
     91    my $buildcol_cmd = $launch_cmd . "incremental-buildcol.pl $quoted_argv \"$collect\"";
    8492    my $buildcol_status = system($buildcol_cmd)/256;
    8593    if ($buildcol_status != 0) {
Note: See TracChangeset for help on using the changeset viewer.