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
oh, uh. so i had python 2 and python 3 co-installed before i ever came across aio.bat. so what i had done was, i duplicated "python.exe" in my "python27" folder, renamed it "python2.exe", and put it in my PATH as "python2". then i did the same thing with python.exe in python34 folder, and also with pip.exe in both locations. so now typing in "python" in command prompt wont do anything, i have to say "python2" or "python3" to use them. it just works, idk man, i did this a while ago.

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

oh but running the easy_install command you gave did do something actually, like it said it worked and made a link or something
Quote me next time.. I don't see your replies otherwise.

You are messing everything up. Everything you mentioned was not necessary. The easiest way to do this is the following:
- Uninstall both python installations
- install python 2.7.x (whatever is latest)
- install python 3.x (whatever is latest)
- install pyYAML in the main post
- Rename python.exe in python 3 folder to python3.exe
- Go to python27/scripts folder and hold ctrl + right lick and open cmd. type easy_install pycrypto

That's all, no renaming, no additional path adding (main folders should already be in path)
 
Last edited by Madridi,
  • Like
Reactions: Rohul1997
Quote me next time.. I don't see your replies otherwise.

You are messing everything up. Everything you mentioned was not necessary. The easiest way to do this is the following:
- Uninstall both python installations
- install python 2.7.x (whatever is latest)
- install python 3.x (whatever is latest)
- install pyYAML in the main post
- Rename python.exe in python 3 folder to python3.exe
- Go to python27/scripts folder and hold ctrl + right lick and open cmd. type easy_install pycrypto

That's all, no renaming, no additional path adding (main folders should already be in path)

but that'll screw up with PlaiCDN.. and i really don't want to uninstall my pythons, i have a bunch of modules i work with in them and i dont remember them all
 
but that'll screw up with PlaiCDN.. and i really don't want to uninstall my pythons, i have a bunch of modules i work with in them and i dont remember them all
Not sure why that would screw up PlaiCDN, but can't really help with a "customized" set up.

Bottomline is, the program works. It's your setup that has a problem.
 
can i just install pyYAML natively? or do i need to use what you linked?

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

Not sure why that would screw up PlaiCDN, but can't really help with a "customized" set up.

Bottomline is, the program works. It's your setup that has a problem.
 
can i just install pyYAML natively? or do i need to use what you linked?

--------------------- MERGED ---------------------------
You probably can. There is no right or wrong way to do it as far as I know. I just linked to the method I was taught how to do.

Btw, in case you are going for a reinstall, I forgot to also add do the MKlink procedure mentioned in the first post
 
@DjoeN

- I added the Mklink instructions to the main post, but I kept made that only for python2 (and added that to your credits as well) .. I assume having python.exe for both python 2 and python 3 will cause conflict, and the system wont know which one to choose for compiling. Since only cakes is using python 3, I figured it's better to rename python.exe to python3.exe instead

I figure I should mention that symlinks don't work like that. If you have two python binaries:

Code:
c:\python27\python.exe
c:\python35\python.exe

Then make symlinks like this:

Code:
mklink python2.exe c:\python27\python.exe
mklink python3.exe c:\python35\python.exe

Then python3 will run c:\python35\python.exe and python2 will run c:\python27\python.exe.

When running just plain ol' python.exe, whichever of c:\python27 and c:\python35 is first in the %PATH% will take priority.
 
I figure I should mention that symlinks don't work like that. If you have two python binaries:

Code:
c:\python27\python.exe
c:\python35\python.exe

Then make symlinks like this:

Code:
mklink python2.exe c:\python27\python.exe
mklink python3.exe c:\python35\python.exe

Then python3 will run c:\python35\python.exe and python2 will run c:\python27\python.exe.

When running just plain ol' python.exe, whichever of c:\python27 and c:\python35 is first in the %PATH% will take priority.
I know that, that wasn't what I am referring to though.

The python2 and python3 commands are (from what I understand) used in Linux. Most make files are looking for python.exe

What I was referring to that, while we can create ah links for python2 and python3, those looking for python.exe might get conflicted cause there are 2 of those.

Therefore, since, so far from everything included in the bat, everything uses python2 except for cakes, which is looking for a python3.exe not python.exe, it would be a better solution to rename python.exe to python3.exe, while creating the link only for python2.

This way, everytime a build is looking for python.exe, it will be directed to python2 folder.

I hope that explains it. Thanks for the explanation though, and please do let me know if there is a better way to do this :)

Btw, I've added your cfw to the program, I just have been too lazy to upload it. I'll do that tomorrow and send proper credits your way :)

Edit: Just realized you mentioned which takes priority, but that got complicated when at some point (can't remember where, maybe when we were installing pyYAML)
 
Last edited by Madridi,
  • Like
Reactions: Rohul1997
Btw, I've added your cfw to the program, I just have been too lazy to upload it. I'll do that tomorrow and send proper credits your way :)

Edit: Just realized you mentioned which takes priority, but that got complicated when at some point (can't remember where, maybe when we were installing pyYAML)

You can have duplicate entries in %PATH%. If you know Cakes uses py3, why not just use the set command to temporarily override %PATH% for known software using one or the other? Otherwise, usually 'python' is 'python2'.

Windows isn't nearly as good for development of stuff, IDK. I don't think I can go back to batch files from shell scripts.

Side note - Corbenik can be very unstable in git versions, so I don't want any bugs filed against git builds unless they also happen in the current release. I'm fine with people using git builds, though.
 
  • Like
Reactions: Madridi
You can have duplicate entries in %PATH%. If you know Cakes uses py3, why not just use the set command to temporarily override %PATH% for known software using one or the other? Otherwise, usually 'python' is 'python2'.
Could you elaborate on that? The only other way I know is to edit cakes make file to point to the correct .exe
If there is a command to override whatever is in path, I'll gladly look at those

Side note - Corbenik can be very unstable in git versions, so I don't want any bugs filed against git builds unless they also happen in the current release. I'm fine with people using git builds, though.
This isn't meant to be used instead of official releases. It is just that people tend to want to build and try the latest commit of anything and everything. This is just meant to automate the process instead of git clone --recursive (insert link here) them finding the correct command to build. (Not everyone uses "make" so sometimes you have to figure it out lol). Being non-stable should be common knowledge since there is no release.

It's your source though. If you still don't feel comfortable with it, I'll remove it :)
 
You probably can. There is no right or wrong way to do it as far as I know. I just linked to the method I was taught how to do.

Btw, in case you are going for a reinstall, I forgot to also add do the MKlink procedure mentioned in the first post

I asked coz of i had pyyaml installed natively for both my setups of python. thanks @chaoskagami, i'll use your thingy about MKlink
 
  • Like
Reactions: Madridi
uh...looks no cia conversion script yet? If so could you add this script for your AIO script?
I know "buildtool" did the job, but most of the old homebrews and some new one's did not have option in makefile to convert CIA.

sample
Code:
@echo off
@echo make sure you have a path for makerom and bannertool. (important)
@echo Put icon.png(48x48) banner.png(256x128) sound.wav(Max 380kb) in same folder or directory. (important)
@echo.
@echo.
@echo ------Type information for CIA conversion------
set /p CIA = output CIA file name (w/ extension):
set /p elf = input ELF file name (w/ extension):
set /p Des = description for homebrew:
set /p title = homebrew title:
set /p Author = Author Name:

bannertool makebanner -i "banner.png" -a "sound.wav" -o "banner.bnr" 
bannertool makesmdh -i "icon.png" -s %Des% -l "title" -p %Author% -o "icon.icn"
makerom -f cia -o %CIA% -rsf template.rsf -target t -elf %elf% -icon icon.icn -banner banner.bnr
::original conversion script made by zoogie.
 
  • Like
Reactions: Madridi
Could you elaborate on that? The only other way I know is to edit cakes make file to point to the correct .exe
If there is a command to override whatever is in path, I'll gladly look at those


This isn't meant to be used instead of official releases. It is just that people tend to want to build and try the latest commit of anything and everything. This is just meant to automate the process instead of git clone --recursive (insert link here) them finding the correct command to build. (Not everyone uses "make" so sometimes you have to figure it out lol). Being non-stable should be common knowledge since there is no release.

It's your source though. If you still don't feel comfortable with it, I'll remove it :)

Nah, I'm cool with it. I'm a bleeding edge type myself, so I understand the mindset perfectly well.

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%
 
uh...looks no cia conversion script yet? If so could you add this script for your AIO script?
I know "buildtool" did the job, but most of the old homebrews and some new one's did not have option in makefile to convert CIA.

sample
Code:
@echo off
@echo make sure you have a path for makerom and bannertool. (important)
@echo Put icon.png(48x48) banner.png(256x128) sound.wav(Max 380kb) in same folder or directory. (important)
@echo.
@echo.
@echo ------Type information for CIA conversion------
set /p CIA = output CIA file name (w/ extension):
set /p elf = input ELF file name (w/ extension):
set /p Des = description for homebrew:
set /p title = homebrew title:
set /p Author = Author Name:

bannertool makebanner -i "banner.png" -a "sound.wav" -o "banner.bnr"
bannertool makesmdh -i "icon.png" -s %Des% -l "title" -p %Author% -o "icon.icn"
makerom -f cia -o %CIA% -rsf template.rsf -target t -elf %elf% -icon icon.icn -banner banner.bnr
::original conversion script made by zoogie.
Thanks, I'm kinda confused how this runs though. It requires it to have banner tools in the same directory?

If so, I'm not in favor of having additional files supplied with AIO, as it's meant to be run from anywhere regardless of anything else. It can be a seperate bat file distributed with banner tools to automate that process, but it certainly does not fit the job AIO does.

If it's possible to figure out a way to integrate it with the sources, then I can easily add as it as an option to convert right after compiling is done.

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

Nah, I'm cool with it. I'm a bleeding edge type myself, so I understand the mindset perfectly well.

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%
Cool, thanks. I'll see about adding those commands later. If it works fine, then sum link can be created for both python 2 and 3 without having a problem
 
  • Like
Reactions: Februarysn0w
Thanks, I'm kinda confused how this runs though. It requires it to have banner tools in the same directory?

If so, I'm not in favor of having additional files supplied with AIO, as it's meant to be run from anywhere regardless of anything else. It can be a seperate bat file distributed with banner tools to automate that process, but it certainly does not fit the job AIO does.

If it's possible to figure out a way to integrate it with the sources, then I can easily add as it as an option to convert right after compiling is done.

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


Cool, thanks. I'll see about adding those commands later. If it works fine, then sum link can be created for both python 2 and 3 without having a problem
I wil update my script for more user friendly as much as possible.
 
  • Like
Reactions: Madridi
I figure I should mention that symlinks don't work like that. If you have two python binaries:

Code:
c:\python27\python.exe
c:\python35\python.exe

Then make symlinks like this:

Code:
mklink python2.exe c:\python27\python.exe
mklink python3.exe c:\python35\python.exe

Then python3 will run c:\python35\python.exe and python2 will run c:\python27\python.exe.

When running just plain ol' python.exe, whichever of c:\python27 and c:\python35 is first in the %PATH% will take priority.

I'm having an issue.. agin ;-;. I did that with mklink, and yes, thats where my python files are, i didnt just copy paste, and when i type python2 and hit enter it says: ImportError: No module named site
 
@Madridi
so, I updated my script. this script will download makerom.exe, bannertool.exe automatically. Do not need a path for those tools.

P.S
But if you have installed devkitpro already, I recommend you to put those .exe files to "C:\devkitPro\devkitARM\bin" for the future convenience.

Code:
@echo off
title CIA Builder
color 3F
@echo Automatically download "makerom.exe" and "bannertool.exe"
pause
@echo Downloading..... "makerom.exe" / CRC32:AE507687
@powershell -NoProfile -ExecutionPolicy Bypass -Command "$d=new-object System.Net.WebClient;$d.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;$d.DownloadFile('https://www.dropbox.com/s/bx7vcfa6q3d3cpe/makerom.exe?dl=1','makerom.exe')"
@echo Downloading..... "bannertool.exe" / CRC32:DF703568
@powershell -NoProfile -ExecutionPolicy Bypass -Command "$d=new-object System.Net.WebClient;$d.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;$d.DownloadFile('https://www.dropbox.com/s/c1g29ufane8ngin/bannertool.exe?dl=1','bannertool.exe')"
cls
@echo Download complete!
pause
cls
@echo [icon.png(48x48) banner.png(256x128) sound.wav(Max 383kb)]
@echo Put those files in the same folder or directory before press any key.
@echo Some homebrews like Emunand9, Decrypt9 can not build CIA this easily.
pause
cls
@echo ------Type infomation for CIA conversion------
set /p CIA = output CIA file name(w/ extension):
set /p elf = input ELF file name (w/ extension):
set /p Des = description for homebrew:
set /p title = homebrew title:
set /p Author = Author Name:

bannertool makebanner -i "banner.png" -a "sound.wav" -o "banner.bnr" 
bannertool makesmdh -i "icon.png" -s %Des% -l "title" -p %Author% -o "icon.icn"
makerom -f cia -o %CIA% -rsf template.rsf -target t -elf %elf% -icon icon.icn -banner banner.bnr
::original conversion script made by zoogie.
 
  • Like
Reactions: Madridi
@Madridi
so, I updated my script. this script will download makerom.exe, bannertool.exe automatically. Do not need a path for those tools.

P.S
But if you have installed devkitpro already, I recommend you to put those .exe files to "C:\devkitPro\devkitARM\bin" for the future convenience.

Code:
@echo off
title CIA Builder
color 3F
@echo Automatically download "makerom.exe" and "bannertool.exe"
pause
@echo Downloading..... "makerom.exe" / CRC32:AE507687
@powershell -NoProfile -ExecutionPolicy Bypass -Command "$d=new-object System.Net.WebClient;$d.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;$d.DownloadFile('https://www.dropbox.com/s/bx7vcfa6q3d3cpe/makerom.exe?dl=1','makerom.exe')"
@echo Downloading..... "bannertool.exe" / CRC32:DF703568
@powershell -NoProfile -ExecutionPolicy Bypass -Command "$d=new-object System.Net.WebClient;$d.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;$d.DownloadFile('https://www.dropbox.com/s/c1g29ufane8ngin/bannertool.exe?dl=1','bannertool.exe')"
cls
@echo Download complete!
pause
cls
@echo [icon.png(48x48) banner.png(256x128) sound.wav(Max 383kb)]
@echo Put those files in the same folder or directory before press any key.
@echo Some homebrews like Emunand9, Decrypt9 can not build CIA this easily.
pause
cls
@echo ------Type infomation for CIA conversion------
set /p CIA = output CIA file name(w/ extension):
set /p elf = input ELF file name (w/ extension):
set /p Des = description for homebrew:
set /p title = homebrew title:
set /p Author = Author Name:

bannertool makebanner -i "banner.png" -a "sound.wav" -o "banner.bnr"
bannertool makesmdh -i "icon.png" -s %Des% -l "title" -p %Author% -o "icon.icn"
makerom -f cia -o %CIA% -rsf template.rsf -target t -elf %elf% -icon icon.icn -banner banner.bnr
::original conversion script made by zoogie.
Thanks, but I'm weary about using the powershell command, as that is not compatible for everyone (it wasn't compatible for me initially).

What would it do to have those files in devkitpro? Would that eliminate the need for them to be redownloaded every time? I already included makerom in the first post as some build require that (Luma I think?). I can add bannertool.exe as well if that would eliminate the need for it to be downloaded everytime.

Still though, I think I have another way in mind. I'll wait for your reply though before I try it
 
can we get tinyxml2? also, citrus isn't building right anymore :c

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

Thanks, but I'm weary about using the powershell command, as that is not compatible for everyone (it wasn't compatible for me initially).

What would it do to have those files in devkitpro? Would that eliminate the need for them to be redownloaded every time? I already included makerom in the first post as some build require that (Luma I think?). I can add bannertool.exe as well if that would eliminate the need for it to be downloaded everytime.

Still though, I think I have another way in mind. I'll wait for your reply though before I try it

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

oh, and SafeA9LHInstaller is broken, it needs updating after aurora updated it
 
  • 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
Link for tinyxml2? I don't know what that is.

And I assume citrus and safea9lh will work after updating libctru, but I'll check later
 
@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?
 
  • Like
Reactions: Madridi

Site & Scene News

Popular threads in this forum