Hacking [Release+Mini Tutorial] AIO.bat: All-In-1 batch file for compiling 3DS stuff

  • Thread starter Thread starter Madridi
  • Start date Start date
  • Views Views 30,696
  • Replies Replies 195
  • Likes Likes 20
Same result. I appreciate the help from both you and the OP by the way, thank you very much.
ok one last thing for you to try. On your start menu search "cmd" and then right-click "command prompt" and then click on "open file location".
Next it should take you to the location on file explorer. Right-click on "command prompt" and click on properties and then on the "shortcut" tab click on "Advanced.."
Then untick the "Run as administrator" checkbox.
Finally retry AIO.bat again.
upload_2016-6-1_1-49-23.png
upload_2016-6-1_1-49-37.png
 
ok one last thing for you to try. On your start menu search "cmd" and then right-click "command prompt" and then click on "open file location".
Next it should take you to the location on file explorer. Right-click on "command prompt" and click on properties and then on the "shortcut" tab click on "Advanced.."
Then untick the "Run as administrator" checkbox.
Finally retry AIO.bat again.

It was already unticked. I'm running Windows 10 by the way, not sure if that matters.
 
@Rohul1997

His problem is not directly related to where cmd is running from. It is downloading in the system32 directory because that's where cmd is run from, but it shouldn't be an issue with shift and right click, or simply "cd" to the correct directory.

His main issue is the that double clicking the .bat does nothing. That's what causing the issue

@RustInPeace

I have a hunch about why this is happening. I think you might've messed up your PATH (deleted stuff that you shouldn't have).

Put the following in your PATH:
"C:\Windows\system32;C:\Windows;"

I don't see them the one you posted earlier. You might be missing other stuff, but I know these should be there.

Restart your PC afterwards and try again. Hopefully it will work this time :)
 
What is needed for build just Luma3DS ?
- latest devkitpro
- ctrulib
- armips
- bin2c
- makerom
- AIO batch (or if you just want Luma3DS)
Code:
@echo off
%~d0
cd %~dp0
:LUMA
cls
Title = Building Luma3DS...
ECHO ..........................................................
ECHO . Luma3DS CFW Menu. Which branch do you want to compile? .
ECHO ..........................................................
ECHO.
ECHO A - User
ECHO B - Dev
ECHO C - EXIT Program
ECHO.
choice /C ABC /M "Enter the letter of your choice:"
IF ERRORLEVEL 3 exit
IF ERRORLEVEL 2 GOTO LUMADEV
IF ERRORLEVEL 1 GOTO LUMAUSER

:LUMAUSER
cls
if exist "Luma3DS-USER" (
    echo Making a backup of your current Luma3DS-USER folder
    xcopy "Luma3DS-USER\*" "Backups_Compiles\Backup_Luma3DS-USER" /e /i /y >nul
    Timeout /t 1 /nobreak >nul
    ren Luma3DS-USER Luma3DS
    cd Luma3DS
    Title = Building Luma3DS-USER ^(Update^)...
    echo Updating repo...
    git pull origin master
    git submodule update --init --recursive
) else (
    Title = Building Luma3DS-USER ^(Clone^)...
    echo Cloning repo...
    git clone --recursive https://github.com/AuroraWright/Luma3DS.git
    cd Luma3DS
)
echo Building...
Title = Building Luma3DS-USER ^(Clean^)...
make clean
Title = Building Luma3DS-USER ^(Release^)...
make release
Title = Building Luma3DS-USER ^(Done^)
echo.
echo #################################################
color A
cd %~dp0
ren Luma3DS Luma3DS-USER
echo Done. Files are in the "Luma3DS-USER/out" folder. && echo Press any key to continue ...
Pause >nul
GOTO END

:LUMADEV
cls
if exist "Luma3DS-DEV" (
    echo Making a backup of your current Luma3DS-DEV folder
    xcopy "Luma3DS-DEV\*" "Backups_Compiles\Backup_Luma3DS-DEV" /e /i /y >nul
    Timeout /t 1 /nobreak >nul
    ren Luma3DS-DEV Luma3DS
    cd Luma3DS
    Title = Building Luma3DS-DEV ^(Update^)...
    echo Updating repo...
    git pull origin master
    git submodule update --init --recursive
) else (
    Title = Building Luma3DS-DEV ^(Clone^)...
    echo Cloning repo...
    git clone --recursive https://github.com/AuroraWright/Luma3DS.git
    cd Luma3DS
    git checkout developer
)
echo Building...
Title = Building Luma3DS-DEV ^(Clean^)...
make clean
Title = Building Luma3DS-DEV ^(Release^)...
make release
Title = Building Luma3DS-DEV ^(Done^)
echo.
echo ################################################
color A
cd %~dp0
ren Luma3DS Luma3DS-DEV
echo Done. Files are in the "Luma3DS-DEV/out" folder. && echo Press any key to continue ...
Pause >nul
GOTO END

:END
color 7
cls
ECHO ..........................................
ECHO . Do you want to compile another source? .
ECHO ..........................................
ECHO.
ECHO A - Yes
ECHO B - No
ECHO.
choice /C AB /M "Enter the letter of your choice:"
IF ERRORLEVEL 2 exit
IF ERRORLEVEL 1 GOTO LUMA
 
@Rohul1997

His problem is not directly related to where cmd is running from. It is downloading in the system32 directory because that's where cmd is run from, but it shouldn't be an issue with shift and right click, or simply "cd" to the correct directory.

His main issue is the that double clicking the .bat does nothing. That's what causing the issue

@RustInPeace

I have a hunch about why this is happening. I think you might've messed up your PATH (deleted stuff that you shouldn't have).

Put the following in your PATH:
"C:\Windows\system32;C:\Windows;"

I don't see them the one you posted earlier. You might be missing other stuff, but I know these should be there.

Restart your PC afterwards and try again. Hopefully it will work this time :)

I feel embarrassed, adding the directories to PATH worked. I made the foolish mistake of copy/pasting the paths from the OP, overwriting the ones already there, before I read the part where it said not to delete previous PATH, but simply add to them. It opened by double clicking and build OTPHelper as a test. Thanks a lot!
 
  • Like
Reactions: Madridi
I feel embarrassed, adding the directories to PATH worked. I made the foolish mistake of copy/pasting the paths from the OP, overwriting the ones already there, before I read the part where it said not to delete previous PATH, but simply add to them. It opened by double clicking and build OTPHelper as a test. Thanks a lot!
Glad it was sorted out. Enjoy :)
 
  • Like
Reactions: RustInPeace
If anyone is using this with windows 7, please let me know if You can build FBI without a problem.
 
I'm late as fuck, i know, but the issue /is/ running it as admin. i noticed this myself, running it from a double click fixes things. im not sure where i got them but somebody had registry entries posted somewhere to make double clicking .bat's work again
 
  • Like
Reactions: RustInPeace
I'm late as fuck, i know, but the issue /is/ running it as admin. i noticed this myself, running it from a double click fixes things. im not sure where i got them but somebody had registry entries posted somewhere to make double clicking .bat's work again
We know this already. The file downloads from where cmd runs from. Running it as admin runs it from system32, while double clicking runs it from the directory it's double clicked from. The issue that happened before happened because the PATH was not there, making it impossible to run from anywhere besides system32. THAT's why double clicking did not work, and THAT's what caused problems :)
 
  • Like
Reactions: RustInPeace
We know this already. The file downloads from where cmd runs from. Running it as admin runs it from system32, while double clicking runs it from the directory it's double clicked from. The issue that happened before happened because the PATH was not there, making it impossible to run from anywhere besides system32. THAT's why double clicking did not work, and THAT's what caused problems :)
ah okay. by the way i cant compile bootctr9, delebiles fork, or dark samus fork, they all give me some aes key error. need logs?
 
Alright, new release!

Thanks to @RednaxelaNnamtra I was finally able to get Delebile's A9LH and BootCTR9 to compile properly. Besided a minor tweak to the code in this new release, additional stuff has to be installed which are in the first post now:
- MinGW
- Visual C++ Compilers For Python 2.7 (You probably need to restart installing this)
- PyCrypto (A different version with different instructions)

If all goes fine without a problem, you should be able to compile the above fine now.

Also, for windows 7 users, download the newest 3dstools, also in the main thread. FBI building will crash otherwise. Thanks to @Pacman` for the help with that.
 
Note:
- To build FBI you need to update to latest ctrulib (commit: 6d65d53) from smea installed in your devkitpro folder.
- If after the update you have a problem with building CTRXplorer -> and reinstall citrus lib
- So far no other build problems have come up with latest ctrulib from smea

[EDIT]
- At least i had a problem building FBI with a ctrulib version xx commits back :D
- It's just to inform :p
 
Last edited by DjoeN,
Note:
- To build FBI you need to update to latest ctrulib (commit: 6d65d53) from smea installed in your devkitpro folder.
- If after the update you have a problem with building CTRXplorer -> and reinstall citrus lib
- So far no other build problems have come up with latest ctrulib from smea

[EDIT]
- At least i had a problem building FBI with a ctrulib version xx commits back :D
- It's just to inform :P
Part of the instructions is to ask people to update the libs. So if something isn't compiling properly, then that's on them lol.

Thanks for the info though
 
Can you check out this new CFW:

https://github.com/chaoskagami/corbenik.git
https://gbatemp.net/threads/corbenik-another-cfw-for-advanced-users-with-bytecode-patches.429612/

I get a python2 error (think because he builds on a linux platform)

make[1]: Entering directory `/d/Z_Testing/corbenik/patch'
rm -f *.vco
../host/bytecode_asm.py aadowngrade.pco aadowngrade.vco
/usr/bin/env: python2: No such file or directory
make[1]: *** [aadowngrade.vco] Error 127
make[1]: Leaving directory `/d/Z_Testing/corbenik/patch'
make: *** [patch] Error 2


[EDIT]
The problem is when it tries to build the patches
the makefile in \corbenik\patch\ calls a pyhton script in \corbenik\host\ called "bytecode_asm.py"


[EDIT2]
Found it:

Edit "bytecode_asm.py" and change:
-#!/usr/bin/env python2
to
- #!/usr/bin/env python


(Or like @astronautlevel reminded me again, rename python.exe to python2.exe)
 
Last edited by DjoeN,

Site & Scene News

Popular threads in this forum