mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 11:52:32 +01:00
7d9b9616c5
- updated readme
34 lines
941 B
PowerShell
34 lines
941 B
PowerShell
$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"
|