-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.ps1
71 lines (63 loc) · 1.68 KB
/
setup.ps1
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Check if DotNet SDK is installed
$dotnetInstalled = $false
try {
$version = dotnet --version
if ($version) {
$dotnetInstalled = $true
Write-Host ".NET SDK is already installed. Version: $version"
}
}
catch {
# If dotnet is not recognized as a command, it's not installed
}
# Install DotNet SDK
if (-not $dotnetInstalled) {
Write-Host ".NET SDK is not installed. Installing..."
winget install Microsoft.dotNet.SDK.8
if ($LASTEXITCODE -ne 0) {
Write-Host "Error installing .NET SDK"
exit 1
}
}
# Check if VPM CLI is installed
$vpmInstalled = $false
try {
$version = vpm --version
if ($version) {
$vpmInstalled = $true
Write-Host "VPM is already installed. Version: $version"
}
}
catch {
# If vpm is not recognized as a command, it's not installed
}
# Install VPM
if (-not $vpmInstalled) {
Write-Host "VPM is not installed. Installing..."
dotnet tool install --global vrchat.vpm.cli
if ($LASTEXITCODE -ne 0) {
Write-Host "Error installing VPM"
exit 1
}
}
# Add the following repos to VCC:
$repos = @(
"https://vpm.dreadscripts.com/listings/main.json",
"https://rurre.github.io/vpm/index.json",
"https://whiteflare.github.io/vpm-repos/vpm.json",
"https://vpm.thry.dev/index.json",
"https://vpm.razgriz.one/index.json"
)
foreach ($item in $repos) {
Write-Host "Adding $item to VCC"
vpm add repo $item
}
# Copy the templates
Write-Host "Copying templates"
$templates = @(
"AwA Avatar Template"
)
foreach ($item in $templates) {
Copy-Item -Path .\$item -Destination $env:LOCALAPPDATA\VRChatCreatorCompanion\Templates\ -Recurse
}
Write-Host "Setup complete"