Skip to content

Commit

Permalink
Add: setup files
Browse files Browse the repository at this point in the history
  • Loading branch information
awa-vr committed Aug 27, 2024
1 parent 58fcf92 commit 9d5c881
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
2 changes: 2 additions & 0 deletions setup.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@ECHO OFF
Powershell.exe -executionpolicy remotesigned -File ./setup.ps1
71 changes: 71 additions & 0 deletions setup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,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"

0 comments on commit 9d5c881

Please sign in to comment.