Help getting devkitPro toolchains working portably (newbie)

Post Reply
User avatar
VGmaster
Posts: 1
Joined: Tue Sep 17, 2024 5:39 pm

Help getting devkitPro toolchains working portably (newbie)

Post by VGmaster » Tue Sep 17, 2024 7:06 pm

I'm trying to get devkitPro toolchains working off of a flash drive so I can make a Wii program as a school project (my teacher has spare computers that aren't restricted, so I have admin permissions), but even after setting the environment variables to what they were on my personal computer:

Code: Select all

DEVKITARM=/opt/devkitPro/devkitARM
DEVKITPPC=/opt/devkitPro/devkitPPC
DEVKITPRO=/opt/devkitPro
Path=F:\devkitPro\msys2\usr\bin (I changed the drive letter to match what it appeared as on the school computer)

but it either says that there is no such directory, it can't find wii_rules (even if the Makefile changed so that the path to wii_rules is hardcoded), or it can't find the file specified.

I found this topic from 14 years ago that had a bat script that supposedly sets the environment variables so that devkitPro could work portably, but even after pasting it into a .bat file and running it, it just results in Programmers Notepad saying that it can't find a rules file for [path to template.c].

Any help would be appreciated, I'd rather avoid rerunning the installer since not only does it take the better part of an hour to finish (longer than the entire class period), but my school's wifi network blocks a lot of sites, which I think includes whatever site the installer accesses for the non-msys2 directories.

Update: I gave in and ran the installer on the school computer, but I'm still getting the error

Code: Select all

> "make" 
make[1]: *** No rule to make target 'F:/wii-examples-20190201/template/source/template.c', needed by 'template.o'.  Stop.
make: *** [Makefile:101: build] Error 2

Process Exit Code: 2
Time Taken: 00:02

any ideas?

Update 2: It worked! I have no idea what I did to make it work but it works! I moved the "template" folder to the root of my C: drive and it worked, then I copied it to the root of my flash drive and it worked there too. I don't see why that wouldn't have worked before since the previous path didn't contain any spaces but whatever


WinterMute
Site Admin
Posts: 1980
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Help getting devkitPro toolchains working portably (newbie)

Post by WinterMute » Sat Oct 05, 2024 11:33 pm

14 years ago we were still using the original msys to provide the unix tools. These days on windows we use msys2 and the wonderful package manager provided there to help keep the tools and libraries organised. In modern times probably the easiest way is to run the toolchains from a flash drive is to grab the msys2 installer from https://www.msys2.org/ and install that on your flashdrive. Then follow the Customising Existing Pacman Install instructions to add the devkitPro repos then run pacman -Syu followed by pacman -S wii-dev. Edit /etc/profile and add these lines at the bottom

Code: Select all

export DEVKITPRO=/opt/devkitpro
export DEVKITPPC=${DEVKITPRO}/devkitPPC
export PATH=${PATH}:/opt/devkitpro/tools/bin

Edit /etc/nsswitch.conf and change db_home to a fixed path if you're likely to run this on systems with different windows users

Code: Select all

db_home: /home/test

You can then run msys2.exe from the pendrive to get to a shell and have most things just work from there.

There are a few more things we could do to make it more comfortable but that should get you started.

Help keep devkitPro toolchains free, Donate today

Personal Blog

WinterMute
Site Admin
Posts: 1980
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Help getting devkitPro toolchains working portably (newbie)

Post by WinterMute » Sat Oct 05, 2024 11:39 pm

VGmaster wrote: Tue Sep 17, 2024 7:06 pm

Update: I gave in and ran the installer on the school computer, but I'm still getting the error

Code: Select all

> "make" 
make[1]: *** No rule to make target 'F:/wii-examples-20190201/template/source/template.c', needed by 'template.o'.  Stop.
make: *** [Makefile:101: build] Error 2

Process Exit Code: 2
Time Taken: 00:02

any ideas?

Update 2: It worked! I have no idea what I did to make it work but it works! I moved the "template" folder to the root of my C: drive and it worked, then I copied it to the root of my flash drive and it worked there too. I don't see why that wouldn't have worked before since the previous path didn't contain any spaces but whatever

This part is because the dependency generation in the Makefile outputs full paths and you haven't cleared the build folder (make clean) after moving it. Copying works here because it finds the file it's looking for in the original location.

Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest