Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @rem = '--*-Perl-*--
- @echo off
- if exist .\perl\perl\bin\perl.exe goto perlexefound
- echo.
- echo ERROR: Can not find .\perl\bin\perl.exe
- echo This installation is incomplete.
- echo Make sure that the downloaded file is complete.
- echo Make sure that your unzip pogram extracts subdirectories
- echo and preserves long filenames.
- echo.
- goto endofperl
- :perlexefound
- .\perl\perl\bin\perl -w -T -I.\perl\perl\lib run.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
- goto endofperl
- @rem ';
- #!perl -w
- #################################################################
- #
- # script to execute tinyweb webserver and run TWiki
- #
- #################################################################
- @rem = (); # eliminate warning
- use Cwd;
- use strict;
- print "\nThis script executes the tinyweb webserver service and launches the TWiki homepage\n\n";
- print "Environment variable PERLLIB is set to $ENV{PERLLIB}\n\n" if $ENV{PERLLIB};
- print "Environment variable PER5LLIB is set to $ENV{PERL5LIB}\n\n" if $ENV{PERL5LIB};
- my $cwd = Cwd::cwd();
- open( BATCH, ">$cwd/tools/start.bat" ) or die "Can't create $cwd/tools/start.bat";
- $cwd =~ s/\//\\/;
- print BATCH "\@REM Auto-generated by run.bat, do not modify\n";
- print BATCH "cd $cwd\\logs\n";
- print BATCH "start $cwd\\tinyweb\\tinyweb.exe $cwd\\htdocs 8765 127.0.0.1 .pl $cwd\\perl\\perl\\bin\\perl.exe -T\n";
- print BATCH "start $cwd\\tools\\start.url\n";
- close( BATCH );
- exec( "$cwd\\tools\\start.bat" );
- #chdir( './logs' );
- #system( 'start', '$cwd.'\tinyweb\tinyweb.exe', $cwd.'\htdocs', '8765', '127.0.0.1', '.pl', $cwd.'\perl\perl\bin\perl.exe' );
- #my $cmd= 'start '.$cwd.'\tinyweb\tinyweb.exe '.$cwd.'\htdocs 8765 127.0.0.1 .pl '.$cwd.'\perl\perl\bin\perl.exe';
- #print "cmd: $cmd\n";
- #`$cmd`;
- #print "exec: $cwd\twiki.url\n";
- #exec( $cwd.'\twiki.url' );
- __END__
- :endofperl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement