-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-client.ps1
More file actions
31 lines (25 loc) · 906 Bytes
/
Copy pathtest-client.ps1
File metadata and controls
31 lines (25 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
param(
[switch]$PrepOnly
)
$ErrorActionPreference = "Stop"
$projectRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $projectRoot
Write-Host "[MicroMobs] Project:" $projectRoot
if (-not (Test-Path ".\gradle\wrapper\gradle-wrapper.jar")) {
Write-Host "[MicroMobs] gradle-wrapper.jar is missing. Running setup.ps1..."
& ".\setup.ps1"
}
Write-Host "[MicroMobs] Preparing Fabric client launch files and assets..."
cmd.exe /c "gradlew.bat configureClientLaunch downloadAssets ideaSyncTask"
if ($LASTEXITCODE -ne 0) {
throw "Gradle prep failed with exit code $LASTEXITCODE"
}
if ($PrepOnly) {
Write-Host "[MicroMobs] Prep complete. Launch later with: .\gradlew.bat runClient"
exit 0
}
Write-Host "[MicroMobs] Launching development client..."
cmd.exe /c "gradlew.bat runClient"
if ($LASTEXITCODE -ne 0) {
throw "runClient failed with exit code $LASTEXITCODE"
}