Changeset 24612


Ignore:
Timestamp:
2011-09-20T15:09:21+12:00 (13 years ago)
Author:
ak19
Message:

Windows specific changes to gs-magick.pl and setup.bat: bat file used to add bin\windows\imagemagick to path (not bin\windows\imagemagick\bin). It no longer does that, and gs-magick.pl sets this.

Location:
main/trunk/greenstone2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/gs-magick.pl

    r24606 r24612  
    9999    # imagick to fall back on (and set MAGICK_HOME that way) we use that
    100100    if(defined $ENV{'MAGICK_HOME'} && -d $ENV{'MAGICK_HOME'}) {
    101     &util::envvar_prepend("PATH", &util::filename_cat($ENV{'MAGICK_HOME'}, "bin"));
    102 
    103     my $magick_lib = &util::filename_cat($ENV{'MAGICK_HOME'}, "lib");
    104     if($ENV{'GSDLOS'} eq "linux") {
    105         &util::envvar_prepend("LD_LIBRARY_PATH", $magick_lib);
    106     } elsif ($ENV{'GSDLOS'} eq "darwin") {
    107         &util::envvar_prepend("DYLD_LIBRARY_PATH", $magick_lib);
     101    if($ENV{'GSDLOS'} =~ m/windows/) {
     102        &util::envvar_prepend("PATH", $ENV{'MAGICK_HOME'}); # the imagemagick folder (no bin therein)
     103    }
     104 
     105    else { # linux and mac
     106        &util::envvar_prepend("PATH", &util::filename_cat($ENV{'MAGICK_HOME'}, "bin"));
     107   
     108        my $magick_lib = &util::filename_cat($ENV{'MAGICK_HOME'}, "lib");
     109        if($ENV{'GSDLOS'} eq "linux") {
     110        &util::envvar_prepend("LD_LIBRARY_PATH", $magick_lib);
     111        } elsif ($ENV{'GSDLOS'} eq "darwin") {
     112        &util::envvar_prepend("DYLD_LIBRARY_PATH", $magick_lib);
     113        }
    108114    }
    109115
    110116    if($verbosity > 2) {
    111117        print STDERR "\t*** MAGICK_HOME".$ENV{'MAGICK_HOME'}."\n";
    112         print STDERR "\t*** LD_LIB_PATH".$ENV{'LD_LIBRARY_PATH'}."\n";
     118        print STDERR "\t*** LD_LIB_PATH".$ENV{'LD_LIBRARY_PATH'}."\n" if defined $ENV{'LD_LIBRARY_PATH'};
     119        print STDERR "\t*** DYLD_LIB_PATH".$ENV{'DYLD_LIBRARY_PATH'}."\n" if defined $ENV{'DYLD_LIBRARY_PATH'};
    113120        print STDERR "\t*** PATH".$ENV{'PATH'}."\n\n";
    114121    }
  • main/trunk/greenstone2/setup.bat

    r24373 r24612  
    3636if exist "!GSDLHOME!\bin\windows\ghostscript\lib\*.*" set GS_LIB=!GSDLHOME!\bin\windows\ghostscript\lib
    3737if exist "!GSDLHOME!\bin\windows\ghostscript\bin\*.*" set PATH=!GSDLHOME!\bin\windows\ghostscript\bin;!PATH!
    38 if exist "!GSDLHOME!\bin\windows\imagemagick\*.*" set PATH=!GSDLHOME!\bin\windows\imagemagick;!PATH!
     38:: ImageMagick environment vars are now set in bin\script\gs-magick.pl
     39::if exist "!GSDLHOME!\bin\windows\imagemagick\*.*" set PATH=!GSDLHOME!\bin\windows\imagemagick;!PATH!
    3940
    4041if "!GS_CP_SET!" == "yes" goto Success
     
    6364if exist "!GSDLHOME!\bin\windows\ghostscript\lib\*.*" set GS_LIB="!GSDLHOME!\bin\windows\ghostscript\lib"
    6465if exist "!GSDLHOME!\bin\windows\ghostscript\bin\*.*" set PATH="!GSDLHOME!\bin\windows\ghostscript\bin";"!PATH!"
    65 if exist "!GSDLHOME!\bin\windows\imagemagick\*.*" set PATH="!GSDLHOME!\bin\windows\imagemagick";"!PATH!"
     66:: ImageMagick environment vars are now set in bin\script\gs-magick.pl
     67::if exist "!GSDLHOME!\bin\windows\imagemagick\*.*" set PATH="!GSDLHOME!\bin\windows\imagemagick";"!PATH!"
    6668
    6769if "!GS_CP_SET!" == "yes" goto Success
Note: See TracChangeset for help on using the changeset viewer.