-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.ps1
24 lines (21 loc) · 980 Bytes
/
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
Param(
[string]$nitroPacker = $env:NITRO_PACKER_PATH
)
$nitroPackerArgs = @("unpack", "-r", "original.nds", "-o", "rom", "-p", "HaruhiChokuretsu")
& $nitroPacker $nitroPackerArgs
if ($LASTEXITCODE -ne 0) {
Write-Error "NitroPacker failed with exit code $LASTEXITCODE."
exit 1
}
New-Item -Path original -ItemType Directory
Push-Location original
New-Item -Path archives -ItemType Directory
Pop-Location
Copy-Item -Path "rom/data/dat.bin" -Destination "original/archives/dat.bin"
Copy-Item -Path "rom/data/evt.bin" -Destination "original/archives/evt.bin"
Copy-Item -Path "rom/data/grp.bin" -Destination "original/archives/grp.bin"
Copy-Item -Path "rom/data/scn.bin" -Destination "original/archives/scn.bin"
Copy-Item -Recurse -Path "rom/data/vce/" -Destination "original/voice/"
Copy-Item -Recurse -Path "rom/data/bgm/" -Destination "original/bgm/"
Copy-Item -Path "rom/arm9.bin" -Destination "src/arm9.bin"
Copy-Item -Recurse -Path "rom/overlay/" -Destination "original/"