diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /devtools/bin/setup_vmpi.pl | |
| download | archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.tar.xz archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.zip | |
Diffstat (limited to 'devtools/bin/setup_vmpi.pl')
| -rw-r--r-- | devtools/bin/setup_vmpi.pl | 60 |
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"; +} + + |