summaryrefslogtreecommitdiff
path: root/devtools/bin/setup_vmpi.pl
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/bin/setup_vmpi.pl')
-rw-r--r--devtools/bin/setup_vmpi.pl60
1 files changed, 60 insertions, 0 deletions
diff --git a/devtools/bin/setup_vmpi.pl b/devtools/bin/setup_vmpi.pl
new file mode 100644
index 0000000..63fe12e
--- /dev/null
+++ b/devtools/bin/setup_vmpi.pl
@@ -0,0 +1,60 @@
+
+# This script sets up VMPI.
+
+$pathToExes = "..\\..\\..\\game\\bin"; # assuming we're under hl2\src\devtools\bin.
+my $baseNetworkPath = @ARGV[0];
+
+if ( $baseNetworkPath )
+{
+ my @filesToCopy = (
+ "tier0.dll",
+ "vstdlib.dll",
+ "vmpi_service.exe",
+ "vmpi_service_ui.exe",
+ "vmpi_service_install.exe",
+ "WaitAndRestart.exe",
+ "vmpi_transfer.exe",
+ "filesystem_stdio.dll" );
+
+ # Verify that the files we're interested in exist.
+ foreach $filename ( @filesToCopy )
+ {
+ my $fullFilename = "$pathToExes\\$filename";
+ if ( !( -e $fullFilename ) )
+ {
+ die "Missing $fullFilename.\n";
+ }
+ }
+
+ # Create the directories on the network.
+ if ( !( -e $baseNetworkPath ) )
+ {
+ mkdir $baseNetworkPath or die "Can't create directory: $baseNetworkPath";
+ }
+
+ if ( !( -e "$baseNetworkPath\\services" ) )
+ {
+ mkdir( "$baseNetworkPath\\services" ) or die "ERROR: Can't create directory: $baseNetworkPath\\services";
+ }
+
+
+ # Now copy all the files up.
+ foreach $filename ( @filesToCopy )
+ {
+ my $fullFilename = "$pathToExes\\$filename";
+ `"copy $fullFilename $baseNetworkPath\\services"`;
+ }
+
+ print "\n";
+ print "Finished installing VMPI into $baseNetworkPath.\n\n";
+ print "Have all available worker machines run:\n";
+ print " $baseNetworkPath\\services\\vmpi_service_install.exe\n";
+ print "to setup the worker service.\n";
+}
+else
+{
+ print "setup_vmpi.pl <UNC path to a server all machines can access>\n";
+ print "example: setup_vmpi.pl \\\\ftknox\\scratch\\vmpi\n";
+}
+
+