diff --git a/extract_nsp.ps1 b/extract_nsp.ps1 index 0d72a6d..f5b17e8 100644 --- a/extract_nsp.ps1 +++ b/extract_nsp.ps1 @@ -2,9 +2,9 @@ # This script automatically pulls the titlekey from the tik file found in the # NSP bundle, and extracts it down to the required ROMFS -hactool -x $1 --pfs0dir=$PSScriptRoot\work -t pfs0 -hactool -x $PSScriptRoot\work\97105c79474118d294c8808a22f39bd3.nca ` - --titlekey=$(Format-Hex -Count 16 -Offset 0x180 -Path $PSScriptRoot\work\0100d12014fc2000000000000000000b.tik) ` - --romfsdir=$PSScriptRoot\work +.\3rdparty\hactool.exe -x $1 --pfs0dir=.\work -t pfs0 +.\3rdparty\hactool.exe -x .\work\97105c79474118d294c8808a22f39bd3.nca ` + --titlekey=$(Format-Hex -Count 16 -Offset 0x180 -Path .\work\0100d12014fc2000000000000000000b.tik) ` + --romfsdir=.\work -Remove-Item $PSScriptRoot\work\*.nca $PSScriptRoot\work\*.tik $PSScriptRoot\work\*.cert +Remove-Item .\work\*.nca .\work\*.tik .\work\*.cert diff --git a/repack_scrpt.cpk.ps1 b/repack_scrpt.cpk.ps1 index 87dc8c3..d546471 100644 --- a/repack_scrpt.cpk.ps1 +++ b/repack_scrpt.cpk.ps1 @@ -1,17 +1,17 @@ -md $PSScriptRoot\work\Data\StreamingAssets\scrpt.cpk.contents ` - $PSScriptRoot\out\contents\0100D12014FC200\romfs\Data\StreamingAssets +md -p .\work\Data\StreamingAssets\scrpt.cpk.contents ` + .\out\contents\0100D12014FC200\romfs\Data\StreamingAssets -Get-ChildItem -Path $PSScriptRoot\patches\Data\StreamingAssets\scrpt.cpk -Filter *.json | +Get-ChildItem -Path .\patches\Data\StreamingAssets\scrpt.cpk -Filter *.json | Foreach-Object { Write-Output "Encoding ${$_.Name}" - python3 $PSScriptRoot\inucode.py $_.FullName > "$PSScriptRoot\work\Data\StreamingAssets\scrpt.cpk.contents\${$_.BaseName}" + python3 .\inucode.py $_.FullName > ".\work\Data\StreamingAssets\scrpt.cpk.contents\${$_.BaseName}" } -$PSScriptRoot\3rdparty\cpkmakec.exe ` - $PSScriptRoot\work\Data\StreamingAssets\scrpt.cpk.contents ` - $PSScriptRoot\out\contents\0100D12014FC200\romfs\Data\StreamingAssets\scrpt.cpk ` +.\3rdparty\cpkmakec.exe ` + .\work\Data\StreamingAssets\scrpt.cpk.contents ` + .\out\contents\0100D12014FC200\romfs\Data\StreamingAssets\scrpt.cpk ` -mode=FILENAME -code=UTF-8 -align=2048 -Remove-Item -r $PSScriptRoot\work\Data\StreamingAssets\scrpt.cpk.contents +Remove-Item -r .\work\Data\StreamingAssets\scrpt.cpk.contents