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,695
  • Replies Replies 195
  • Likes Likes 20
@Madridi
who has installed devkitpro already, there computer has a path for "C:\devkitPro\devkitARM\bin". so put these files on there, then you do not need to set new path for each file, download file each time that we need. also you can call them in cmd everywhere on your computer without through the new path. you could omit some bothersome setup.
bin2c too. (for luma)

I'm sorry, was this clear to you?
Yes I get it now. Thanks. You are talking about PATH, not the files needed to be downloaded each time. That's what worries me the most, as I'd rather not include powershell. I do not want to include the code above in it's current format, as you'd have to specify the input and output file, which kinda defeats the purpose of automation.

Alright then, I have an idea in mind that I'll try out. Meanwhile, can you download the latest .bat file and tell me which of all of these builds do not generate a CIA? I don't want to include this for those that already make them like decrypt9 for example.
 
  • Like
Reactions: Februarysn0w
@Madridi
Code:
::ECHO A - Build A9NC //a9lh
::ECHO B - Build CtrBootManager9  //a9lh
::ECHO C - Build CIAngel //buildtool
::ECHO D - Build CTRXplorer //buildtool
::ECHO E - Build Decrypt9   //need modification
::ECHO F - Build Decrypt9UI //need modification
::ECHO G - Build EmuNAND9   //need modification
::ECHO H - Build EmuNAND9UI //need modification
::ECHO I - Build FBI     //buildtool
ECHO J - Build FTPD
::ECHO K - Build GodMode9 //not support?
::ECHO L - Build Hourglass9 //not support?
ECHO M - Build JK's Save Manager
::ECHO N - Build OTPHelper //not support?
::ECHO O - Build TIKdevil //buildtool

oh.. and need template.rsf file! I forgot to say this important file to building CIA. you can find the file from here.
Code:
BasicInfo:
Title : $(APP_TITLE)   !! modify for each HB
ProductCode : $(APP_PRODUCT_CODE) !! modify for each HB
Logo : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem
RomFs:
RootPath: $(APP_ROMFS)
TitleInfo:
Category : Application
UniqueId : $(APP_UNIQUE_ID) !! modify for each HB
 
  • Like
Reactions: Madridi
can we get tinyxml2? also, citrus isn't building right anymore :c

--------------------- MERGED ---------------------------



--------------------- MERGED ---------------------------

oh, and SafeA9LHInstaller is broken, it needs updating after aurora updated it

citrus builds fine, no problem here
Same for SafeA9LHInstaller
 
  • Like
Reactions: Madridi
  • Like
Reactions: Madridi
slow down professor, why do i clone the whole thing if it's broke?
You're cloning the entire project then checking out a specific working version

Code:
git clone https://github.com/smealum/ctrulib
cd ctrulib
git checkout 2810c4d3a
cd libctru
make install
 
  • Like
Reactions: Madridi
they didn't, and tinyxml2 is a thing this guy does that i've seen used in a few homebrew projects. here: https://github.com/leethomason/tinyxml2
Well, what homebrew uses it? It's not used by any other thing in the batch. I'd rather not include it as a standalone without having anything else that requires it.

citrus builds fine, no problem here
Same for SafeA9LHInstaller
The newest build of ctrulib refactored APT, so you won't be able to compile most things.
You're cloning the entire project then checking out a specific working version

Code:
git clone https://github.com/smealum/ctrulib
cd ctrulib
git checkout 2810c4d3a
cd libctru
make install
Thanks for the investigation and the solution guys. Indeed, I just tried compiling both and it worked fine. So use and older libctru for now
@Madridi
Code:
::ECHO A - Build A9NC //a9lh
::ECHO B - Build CtrBootManager9  //a9lh
::ECHO C - Build CIAngel //buildtool
::ECHO D - Build CTRXplorer //buildtool
::ECHO E - Build Decrypt9   //need modification
::ECHO F - Build Decrypt9UI //need modification
::ECHO G - Build EmuNAND9   //need modification
::ECHO H - Build EmuNAND9UI //need modification
::ECHO I - Build FBI     //buildtool
ECHO J - Build FTPD
::ECHO K - Build GodMode9 //not support?
::ECHO L - Build Hourglass9 //not support?
ECHO M - Build JK's Save Manager
::ECHO N - Build OTPHelper //not support?
::ECHO O - Build TIKdevil //buildtool

oh.. and need template.rsf file! I forgot to say this important file to building CIA. you can find the file from here.
Code:
BasicInfo:
Title : $(APP_TITLE)   !! modify for each HB
ProductCode : $(APP_PRODUCT_CODE) !! modify for each HB
Logo : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem
RomFs:
RootPath: $(APP_ROMFS)
TitleInfo:
Category : Application
UniqueId : $(APP_UNIQUE_ID) !! modify for each HB
Thanks again!

So, 2 things:
1- Can you explain your comments? (A9LH, Buildtool, need modification, not support?, etc..)
2- The .rsf file, how do you use that? Where does it need to be included?

On a related not, it seems to be more complicated as this also mentions the need to modify for each homebrew. So I don't think it's within my capabilities to add this to the bat (nor do I think it should be, but that's another story). But I'll reserve final judgement once I get more understanding of those 2 questions
 
yeah, reverting to the older version of libctru fixed the errors no problem. so i guess we wait for.... the projects themselves to get updated?
 
  • Like
Reactions: Madridi
To elaborate on the set command - it temporarily sets variables for one cmd only. You can use it like this to put something at the front of the path:

Code:
set PATH=c:\Python27\;%PATH%

Coming back to this, if I use this: (set PATH=c:\Python27\;%PATH%) and proceed to build whatever that requires python2. The way the program works is that when it's done, you get the option to build something else if you are not done.

So my question is, would it be ok to have another one saying (set PATH=c:\Python3\;%PATH%) to override the first one? Or does it only work once?
 
Coming back to this, if I use this: (set PATH=c:\Python27\;%PATH%) and proceed to build whatever that requires python2. The way the program works is that when it's done, you get the option to build something else if you are not done.

So my question is, would it be ok to have another one saying (set PATH=c:\Python3\;%PATH%) to override the first one? Or does it only work once?
believe it's single-comand-use only. as in it only works for one pressing of enter/go

--------------------- MERGED ---------------------------

so yes it would work to set it diferently on your next command
 
  • Like
Reactions: Madridi
So i updated CTRULIB to see what doesn't work anymore:

CFW's/Homebrew working:
- SaltFW
- ShadowNAND
- ftpd
- TIKdevil
- CIAngel

Anything else not in this list didn't build, so don't use latest ctrulib :)
Reverted back 1 commit to "14cdb5a" same errors

Reverted back 2 commits to "8c9a327" and everything works fine again.

[EDIT]

quick script to build a specific commit from smea's ctrulib
You have to give the commit ID with the batch

For example:
- CLCommit.bat 3a10698

3a10698 is the libctru commit we want to build/install in this example

Code:
@echo off
cls
%~d0
cd %~dp0
Title = Building Specific Ctrulib Commit...
ECHO ...................................................................
ECHO . Smealum's LIBCTRU Menu. Do you want to install or compile only? .
ECHO ...................................................................
ECHO.
ECHO 1 - Compile LIBCTRU Commit %1
ECHO 2 - Install LIBCTRU Commit %1
ECHO 3 - EXIT
ECHO.
ECHO.
ECHO If you don't see a commit ID after the "Commit"
ECHO You forgot to give a commit version with your batch file
ECHO Choose option 3 to exit
ECHO.
ECHO For Example:
ECHO ------------
ECHO CLCommit.bat 3a10698
ECHO.
ECHO Commit ID's can be found here:
ECHO https://github.com/smealum/ctrulib/commits/master
ECHO.
ECHO.
choice /C 123 /M "Enter the number of your choice:"
IF ERRORLEVEL 3 exit
IF ERRORLEVEL 2 GOTO LIBINST
IF ERRORLEVEL 1 GOTO LIBCOMP

:LIBCOMP
cls
%~d0
cd %~dp0
Title = Building Smea-ctrulib Commit^(Clone^)...
echo Cloning repo...
git clone https://github.com/smealum/ctrulib
cd ctrulib
git checkout %1
cd libctru
Title = Building libctru Commit ^(Release^)...
make
Title = Building libctru Commit ^(Done^)
echo.
echo ########################################################
cd %~dp0
ren ctrulib ctrulib-%1
echo ..........................................
echo . Done. Look into ctrulib-xxxxxxx folder .
echo ..........................................
color A
echo Press any key to exit!
Pause >nul
GOTO END

:LIBINST
cls
%~d0
cd %~dp0
Title = Installing Smea-ctrulib Commit^(Clone^)...
echo Cloning repo...
git clone https://github.com/smealum/ctrulib
cd ctrulib
git checkout %1
cd libctru
Title = Installing libctru Commit ^(Release^)...
make install
Title = Installing libctru Commit ^(Done^)
echo.
echo ########################################################
cd %~dp0
ren ctrulib ctrulib-%1
echo .................................
echo . Done. Installed to \devkitpro .
echo .................................
color A
echo Press any key to exit!
Pause >nul
GOTO END

:END
exit
 
Last edited by DjoeN,
  • Like
Reactions: Madridi

Site & Scene News

Popular threads in this forum