-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeploy.ps1
More file actions
22 lines (18 loc) · 799 Bytes
/
Copy pathdeploy.ps1
File metadata and controls
22 lines (18 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Deploie le build frais dans le dossier de jeu.
# Usage : .\deploy.ps1 (ferme le jeu avant)
param(
[string]$Game = "C:\Users\bitpo\OneDrive\Bureau\Call of Duty - R 1.6 - dev"
)
if (-not (Test-Path (Join-Path $Game "CoDMP.exe"))) {
Write-Host "Dossier jeu invalide (pas de CoDMP.exe) : $Game"
exit 1
}
$build = Join-Path $PSScriptRoot "build\mss32.dll"
if (-not (Test-Path $build)) { Write-Host "build\mss32.dll introuvable - build d'abord."; exit 1 }
if (Get-Process CoDMP -ErrorAction SilentlyContinue) {
Write-Host "CoDMP.exe tourne -> ferme le jeu, puis relance ce script."
exit 1
}
Copy-Item $build (Join-Path $Game "mss32.dll") -Force
$g = Get-Item (Join-Path $Game "mss32.dll")
Write-Host ("OK -> mss32.dll deploye ({0} octets, {1})" -f $g.Length, $g.LastWriteTime)