home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 1997 / CT_SW_97.ISO / mac / Software / entwickl / win95 / plsei306.exe / bin / perlscript-install.bat next >
DOS Batch File  |  1996-12-12  |  2KB  |  79 lines

  1. @rem = '--*-Perl-*--';      
  2. @rem = '
  3. @echo off
  4. if exist perl.exe goto perlhere
  5. cd bin
  6. if not exist perl.exe goto perlnotthere
  7. :perlhere
  8. if not exist Perl300.dll goto perlnotthere
  9. if not exist Perlglob.exe goto perlnotthere
  10. if not exist PerlSE.dll goto perlscriptnotthere
  11. echo  Installing PerlScript
  12. pause
  13. perl.exe PerlScript-install.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
  14. if errorlevel 1 goto perlerror
  15. goto endofperl
  16. @rem ';
  17.  
  18. BEGIN{
  19.     @INC = qw( ..\Lib ..\Ext );
  20.  
  21. };
  22.  
  23. # xxx get rid of this dpreciated syntax !!!!
  24.  
  25. #(c) 1996 Microsoft Corporation. All rights reserved. 
  26. #    Developed by ActiveWare Internet Corp., http://www.ActiveWare.com
  27.  
  28.  
  29. require 'NT.ph';
  30. require 'ctime.pl';
  31.  
  32. $date = ctime( time );
  33.  
  34. sub MyLog ($) {
  35.     ( $message ) = @_;
  36.     print LOG $message;
  37.     print $message;
  38. }
  39.  
  40. sub gripe ($) {
  41.     ( $message ) = @_;
  42.     print LOG $message;
  43.     warn $message;
  44. }
  45.  
  46.  
  47. open ( LOG, '>>install.log' ) || warn "Couldn't open log file!\n";
  48.  
  49. MyLog( '***** '.$date );
  50.  
  51.  
  52. chop( $perldir = `cd` );
  53.  
  54. MyLog( "Installing PerlScript into $perldir" );
  55.  
  56. Win32::RegisterServer('PerlSE.dll') ?
  57.     MyLog ("\nPerlScript installed successfully") :
  58.     gripe ("\nError registering PerlSE.dll");
  59.  
  60. print "\nopening release.txt...\n";
  61.  
  62. __END__
  63. :perlerror
  64. echo UH-OH... something bad happened
  65. goto done
  66. :perlnotthere
  67. echo Could not find Perl interpreter!!
  68. echo *gasp* *wheez* *choke*
  69. echo Did you install PerlScript into the same directory 
  70. echo as Perl for Win32???
  71. echo You need to install Perl for Win32 before PerlScript
  72. goto endofperl
  73. :perlscriptnotthere
  74. echo Did you install PerlScript into the same directory as Perl?
  75. :endofperl
  76. notepad ..\docs\PerlScript\release.txt
  77. :done
  78. pause
  79.