Index: set_soenv.1 =================================================================== RCS file: /cvs/oo/tools/config_office/set_soenv.1,v retrieving revision 1.70 diff -c -r1.70 set_soenv.1 *** set_soenv.1 2002/06/13 14:56:32 1.70 --- set_soenv.1 2002/06/17 14:44:15 *************** *** 1,6 **** # # Program: set_soenv.1 ! # Version: 0.1 # Date: 07-06-2000 # Author: Willem van Dorp, Ross Nicholson, Oisin Boydell - Sun Microsystems, Ireland. # --- 1,7 ---- # # Program: set_soenv.1 ! # Version: 0.1 ! # $Id$ # Date: 07-06-2000 # Author: Willem van Dorp, Ross Nicholson, Oisin Boydell - Sun Microsystems, Ireland. # *************** *** 632,637 **** --- 633,639 ---- # Restore white spaces in Windows pathnames. if ( $platform eq "$Winnt") { $JAVA_HOME =~ s/#/ /g; + $JAVA_HOME =~ s/[\s\/]+$//; # remove trailing \n or \/ if there is any. } # 3. Tcsh path. # Check whether autoconf found the Tcsh path. *************** *** 1061,1066 **** --- 1063,1069 ---- # Restore white spaces in Windows pathnames. $PERL_PATH =~ s/#/ /g; + $PERL_PATH =~ s/[\/\s]+$//; # Remove trailing / and spaces $PERL = $PERL_PATH.$ds."perl.exe"; $WIN_HOME = " "; *************** *** 1120,1129 **** $noldPATH =~ s#(\w):#/cygdrive/$1#g; $noldPATH =~ s/\\/\//g; $noldPATH =~ s/;/:/g; } $COMPATH_ROOT = $COMPATH; ! $COMPATH_ROOT =~ s/\/vc98$//; $PATH = $cur_dir. $ps.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$BIN. --- 1123,1143 ---- $noldPATH =~ s#(\w):#/cygdrive/$1#g; $noldPATH =~ s/\\/\//g; $noldPATH =~ s/;/:/g; + } + elsif ( $USE_SHELL eq "4nt" ) + { + # using 4NT.exe with Win32-Perl or similar + + # To make things easier, replace all \w{1}:\ to \w{1}|/ then + # shift it back at once after dealing with the : to ; transformation. + # in WinFormat(). + $noldPATH =~ s!(\w):!$1|!g; + $noldPATH =~ s/\\/\//g; + $noldPATH =~ s/;/:/g; } $COMPATH_ROOT = $COMPATH; ! $COMPATH_ROOT =~ s/\/vc98$//i; $PATH = $cur_dir. $ps.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$BIN. *************** *** 1143,1155 **** } # MSVC++ Environement sets the PATH variable, dont add $COMPATH to $PATH ! # anyway, add if path to compiler isn't already set in PATH ! if ( ! ( $noldPATH =~ /(?:[:]|\A)(?:$COMPATH)(?:[:]|\Z|$ds)/ ) ) { ! $PATH .= $ps.'$COMPATH'.$BIN; } # Check if $PERL_PATH is already set in PATH ! if ( ! ( $noldPATH =~ /(?:[:]|\A)(?:$PERL_PATH)(?:[:]|\Z|$ds)/ ) ) { $PATH .= $ps.'$PERL_PATH'; } --- 1157,1172 ---- } # MSVC++ Environement sets the PATH variable, dont add $COMPATH to $PATH ! # anyway, add if path to compiler isn't already set in PATH ! if ( ! ( $noldPATH =~ /[^\/]*\b$COMPATH\b[^\/]*/ ) ) { ! $PATH .= $ps.'$COMPATH'.$BIN; } + # for MS-Visual Studio 6.0 to find mspdb60.dll (need by CL.EXE C/C++ Compiler) + # and rcdll.dll (need by RC.EXE -- 32 bit Resource Compiler) location. + $PATH .= $ps.$COMPATH_ROOT.'/Common/MSDev98/Bin'; # Check if $PERL_PATH is already set in PATH ! if ( ! ( $noldPATH =~ /[^\/]*\b$PERL_PATH\b[^\/]*/ ) ) { $PATH .= $ps.'$PERL_PATH'; } *************** *** 1760,1770 **** { $retrn = $ds.$_[ 0 ]; } } ! # Check if the last character is a '/'. ! if ( $retrn =~ /\/$/ ) ! { chop( $retrn ); } # Replacing multiple occurences of /. # Done! return( $retrn ); } --- 1777,1800 ---- { $retrn = $ds.$_[ 0 ]; } } ! ! if ($platform eq "$Winnt") ! { # The Perl 5.XXX file tester on Win32s system behave the same ! # on cgywin-build and MSwin32-builds and both using C:// and D://.. ! # syntax (Viva the PERL!) ! $retrn = $_[ 0 ]; ! $retrn =~ s!^/+([c-z])/!$1\|/!i; # for cgywin-b20 ! $retrn =~ s!^/+cygdrive/([c-z])/!$1\|/!i; # for cgywin-1.X.X ! ! # Note: we use |/ to represent :/ to avoid conflict at WinFormat(); } + # Replacing multiple occurences of /. + $retrn =~ s!/+!/!g; + + # kill the last '/','\','\n' if they exists. + $retrn =~ s![\s/\\]+$!!; + # Done! return( $retrn ); } *************** *** 1794,1801 **** } return "false"; } ! else ! { return "true"; } } #------------------------------------------------------------ --- 1824,1842 ---- } return "false"; } ! elsif( $platform eq $Winnt ) ! { ! # remember we've use |/ to replace :/ to ! # avoid conflict in WinFormat(); ! ! $dir =~ s!\|!:/!; # change it back here! ! unless( -d $dir ) ! { AddWarning( "set_soenv", ! "Directory $_[ 0 ] does not exist on your system." ); ! return "false"; ! } ! ! return "true" } } #------------------------------------------------------------ *************** *** 1831,1837 **** { if ( $_[ 2 ] eq "e" ) { # Write an environment variable to file. if (defined $_[ 1 ]) ! { printf("%-12s %-17s %-10s %-39s\n", "The variable", $_[ 0 ], "is set to:", $_[ 1 ]) ; # to stdout if (( $platform ne "$Winnt" ) or ( $USE_SHELL ne "4nt" )) { print OUT "$setenv $_[ 0 ] $_[ 1 ] $newline"; # to file } --- 1872,1880 ---- { if ( $_[ 2 ] eq "e" ) { # Write an environment variable to file. if (defined $_[ 1 ]) ! { ! printf("%-12s %-17s %-10s %-39s\n", ! "The variable", $_[ 0 ], "is set to:", $_[ 1 ]); # to stdout if (( $platform ne "$Winnt" ) or ( $USE_SHELL ne "4nt" )) { print OUT "$setenv $_[ 0 ] $_[ 1 ] $newline"; # to file } *************** *** 1921,1932 **** $variable =~ s/^"//; $variable =~ s/"$//; if ( $cygwinver eq "b" ) ! { $variable =~ s/\//\\/g; $variable =~ s/\$/%/g; ! $variable =~ s/:/;/g; ! $variable =~ s/^\\\\(\w)\\/$1:\\/g; ! $variable =~ s/^\\/$SYSTEMDRIVE\\/; ! $variable =~ s/;\\/;$SYSTEMDRIVE\\/g; } else { --- 1964,1977 ---- $variable =~ s/^"//; $variable =~ s/"$//; if ( $cygwinver eq "b" ) ! { $variable =~ s!//([c-z])/!$1\|/!gi; # for cgywin-b20 ! $variable =~ s!/+cygdrive/([c-z])/!$1\|/!gi; # for cgywin-1.X.X ! $variable =~ s/:/;/g; ! $variable =~ s/\//\\/g; $variable =~ s/\$/%/g; ! # $variable =~ s/^\\\\(\w)\\/$1:\\/g; ! # $variable =~ s/^\\/$SYSTEMDRIVE\\/; ! # $variable =~ s/;\\/;$SYSTEMDRIVE\\/g; } else { *************** *** 1971,1976 **** --- 2016,2022 ---- $variable =~ s/\//\\/g; # Remaining \ come from e.g.: ../foo/baa } + $variable =~ s!\|\\!:\\!g; return $variable; } #----------------------------------------------------------