rlaphoenix / nton

Nintendo Switch NRO to NSP Forwarder
GNU General Public License v3.0
156 stars 4 forks source link

Linux support #8

Open willheisenberg opened 1 year ago

willheisenberg commented 1 year ago

nton build -n Quake3Arena -i /home/will/Downloads/Quake-III-Arena-icon.png --sdmc /media/will/SWITCH SD/switch/Q3ArenaNX/Q3ArenaNX.nro Downloading a list of Game Title IDs... 2023-01-26 15:56:08 [I] nton.main : nton version 1.2.0 Copyright (c) 2022-2023 rlaphoenix 2023-01-26 15:56:08 [I] nton.main : https://github.com/rlaphoenix/nton 2023-01-26 15:56:08 [I] build : Building! 2023-01-26 15:56:08 [E] build : The NRO path "SD/switch/Q3ArenaNX/Q3ArenaNX.nro" does not exist, or is not a file.

Any idea?

willheisenberg commented 1 year ago

nton build -n Quake3Arena -i /home/will/Downloads/Quake-III-Arena-icon.png --sdmc "/media/will/SWITCH SD/switch/Q3ArenaNX/Q3ArenaNX.nro"

This is not working as well!

rlaphoenix commented 1 year ago

Hi, the initial error is because you did not encapsulate the sdmc path with quotes. You did that in your next comment, however, you seem to still have issues? What is the error exactly?

I have noticed that you did not supply the path to the NRO still. You still need to supply the path to the NRO. E.g., nton build -n Quake3Arena -i /home/will/Downloads/Quake-III-Arena-icon.png --sdmc "/media/will/SWITCH SD/switch/Q3ArenaNX/Q3ArenaNX.nro" /home/will/Downloads/Q3ArenaNX.nro

You are also using --sdmc incorrectly. --sdmc should be specifying the path to the nro relative to the microSD card root. In this case it should be --sdmc /switch/Q3ArenaNX/Q3ArenaNX.nro. If /media/will/SWITCH SD/switch/Q3ArenaNX/Q3ArenaNX.nro is where you have the NRO file on your PC, then the final correct command would be:

nton build -n Quake3Arena -i /home/will/Downloads/Quake-III-Arena-icon.png --sdmc /switch/Q3ArenaNX/Q3ArenaNX.nro "/media/will/SWITCH SD/switch/Q3ArenaNX/Q3ArenaNX.nro"

P.S. You shouldn't need to specify your own Icon and Name unless you want to explicitly use a different name and icon than whats in the NRO metadata, or if the NRO does not have Icon data.

willheisenberg commented 1 year ago

Hmmm do you have an solution for that issue what is coming up now:

Traceback (most recent call last): File "/usr/local/bin/nton", line 8, in sys.exit(main()) File "/home/will/.local/lib/python3.9/site-packages/click/core.py", line 1130, in call return self.main(args, kwargs) File "/home/will/.local/lib/python3.9/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/will/.local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/will/.local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/will/.local/lib/python3.9/site-packages/click/core.py", line 760, in invoke return __callback(args, kwargs) File "/usr/local/lib/python3.9/dist-packages/nton/main.py", line 103, in build verification = nstool.verify(path, "nro") File "/usr/local/lib/python3.9/dist-packages/nton/nstool.py", line 33, in verify subprocess.check_output([ File "/usr/lib/python3.9/subprocess.py", line 424, in check_output return run(popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.9/subprocess.py", line 505, in run with Popen(popenargs, kwargs) as process: File "/usr/lib/python3.9/subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.9/subprocess.py", line 1698, in _execute_child and os.path.dirname(executable) File "/usr/lib/python3.9/posixpath.py", line 152, in dirname p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not NoneType

rlaphoenix commented 1 year ago

What command did you make? At a glance it seems as if the path to the NRO file resolved as nothing.

willheisenberg commented 1 year ago

nton build --sdmc /switch/Q3ArenaNX/Q3ArenaNX.nro "/media/will/SWITCH SD/switch/Q3ArenaNX/Q3ArenaNX.nro"

rlaphoenix commented 1 year ago

Did you install all of the dependencies listed in the readme? It sounds like you may not put them next to nton, or did not put them in the PATH Environment Variable.

willheisenberg commented 1 year ago

OK sorry for that. Im feeling a bit unsure about installing these dependencies on my Debian System. When i should have success i will let you know.

rlaphoenix commented 1 year ago

OK sorry for that. Im feeling a bit unsure about installing these dependencies on my Debian System. When i should have success i will let you know.

Yes, unfortunately, I don't think NTON supports Linux as of yet. This is mainly because of the dependencies as you have noticed. nstool is supported on Linux, but hacPack and hacBrewPack do not seem to be. At least there are no Linux binaries officially released for them anyway.

However, there are some old unofficial builds here: https://github.com/The-4n/hacBrewPack/issues/5 but support for them with NTON is not verified. Building for Linux seems possible, but it just seems like the developer is not making any official builds on Linux for them.

Maybe try the older builds and see if they work, if not maybe try see if you can get it compiled yourself by following the instructions in the README.