Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.4 KiB

  1. # This script sets up VMPI.
  2. $pathToExes = "..\\..\\..\\game\\bin"; # assuming we're under hl2\src\devtools\bin.
  3. my $baseNetworkPath = @ARGV[0];
  4. if ( $baseNetworkPath )
  5. {
  6. my @filesToCopy = (
  7. "tier0.dll",
  8. "vstdlib.dll",
  9. "vmpi_service.exe",
  10. "vmpi_service_ui.exe",
  11. "vmpi_service_install.exe",
  12. "WaitAndRestart.exe",
  13. "vmpi_transfer.exe",
  14. "filesystem_stdio.dll" );
  15. # Verify that the files we're interested in exist.
  16. foreach $filename ( @filesToCopy )
  17. {
  18. my $fullFilename = "$pathToExes\\$filename";
  19. if ( !( -e $fullFilename ) )
  20. {
  21. die "Missing $fullFilename.\n";
  22. }
  23. }
  24. # Create the directories on the network.
  25. if ( !( -e $baseNetworkPath ) )
  26. {
  27. mkdir $baseNetworkPath or die "Can't create directory: $baseNetworkPath";
  28. }
  29. if ( !( -e "$baseNetworkPath\\services" ) )
  30. {
  31. mkdir( "$baseNetworkPath\\services" ) or die "ERROR: Can't create directory: $baseNetworkPath\\services";
  32. }
  33. # Now copy all the files up.
  34. foreach $filename ( @filesToCopy )
  35. {
  36. my $fullFilename = "$pathToExes\\$filename";
  37. `"copy $fullFilename $baseNetworkPath\\services"`;
  38. }
  39. print "\n";
  40. print "Finished installing VMPI into $baseNetworkPath.\n\n";
  41. print "Have all available worker machines run:\n";
  42. print " $baseNetworkPath\\services\\vmpi_service_install.exe\n";
  43. print "to setup the worker service.\n";
  44. }
  45. else
  46. {
  47. print "setup_vmpi.pl <UNC path to a server all machines can access>\n";
  48. print "example: setup_vmpi.pl \\\\ftknox\\scratch\\vmpi\n";
  49. }