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

Madridi

Card Collector
OP
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
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
Once again, amazing work! I will modify ctrulib to use this, and make it as a new option.

So the options would be:
- compile latest ctrulib
- install latest ctrulib
- compile a specific commit
- install a specific commit

After I integrate this, I'll make a release which also will include corbenik cfw
 

Februarysn0w

Well-Known Member
Member
Joined
Oct 31, 2014
Messages
1,206
Trophies
0
Age
36
XP
837
Country
Japan
@Madridi
1- Can you explain your comments? (A9LH, Buildtool, need modification, not support?, etc..)
A- my memo. sorry. JKSM and FTPD has compatible to convert to cia.

2- The .rsf file, how do you use that? Where does it need to be included?
last line of the script.
Code:
makerom -f cia -o %CIA%-rsf template.rsf -target t -elf %elf%-icon icon.bin -banner banner.bnr
basically you have to set up these lines.
Code:
Title: // set homebrew title here  eg.FTPD
ProductCode: // set product code eg.CTR-H-FTP
UniqueId: //set unique ID for homebrew eg.0x00123

So...My idea for .rsf is just give link for script user. like this.
Code:
//some  codes on here

@echo "download url for .rsf"

I'm very sorry for bothering you. (´・ω・`)
 

Madridi

Card Collector
OP
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
@Madridi
1- Can you explain your comments? (A9LH, Buildtool, need modification, not support?, etc..)
A- my memo. sorry. JKSM and FTPD has compatible to convert to cia.

2- The .rsf file, how do you use that? Where does it need to be included?
last line of the script.
Code:
makerom -f cia -o %CIA%-rsf template.rsf -target t -elf %elf%-icon icon.bin -banner banner.bnr
basically you have to set up these lines.
Code:
Title: // set homebrew title here  eg.FTPD
ProductCode: // set product code eg.CTR-H-FTP
UniqueId: //set unique ID for homebrew eg.0x00123

So...My idea for .rsf is just give link for script user. like this.
Code:
//some  codes on here

@echo "download url for .rsf"

I'm very sorry for bothering you. (´・ω・`)
So this is only needed for JKSM and FTPD?
I'm confused, cause these 2 already do build the CIA.

Thanks again for the help :)
 

Madridi

Card Collector
OP
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
.. And a new release!

Changelog:
  • Added Corbenik CFW. (Requires cygwin with developer mode chosen on installation, check first page)
  • Added an option to install a specific commit of libctru.
  • Python PATH is set for each built chosen.
  • Added the ability to build CIA for FTPD
.. Plus some minor fixes and enhancements

1st post changelog:
- Added cygwin
- Added PATH related lines
- Added a note about libctru
- Added a note about being able to MKlink python3 as well using same instructions
- Gave proper credits

Special thanks to:
@chaoskagami for the code rework that makes it compile on windows. As well as giving me the idea to use set path for each build
@DjoeN for giving the heads up on basically EVERYTHING, if something is not working, as well as suggesting the make the program install specific commits in addition of being to install the latest one.
@Rohul1997 for testing the hell out of this as usual, as well as fixing a dilemma I had with the "specific commit of libctru" implementation


What's next:
- @TheCruel's freeshop: Whenever windows compiling instructions are known, I'll be adding it
- @Shadowhand's Shadownand: From what I understand, this is so far A9LH stuff, and still in it's early phases. I'll be adding it when it becomes a cfw. The reason I'm not adding it now is because I have 2 sections in the program. One for A9LH and the other for CFW. It would be confusing adding it to A9LH now and moving it CFW later

Enjoy, and please report any problems :)
 

DjoeN

Captain Haddock!
Member
Joined
Oct 21, 2005
Messages
5,489
Trophies
0
Age
54
Location
Somewhere in this potatoland!
Website
djoen.dommel.be
XP
2,857
Country
Belgium
Installing Cygwin with develop option takes awefully long (45min+) on my pc (intel core2 quad cpu).

[EDIT]
@Madridi

The temporary path you set stays as long as the current dos window is open and gets removed when you close it!

So if you say yes at the end to build another CFW that uses \Python35, your \Python27 path will stay in your path untill you close the command window and c:\Python35 will be added (if set).

A better way to add a temp path to your %path% instead of:

- SET PATH=%PATH%;c:\pyhton27
this will always add c:\python27 to your path, even if it's already in your path, adding it a second time. (So i googled around to find a beter solution (see below) and found one)

python27dubbel.png


- IF "%PATH:C:\Python27=%" == "%PATH%" PATH=%PATH%;C:\Python27
(Credits to Stephen Quan via google)
Will check your path and if c:\python27 already is in your path, it will not add it again, if not found in your path it will add it.

python27.png



Same for Python3
- IF "%PATH:C:\Python35-32=%" == "%PATH%" PATH=%PATH%;C:\Python35-32
(You python3 install folder may be different :P )

Will check your path and if c:\python35-32 already is in your path, it will not add it again, if not found in your path it will add it.

python35.png


For example:
Code:
:D9WIP
cls
Title = Building Decrypt9WIP...
%~d0
cd %~dp0
if not exist c:\python27 GOTO NOPY2

REM This will check if you have a c:\Python27 folder, if not jump to label "NOPY2" if exist continue batch script.

    IF "%PATH:C:\Python27=%" == "%PATH%" PATH=%PATH%;C:\Python27

REM This will check if c:\Python27 is already in your PATH, if it is, do nothing and continue the script.
REM If it's not, add it temporary to your path and continue.
REM As long as this command window is open the PATH is valid!
REM The moment you close this command window, the PATH c:\Python27 is gone
REM (unless you have set the path in your Environmental Variables/System Variables)

    ECHO.
    ECHO ..................................
    ECHO . C:\Python27 added to your PATH .
    ECHO ..................................
    ECHO.

if exist "Decrypt9WIP" (

...

:NOPY2
cls
ECHO.
ECHO ...............................................................
ECHO . The folder \Pyhton27 does not exist                         .
ECHO . Check if you have Python 2.7.x installed. If you have,      .
ECHO . check what folder you have it installed to and change it    .
ECHO . in the batch script to your Python 2.7.x install folder.    .
ECHO ...............................................................
ECHO.
echo Press any key to exit ...
Pause >nul
exit

if not exist c:\python27 GOTO NOPY2
IF "%PATH:C:\Python27=%" == "%PATH%" PATH=%PATH%;C:\Python27

This you can add at the start of the batch file, so you don't have to do it on every label.

You only have to add a different one to the cakes label
if not exist c:\python35 GOTO NPYTHON3
IF "%PATH:C:\Python35=%" == "%PATH%" PATH=%PATH%;C:\Python35

:NPYTHON3
cls
ECHO.
ECHO ...............................................................
ECHO . The folder \Pyhton35 does not exist .
ECHO . Check if you have Python 3.5.x installed. If you have, .
ECHO . check what folder you have it installed to and change it .
ECHO . in the batch script to your Python 3.5.x install folder. .
ECHO ...............................................................
ECHO.
echo Press any key to exit ...
Pause >nul
exit

If somebody build different projects and also builds cakesfw inbetween, it will add both to your path (unless the're already in his/her path).

c:\Python27;c:\Python35 and continue just fine

Code:
@echo off
if not exist c:\python27 GOTO NOPY2
IF "%PATH:C:\Python27=%" == "%PATH%" PATH=%PATH%;C:\Python27
GOTO TYPE

:TYPE
Title = ALL-IN-ONE .bat ...
cls
ECHO ..................................
ECHO . 3DS All in One Build Main Menu .
ECHO ..................................
ECHO.
ECHO A - Arm9loaderhax Menu
ECHO B - Custom Firmware Menu
ECHO C - Homebrew Menu
ECHO D - LIBs Menu
ECHO E - EXIT Program
ECHO.
choice /C ABCDE /M "Enter the letter of your choice:"
IF ERRORLEVEL 5 exit
IF ERRORLEVEL 4 GOTO LIBS
IF ERRORLEVEL 3 GOTO HB
IF ERRORLEVEL 2 GOTO CFW
IF ERRORLEVEL 1 GOTO A9LH

...

:CAKES
cls
if not exist c:\python35 GOTO NPYTHON3
IF "%PATH:C:\Python35=%" == "%PATH%" PATH=%PATH%;C:\Python35
Title = Building Cakes...

...

:NOPY2
cls
ECHO.
ECHO ...............................................................
ECHO . The folder \Pyhton27 does not exist                         .
ECHO . Check if you have Python 2.7.x installed. If you have,      .
ECHO . check what folder you have it installed to and change it    .
ECHO . in the batch script to your Python 2.7.x install folder.    .
ECHO ...............................................................
ECHO.
echo Press any key to exit ...
Pause >nul
exit

:NPYTHON3
cls
ECHO.
ECHO ...............................................................
ECHO . The folder \Pyhton35 does not exist                         .
ECHO . Check if you have Python 3.5.x installed. If you have,      .
ECHO . check what folder you have it installed to and change it    .
ECHO . in the batch script to your Python 3.5.x install folder.    .
ECHO ...............................................................
ECHO.
echo Press any key to exit ...
Pause >nul
exit

:END
 
Last edited by DjoeN,
  • Like
Reactions: Rohul1997

DjoeN

Captain Haddock!
Member
Joined
Oct 21, 2005
Messages
5,489
Trophies
0
Age
54
Location
Somewhere in this potatoland!
Website
djoen.dommel.be
XP
2,857
Country
Belgium
Ok, @Madridi
Still not tired after reading my previous post?

Corbenik:
Make/make all will build the standard stuff
Make full will build everything needed to get you started at first including the "contrib" folder and "locale" folder
in the contrib folder you find extra patches contributed by other ppl (like the great mysterymachine patch that works perfect) add those to your patch folder after compiling
locale is needed if you use out of region games.

So it would be nice to have that choice to build all or full.
 
  • Like
Reactions: Rohul1997

Madridi

Card Collector
OP
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
Installing Cygwin with develop option takes awefully long (45min+) on my pc (intel core2 quad cpu).

[EDIT]
@Madridi

The temporary path you set stays as long as the current dos window is open and gets removed when you close it!

So if you say yes at the end to build another CFW that uses \Python35, your \Python27 path will stay in your path untill you close the command window and c:\Python35 will be added (if set).

A better way to add a temp path to your %path% instead of:

- SET PATH=%PATH%;c:\pyhton27
this will always add c:\python27 to your path, even if it's already in your path, adding it a second time. (So i googled around to find a beter solution (see below) and found one)

python27dubbel.png


- IF "%PATH:C:\Python27=%" == "%PATH%" PATH=%PATH%;C:\Python27
(Credits to Stephen Quan via google)
Will check your path and if c:\python27 already is in your path, it will not add it again, if not found in your path it will add it.

python27.png



Same for Python3
- IF "%PATH:C:\Python35-32=%" == "%PATH%" PATH=%PATH%;C:\Python35-32
(You python3 install folder may be different :P )

Will check your path and if c:\python35-32 already is in your path, it will not add it again, if not found in your path it will add it.

python35.png


For example:
Code:
:D9WIP
cls
Title = Building Decrypt9WIP...
%~d0
cd %~dp0
if not exist c:\python27 GOTO NOPY2

REM This will check if you have a c:\Python27 folder, if not jump to label "NOPY2" if exist continue batch script.

    IF "%PATH:C:\Python27=%" == "%PATH%" PATH=%PATH%;C:\Python27

REM This will check if c:\Python27 is already in your PATH, if it is, do nothing and continue the script.
REM If it's not, add it temporary to your path and continue.
REM As long as this command window is open the PATH is valid!
REM The moment you close this command window, the PATH c:\Python27 is gone
REM (unless you have set the path in your Environmental Variables/System Variables)

    ECHO.
    ECHO ..................................
    ECHO . C:\Python27 added to your PATH .
    ECHO ..................................
    ECHO.

if exist "Decrypt9WIP" (

...

:NOPY2
cls
ECHO.
ECHO ...............................................................
ECHO . The folder \Pyhton27 does not exist                         .
ECHO . Check if you have Python 2.7.x installed. If you have,      .
ECHO . check what folder you have it installed to and change it    .
ECHO . in the batch script to your Python 2.7.x install folder.    .
ECHO ...............................................................
ECHO.
echo Press any key to exit ...
Pause >nul
exit

if not exist c:\python27 GOTO NOPY2
IF "%PATH:C:\Python27=%" == "%PATH%" PATH=%PATH%;C:\Python27

This you can add at the start of the batch file, so you don't have to do it on every label.

You only have to add a different one to the cakes label
if not exist c:\python35 GOTO NPYTHON3
IF "%PATH:C:\Python35=%" == "%PATH%" PATH=%PATH%;C:\Python35

:NPYTHON3
cls
ECHO.
ECHO ...............................................................
ECHO . The folder \Pyhton35 does not exist .
ECHO . Check if you have Python 3.5.x installed. If you have, .
ECHO . check what folder you have it installed to and change it .
ECHO . in the batch script to your Python 3.5.x install folder. .
ECHO ...............................................................
ECHO.
echo Press any key to exit ...
Pause >nul
exit

If somebody build different projects and also builds cakesfw inbetween, it will add both to your path (unless the're already in his/her path).

c:\Python27;c:\Python35 and continue just fine

Code:
@echo off
if not exist c:\python27 GOTO NOPY2
IF "%PATH:C:\Python27=%" == "%PATH%" PATH=%PATH%;C:\Python27
GOTO TYPE

:TYPE
Title = ALL-IN-ONE .bat ...
cls
ECHO ..................................
ECHO . 3DS All in One Build Main Menu .
ECHO ..................................
ECHO.
ECHO A - Arm9loaderhax Menu
ECHO B - Custom Firmware Menu
ECHO C - Homebrew Menu
ECHO D - LIBs Menu
ECHO E - EXIT Program
ECHO.
choice /C ABCDE /M "Enter the letter of your choice:"
IF ERRORLEVEL 5 exit
IF ERRORLEVEL 4 GOTO LIBS
IF ERRORLEVEL 3 GOTO HB
IF ERRORLEVEL 2 GOTO CFW
IF ERRORLEVEL 1 GOTO A9LH

...

:CAKES
cls
if not exist c:\python35 GOTO NPYTHON3
IF "%PATH:C:\Python35=%" == "%PATH%" PATH=%PATH%;C:\Python35
Title = Building Cakes...

...

:NOPY2
cls
ECHO.
ECHO ...............................................................
ECHO . The folder \Pyhton27 does not exist                         .
ECHO . Check if you have Python 2.7.x installed. If you have,      .
ECHO . check what folder you have it installed to and change it    .
ECHO . in the batch script to your Python 2.7.x install folder.    .
ECHO ...............................................................
ECHO.
echo Press any key to exit ...
Pause >nul
exit

:NPYTHON3
cls
ECHO.
ECHO ...............................................................
ECHO . The folder \Pyhton35 does not exist                         .
ECHO . Check if you have Python 3.5.x installed. If you have,      .
ECHO . check what folder you have it installed to and change it    .
ECHO . in the batch script to your Python 3.5.x install folder.    .
ECHO ...............................................................
ECHO.
echo Press any key to exit ...
Pause >nul
exit

:END
Yeah I noted in the requirement in the first page how long it takes. That was A LOT!

Ok so I read your post, but I'm not sure where the problem is.

It's not a problem having them both set in path. From what @chaoskagami said, this sets what takes priority. So every time we choose to build another one, having that set line before the build will take priority.

So what am I missing?
Btw I asked in post 136 about this

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

Ok, @Madridi
Still not tired after reading my previous post?

Corbenik:
Make/make all will build the standard stuff
Make full will build everything needed to get you started at first including the "contrib" folder and "locale" folder
in the contrib folder you find extra patches contributed by other ppl (like the great mysterymachine patch that works perfect) add those to your patch folder after compiling
locale is needed if you use out of region games.

So it would be nice to have that choice to build all or full.
Ah yes, I also asked in PM if there was more than the "make" command. I haven't used this cfw yet, but make full builds everything right? So should I change to that? (No need for make/make all)
 

DjoeN

Captain Haddock!
Member
Joined
Oct 21, 2005
Messages
5,489
Trophies
0
Age
54
Location
Somewhere in this potatoland!
Website
djoen.dommel.be
XP
2,857
Country
Belgium
Yeah I noted in the requirement in the first page how long it takes. That was A LOT!

Ok so I read your post, but I'm not sure where the problem is.

It's not a problem having them both set in path. From what @chaoskagami said, this sets what takes priority. So every time we choose to build another one, having that set line before the build will take priority.

So what am I missing?
Btw I asked in post 136 about this

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


Ah yes, I also asked in PM if there was more than the "make" command. I haven't used this cfw yet, but make full builds everything right? So should I change to that? (No need for make/make all)
Corbenik:

Make FULL takes some time to finnish cause it redownloads all gameid's
Make ALL just builds the basic required files (no contrib folder and no locales folder)
(Keep in mind, when running make clean before make all, removes the contrib and locales folder from your out folder)
Make FULL should only be used once, then Make ALL is enough, until something changes for the locales and contrib folders.
The contrib folder holds user submitted patches, like the awesome Pokemon MysteryMachine patch! (if you're into Pokémon ;) )

PATH:
example:
- I build first Luma3DS
SET PATH=%PATH%;c:\pyhton27 will add c:\python27 to your path
- Then i build ReiNand
SET PATH=%PATH%;c:\pyhton27 will add c:\python27 to your path again
- Then i build rxTools DukeSRG
SET PATH=%PATH%;c:\pyhton27 will add c:\python27 to your path again

It will everytime add the c:\Python27 to your path, cause i'm still working in the same command windows
Code:
PATH=C:\Program Files (x86)\ImageMagick-6.9.2-Q16;C:\Program Files\ImageMagick-6
.9.2-Q16;c:\devkitPro\msys\bin;C:\ImageMagick-6.9.2-3-portable-Q16-x86;C:\devkit
Pro\devkitARM\bin;C:\MinGW\bin;C:\Python27;C:\Python27;C:\Python27

So building some d0k3 tools after that etc, will everytime add c:\python27 to the path
Code:
PATH=C:\Program Files (x86)\ImageMagick-6.9.2-Q16;C:\Program Files\ImageMagick-6
.9.2-Q16;c:\devkitPro\msys\bin;C:\ImageMagick-6.9.2-3-portable-Q16-x86;C:\devkit
Pro\devkitARM\bin;C:\MinGW\bin;C:\Python27;C:\Python27;C:\Python27;C:\Python27;C:\Python27

You can avoid that with just adding :

Code:
IF "%PATH:C:\Python27=%"=="%PATH%" PATH=%PATH%;C:\Python27

at start of your batch script instead of SET PATH=%PATH%;c:\pyhton27 under every :label

Code:
@echo off
:TYPE
IF "%PATH:C:\Python27=%"=="%PATH%" PATH=%PATH%;C:\Python27
Title = ALL-IN-ONE .bat ...
cls
etc...

avoids it being needed under every :label
with the exception of cakesFW:
Code:
:CAKES
cls
IF "%PATH:C:\Python3=%"=="%PATH%" PATH=%PATH%;C:\Python3
Title=BuildingCakes...
etc...

It says, he let me check if c:\python is already in your path, so it isn't i'll add it now for this command session.
OW, hold it! You already have c:\Python27 in your path, no need to add it again, so i won't do it.

Ok, when you exit the script all added paths are removed anyway.
and yes, it's more of a beauty/cleaner thing, only some nitpickers would argue about ;)

(You can ignore the rest i typed, that's more for noobs who try to build and don't have python setup yet ;) )

 
Last edited by DjoeN,
  • Like
Reactions: Madridi

Madridi

Card Collector
OP
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
Corbenik:

Make FULL takes some time to finnish cause it redownloads all gameid's
Make ALL just builds the basic required files (no contrib folder and no locales folder)
(Keep in mind, when running make clean before make all, removes the contrib and locales folder from your out folder)
Make FULL should only be used once, then Make ALL is enough, until something changes for the locales and contrib folders.
The contrib folder holds user submitted patches, like the awesome Pokemon MysteryMachine patch! (if you're into Pokémon ;) )
Ok I understand now. However, for the purposes of this batch program, I don't see the need the use for make all.

The logic behind this is:
- You build everything from scratch (First time)
- Second time you run, if a previous source is already there, it will get backed up, and the source will be updated and cleaned
- Because of the above, you will need to build contrib and locales folder again.

My vision for all builds is too have a command that builds everything, instead of it being partial.

It's easy to add a menu asking if you want to make all or make full, but I'd rather not condense the menu even more if its not truly necessary.

Your thoughts? :)

PATH:
example:
- I build first Luma3DS
SET PATH=%PATH%;c:\pyhton27 will add c:\python27 to your path
- Then i build ReiNand
SET PATH=%PATH%;c:\pyhton27 will add c:\python27 to your path again
- Then i build rxTools DukeSRG
SET PATH=%PATH%;c:\pyhton27 will add c:\python27 to your path again

It will everytime add the c:\Python27 to your path, cause i'm still working in the same command windows
Code:
PATH=C:\Program Files (x86)\ImageMagick-6.9.2-Q16;C:\Program Files\ImageMagick-6
.9.2-Q16;c:\devkitPro\msys\bin;C:\ImageMagick-6.9.2-3-portable-Q16-x86;C:\devkit
Pro\devkitARM\bin;C:\MinGW\bin;C:\Python27;C:\Python27;C:\Python27

So building some d0k3 tools after that etc, will everytime add c:\python27 to the path
Code:
PATH=C:\Program Files (x86)\ImageMagick-6.9.2-Q16;C:\Program Files\ImageMagick-6
.9.2-Q16;c:\devkitPro\msys\bin;C:\ImageMagick-6.9.2-3-portable-Q16-x86;C:\devkit
Pro\devkitARM\bin;C:\MinGW\bin;C:\Python27;C:\Python27;C:\Python27;C:\Python27;C:\Python27

You can avoid that with just adding :

Code:
IF "%PATH:C:\Python27=%"=="%PATH%" PATH=%PATH%;C:\Python27

at start of your batch script instead of SET PATH=%PATH%;c:\pyhton27 under every :label

Code:
@echo off
:TYPE
IF "%PATH:C:\Python27=%"=="%PATH%" PATH=%PATH%;C:\Python27
Title = ALL-IN-ONE .bat ...
cls
etc...

avoids it being needed under every :label
with the exception of cakesFW:
Code:
:CAKES
cls
IF "%PATH:C:\Python3=%"=="%PATH%" PATH=%PATH%;C:\Python3
Title=BuildingCakes...
etc...

It says, he let me check if c:\python is already in your path, so it isn't i'll add it now for this command session.
OW, hold it! You already have c:\Python27 in your path, no need to add it again, so i won't do it.

Ok, when you exit the script all added paths are removed anyway.
and yes, it's more of a beauty/cleaner thing, only some nitpickers would argue about ;)

(You can ignore the rest i typed, that's more for noobs who try to build and don't have python setup yet ;) )
Ok, I understand that it's being repeated, and that this thing is only to make it cleaner. Here is my concern though:
The reason this was added was because both python2 and python3 have a python.exe file. If a build is searching for python.exe, how can you assure that it wont pick the python2 one instead of the python3 (or vice versa)?
The IF statement you had just checks if that is in PATH.. correct? But the issue is that, they are both already in PATH. According to @chaoskagami this command sets the priority for each build. So for the python 2 build, it will pick python.exe from python2 folder, and for cakes it will pick the one in python3 folder.

Am I still missing something? :)
 

DjoeN

Captain Haddock!
Member
Joined
Oct 21, 2005
Messages
5,489
Trophies
0
Age
54
Location
Somewhere in this potatoland!
Website
djoen.dommel.be
XP
2,857
Country
Belgium
Ok I understand now. However, for the purposes of this batch program, I don't see the need the use for make all.

The logic behind this is:
- You build everything from scratch (First time)
- Second time you run, if a previous source is already there, it will get backed up, and the source will be updated and cleaned
- Because of the above, you will need to build contrib and locales folder again.

My vision for all builds is too have a command that builds everything, instead of it being partial.

It's easy to add a menu asking if you want to make all or make full, but I'd rather not condense the menu even more if its not truly necessary.

Your thoughts? :)

I always build full :)


Ok, I understand that it's being repeated, and that this thing is only to make it cleaner. Here is my concern though:
The reason this was added was because both python2 and python3 have a python.exe file. If a build is searching for python.exe, how can you assure that it wont pick the python2 one instead of the python3 (or vice versa)?
The IF statement you had just checks if that is in PATH.. correct? But the issue is that, they are both already in PATH. According to @chaoskagami this command sets the priority for each build. So for the python 2 build, it will pick python.exe from python2 folder, and for cakes it will pick the one in python3 folder.

Am I still missing something? :)

Nope :)

- set PATH=c:\Python27\;%PATH%
Sets c:\Python27 as first in your path
For some reasons i misstyped everytime
- set PATH=%PATH%;c:\Python27 and used that to test it in a command prompt :/ (and that sets it as last)
(had beter be lazy and did a copy/paste instead of typing and not checking over again)

Path always uses the first folder where it finds the executable it needs.

My fault!
 

Madridi

Card Collector
OP
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
I always build full :)




Nope :)

- set PATH=c:\Python27\;%PATH%
Sets c:\Python27 as first in your path
For some reasons i misstyped everytime
- set PATH=%PATH%;c:\Python27 and used that to test it in a command prompt :/ (and that sets it as last)
(had beter be lazy and did a copy/paste instead of typing and not checking over again)

Path always uses the first folder where it finds the executable it needs.

My fault!
Ah that explains it! Cause I did notice during testing that it was set first, so I knew this worked fine. I didn't notice that it was a mistyped set command. Crisis averted I suppose :P

As for Corbenik, I'll change make to make full whenever I push a new release.

Thanks again for your help :)
 

DjoeN

Captain Haddock!
Member
Joined
Oct 21, 2005
Messages
5,489
Trophies
0
Age
54
Location
Somewhere in this potatoland!
Website
djoen.dommel.be
XP
2,857
Country
Belgium
Since original CTRBootManager hasn't seen an update for 4 months

It's been picked up and worked on again by somebdoy else.

CTRBootManager/CTRBootManager9

Github

Also a sidenote for building ctrbootmanager:
make clean will not be executed and cmake has no clean option.

Code:
Building...
make: *** No rule to make target `clean'.  Stop.
-- The C compiler identification is GNU 5.3.0

Other output warnings:
(I do not know if those matter or not, i'll have to ask in a thread)

Code:
-- Looking for 3ds tools...
-- 3dsxtool: C:/devkitPro/devkitARM/bin/3dsxtool.exe - found
-- smdhtool: C:/devkitPro/devkitARM/bin/smdhtool.exe - found
CMake Warning at cmake/Tools3DS.cmake:136 (message):
  bannertool - not found
Call Stack (most recent call first):
  CMakeLists.txt:10 (include)

Code:
-- Generating done
-- Build files have been written to: D:/Z_Testing/CtrBootManager/build
-- Looking for 3ds tools...
CMake Warning at cmake/Tools3DS.cmake:136 (message):
  bannertool - not found
Call Stack (most recent call first):
  CMakeLists.txt:10 (include)

Code:
-- nihstro - not found
-- setting CTRULIB to C:/devkitPro/libctru/include/..
-- No smdh file will be generated
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_TOOLCHAIN_FILE
 
Last edited by DjoeN,
  • Like
Reactions: Rohul1997

Madridi

Card Collector
OP
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
Since original CTRBootManager hasn't seen an update for 4 months

It's been picked up and worked on again by somebdoy else.

CTRBootManager/CTRBootManager9

Github

Also a sidenote for building ctrbootmanager:
make clean will not be executed and cmake has no clean option.
Code:
Building...
make: *** No rule to make target `clean'.  Stop.
-- The C compiler identification is GNU 5.3.0
I actually saw that a couple of days ago! I also noticed that there are more than one fork, and I have no idea which is best maintained. I assume it's the one you linked to?

I didn't bother looking much into it since I was too busy because of the cmake stuff.
Sucks that clean isn't there. Them again, this ctrbootmanager has always been problematic lol
 
  • Like
Reactions: Rohul1997

Madridi

Card Collector
OP
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
After compiling cbm9 there's a make file inside the build folder.
Maybe we can
cd build
Make clean
That's already what we have been doing with the original one. But no that doesn't seem to be the issue right now. I noticed that it cleans some files if you run make clean after the build is complete, but not everything. The way to properly build this is also not correct in the bat, and I don't know how to fix this yet.

I hate cmake lol..
 

NinjaBoyLao2

Well-Known Member
Newcomer
Joined
Mar 2, 2016
Messages
51
Trophies
0
Location
Hyrule
XP
105
Country
United States
i think citrus is broken but im double checking everything right now, main post, releases etc

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

That's already what we have been doing with the original one. But no that doesn't seem to be the issue right now. I noticed that it cleans some files if you run make clean after the build is complete, but not everything. The way to properly build this is also not correct in the bat, and I don't know how to fix this yet.

I hate cmake lol..
 

Rohul1997

Well-Known Member
Member
Joined
Dec 7, 2015
Messages
357
Trophies
0
Age
27
Location
Giant Chasm
XP
873
Country
okay issue is this.. not sure whats going wrong but @DjoeN said Citrus built on latest ctrulib View attachment 54025
That is a problem from Libkhax. Any source that has Cakebrah as a submodule will have this problem e.g. ReiNand being another.
Line 984 on here - https://github.com/Myriachan/libkhax/blob/e9771d8d0b23c4a8f988760b931746a4018fbf97/khaxinit.cpp#L984
needs to be changed from this:
Code:
u8 isNew3DS = 0;

to this:
Code:
bool isNew3DS = 0;

So you gotta wait for @Myria to fix this
 
Last edited by Rohul1997,
  • Like
Reactions: peteruk and Madridi

DjoeN

Captain Haddock!
Member
Joined
Oct 21, 2005
Messages
5,489
Trophies
0
Age
54
Location
Somewhere in this potatoland!
Website
djoen.dommel.be
XP
2,857
Country
Belgium
okay issue is this.. not sure whats going wrong but @DjoeN said Citrus built on latest ctrulib View attachment 54025

Only needed if you want to build citrus with latest ctrulib

go into \citrus\source\libkhax\
open khaxinit.cpp with notepad++
change the following 2 lines:

line 982 u8 isNew3DS =0;
change to: bool isNew3DS = false;

line 990 *answer = isNew3DS != 0;
change to: *answer = isNew3DS;

Then it will build without errors
(If you only change line 982, you get another error)

If not working download my compiled version (build date 2016-06-24)
 

Attachments

  • citrus.zip
    725.2 KB · Views: 270
Last edited by DjoeN,
  • Like
Reactions: klear and Madridi

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: Also the wood ui for twl menu is back... +2