- PSX_BUILD.BAT converted to Powershell

- updated readme
This commit is contained in:
Ilya Shurumov 2022-04-09 19:00:17 +06:00
parent a2cc0560cb
commit 7d9b9616c5
3 changed files with 37 additions and 28 deletions

View File

@ -1,10 +1,11 @@
# Playstation build toolchain
In order to start building a Playstation version of **REDRIVER2** you'll need to perform following steps:
This is an instruction to build Playstation version of **REDRIVER2**
### Windows
- Install **make** (In powershell `choco install make`)
- Put **mipsel-unknown-elf** toolchain to this folder (https://github.com/majenkotech/mipsel-unknown-elf/releases)
- Install **make**
- Obtain **Psy-Q SDK** converted for *latest GCC*
- Put Nugget version of **Psy-Q SDK**
- Copy (https://github.com/pcsx-redux/nugget/tree/main/common) to `/PSXToolchain/PsyQ/common`
- Execute **psx_build.bat**
- Install [mkpsxiso](https://github.com/Lameguy64/mkpsxiso/releases)

View File

@ -1,25 +0,0 @@
echo off
cls
set REDRIVER_FOLDER=%cd%\..
rem Make a symlink
mklink /J %REDRIVER_FOLDER%\PSXToolchain\GameSRC %REDRIVER_FOLDER%\src_rebuild
rem Create a virtual drive
SUBST X: %REDRIVER_FOLDER%\PSXToolchain
set PATH=%PATH%;X:\mipsel-unknown-elf\bin;
if exist %REDRIVER_FOLDER%\PSXToolchain\CDSrc\0_CD_DATA\ (
rem Yes
) else (
mkdir %REDRIVER_FOLDER%\PSXToolchain\CDSrc\0_CD_DATA\
)
make
rem Cleanup
rem del GameSRC
SUBST X: /D
pause

View File

@ -0,0 +1,33 @@
$REDRIVER_FOLDER=[string](Get-Location) + "\.."
$cdDataPath = "$($REDRIVER_FOLDER)\PSXToolchain\CDSrc\0_CD_DATA\"
Write-Host $cdDataPath
# Make a symlink
$link_exist = Get-Item -Path "$($REDRIVER_FOLDER)\PSXToolchain\GameSRC" -ErrorAction Ignore
if (-Not $link_exist) {
New-Item -ItemType Junction -Path "$($REDRIVER_FOLDER)\PSXToolchain\GameSRC" -Target "$($REDRIVER_FOLDER)\src_rebuild"
}
# Create a virtual drive
Invoke-Expression "SUBST X: $($REDRIVER_FOLDER)\PSXToolchain"
# Set tools path
$envPath = $env:PATH
$env:PATH="$($envPath);X:\mipsel-unknown-elf\bin";
Write-Host $env:PATH
$folder_exist = Get-Item -Path $cdDataPath -ErrorAction Ignore
if (-Not $folder_exist) {
New-Item -ItemType Directory -Path "$($REDRIVER_FOLDER)\PSX]Toolchain\CDSrc\0_CD_DATA"
}
Write-Host "Starting build process..."
Invoke-Expression "make"
# Cleanup
Invoke-Expression "SUBST X: /D"
Read-Host -Prompt "Build completed, press any key"