So I'm trying to port the .bat file over to be able to run on OSX (I'm a mac user) and I can't figure it out one bit.
To me it seems as if you could essentialy run everything from the python script, but I have no clue how to make it work. No matter what I do, I always get this error:
clearly the directory can't be found, but I've got it located on my hard drive for a fact. (I used to do 3DS homebrew back when it was just Ninjhax.)
Here's the python code I am using:
To me it seems as if you could essentialy run everything from the python script, but I have no clue how to make it work. No matter what I do, I always get this error:
Code:
Whale:~ AgentMoose$ python /Users/AgentMoose/Downloads/menuCheat/build.py
rm: obj/*.o: No such file or directory
rm: bin/*.elf: No such file or directory
sh: arm-none-eabi-gcc: command not found
sh: arm-none-eabi-gcc: command not found
sh: arm-none-eabi-ld: command not found
cp: directory obj does not exist
cp: a.out: No such file or directory
sh: arm-none-eabi-objcopy: command not found
rm: *.o: No such file or directory
rm: *.out: No such file or directory
sh: copy: command not found
Whale:~ AgentMoose$
clearly the directory can't be found, but I've got it located on my hard drive for a fact. (I used to do 3DS homebrew back when it was just Ninjhax.)
Here's the python code I am using:
Code:
#!/usr/bin/python
import sys
import os
import ftplib
import glob
# the path plugin was copied to
COPYTOPATH = 'cheat.plg'
CC = "arm-none-eabi-gcc"
CP = "arm-none-eabi-g++"
OC = "arm-none-eabi-objcopy"
LD = "arm-none-eabi-ld"
CTRULIB = '~/3DS/devkitPro/devkitARM/libctru'
DEVKITARM = '~/3DS/devkitPro/devkitARM'
LIBPATH = '-L ~/3DS/devkitPro/devkitARM/lib'
def allFile(pattern):
s = "";
for file in glob.glob(pattern):
s += file + " ";
return s;
def run(cmd):
#print(cmd);
os.system(cmd)
cwd = os.getcwd()
run("rm obj/*.o")
run("rm bin/*.elf")
run(CC+ " -Os -s -g -I include -I include/libntrplg " + allFile('source/libntrplg/*.c') + allFile('source/ns/*.c') + allFile('source/*.c') + allFile('source/libctru/*.c') + " -c -march=armv6 -mlittle-endian ");
run(CC+" -Os " + allFile('source/libntrplg/*.s') + allFile('source/ns/*.s') + allFile('source/*.s') + allFile('source/libctru/*.s') + " -c -s -march=armv6 -mlittle-endian ");
run(LD + ' ' + LIBPATH + " -pie --print-gc-sections -T 3ds.ld -Map=homebrew.map " + allFile("*.o") + " " + allFile("lib/*.o") + " -lc -lgcc --nostdlib" )
run("cp -r *.o obj/ ")
run("cp a.out bin/homebrew.elf ")
run(OC+" -O binary a.out payload.bin -S")
run("rm *.o")
run("rm *.out")
run('copy payload.bin ' + COPYTOPATH);