grumpycoders / pcsx-redux

The PCSX-Redux project is a collection of tools, research, hardware design, and libraries aiming at development and reverse engineering on the PlayStation 1. The core product itself, PCSX-Redux, is yet another fork of the Playstation emulator, PCSX.

Home Page:https://pcsx-redux.consoledev.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The MIPS environment variables are incorrectly configured (Windows)

juanstacks opened this issue · comments

Describe the bug

When installing a pre-built MIPS toolchain, it's installed in the directory you are currently in, even symlinked into it, but the environment variables are pointed to %appdata%\mips where only the installation files and an empty "versions" folder are located.

Screenshot

Expected behavior

Install it in %appdata% directly or make the symlink in this folder instead of the current one to match the environment variables.

Steps to reproduce the bug

  1. powershell -c "& { iwr https://raw.githubusercontent.com/grumpycoders/pcsx-redux/main/mips.ps1 | iex }"
  2. mips
  3. Select version
  4. Wait for installation

Operating System

Windows 11 Version 22H2

PCSX-Redux version

Not related to pcsx-redux, only MIPS toolchain setup

CPU model

AMD Ryzen 7 3750H

GPU model & Drivers

NVIDIA GeForce GTX 1650

BIOS version

Not related to pcsx-redux, only MIPS toolchain setup

Options

  • Dynarec CPU
  • 8MB
  • OpenGL GPU
  • Fastboot
  • Debugger

Iso checks

No response

Logs

No response

Additional information

No response

Huh, installing in the %APPDATA% folder is supposed to be the normal behavior. See the directory structures on my machine:

image
image

with the mips link pointing to versions/12.2.0 in my case. I don't know why on your machine it decided to dump it on the cwd, but that's definitely not what's supposed to happen...

You can see the logic around here:

https://github.com/grumpycoders/pcsx-redux/blob/main/mips.ps1#L223-L225

Basically, it computes the path to itself, and builds the $symlink variable, pointing at the absolute path to where the symlink has to be created / updated, and the $VersionsPath variable, pointing at the container folder for all the versions you can switch to.

Something went wrong for you where the $me variable ended up pointing where you were...?

Yeah, that's weird. I just followed this MIPS toolchain setup instructions. I'm trying to figure out why 🤔

I tested it again in a virtual machine. I see.

If I run the command from the Powershell itself the download is done in the current directory
image

But from a CMD it is done correctly in %appdata%.
image

Ah ha, interesting... I'll try reproducing this locally. Thanks for the reproduction pointer, this is helpful.