Homebrew WIP My Goldleaf fork, based on 0.9, with NSZ support

CompSciOrBust

E tier homebrew dev
Member
Joined
Sep 9, 2019
Messages
513
Trophies
0
XP
1,488
Country
United Kingdom
I'm not using software made by an insane person that has enough low-level access to brick my system, simple as that
Ok, but this fork isn't made by Blawar? It just uses a standard which he helped develop. Use whatever software you want, I like vanilla Goldleaf, but I think the NSZ is bad because Blawar argument is dumb.
 

grey72

Well-Known Member
Member
Joined
Jul 5, 2018
Messages
268
Trophies
1
XP
1,555
Country
Antarctica
Ok, but this fork isn't made by Blawar? It just uses a standard which he helped develop. Use whatever software you want, I like vanilla Goldleaf, but I think the NSZ is bad because Blawar argument is dumb.
Oh I was talking about blawar's installers and stuff. open source stuff like this I'm fine with, even xortroll's said dumb shit like he'd brick SXOS users
 
Last edited by grey72,
  • Like
Reactions: CompSciOrBust

Worldblender

Well-Known Member
OP
Member
Joined
May 27, 2019
Messages
265
Trophies
0
Age
24
XP
1,273
Country
United States
With commit https://github.com/RQWorldblender/Goldleaf/commit/fe61586eaa026e1b3ac4ba63e9f8912726748d88, I have made some progress in getting NSZ files to progress a little beyond the confirm install dialog (no more invalid PFS0 errors), but installs will eventually result in a force close, with no way for me to tell what went wrong. I don't know how I can debug homebrew programs when they run on a real Switch, unfortunately. This will result in NSZ files getting their own icons on the home screens, but with a perpetual loading icon, and only deleting such titles will get rid of the icon. I wish someone would look at whatever I have done so far... :(
 

duckbill007

Well-Known Member
Member
Joined
May 5, 2011
Messages
402
Trophies
0
XP
1,333
Country
Russia
Goldleaf as well as awoo and other installers all are using bad installation algorithm from adubbz's tinfoil:
create app record, then one by one copy contents to place holder and register it. In case of any problem during installation tis algorithm leaves tons of garbage in system including rotating icon oh home screen.

correct algorithm should be following: first copy all contents to placeholders (btw thier ID can be randomly generated and not copied from contentid) only after that register placeholders (this step on non corrupted FS can not produce errors) and only after that create app record - algo used by eshop. pros of this: in case of any errors during content copy one simple call to ncmContentStorageCleanupAllPlaceHolder and system is clean without any garbage from failed install.
 
  • Like
Reactions: Worldblender

Worldblender

Well-Known Member
OP
Member
Joined
May 27, 2019
Messages
265
Trophies
0
Age
24
XP
1,273
Country
United States
@Worldblender, just copy NSZ install code from goldbricks
That's what I did, but copying alone didn't work. That's why I might need to rewrite something about the NSZ installation part, but I don't know where, that's my main issue.

Goldleaf as well as awoo and other installers all are using bad installation algorithm from adubbz's tinfoil:

create app record, then one by one copy contents to place holder and register it. In case of any problem during installation tis algorithm leaves tons of garbage in system including rotating icon oh home screen.

correct algorithm should be following: first copy all contents to placeholders (btw thier ID can be randomly generated and not copied from contentid) only after that register placeholders (this step on non corrupted FS can not produce errors) and only after that create app record - algo used by eshop. pros of this: in case of any errors during content copy one simple call to ncmContentStorageCleanupAllPlaceHolder and system is clean without any garbage from failed install.

Implementing this part may be too much out of my scope, as it would require that I spend time learning how it works. Since it's likely that the official method used is unlikely to be open-source, it may make me less motivated, which means that I will likely become frustrated and potentially give up at some point, assuming that nobody else steps in to help with the code.
 
Last edited by Worldblender,

Worldblender

Well-Known Member
OP
Member
Joined
May 27, 2019
Messages
265
Trophies
0
Age
24
XP
1,273
Country
United States
Update 2: My code is currently not working right, as installation will eventually cause the hosting title to crash. What a bummer to find out so late! I'll try my best to fix it, but no guarantee that I will be able to complete the fix successfully.

Update 3: It looks like it would take so long for me to fix the issues I'm having, and the stigma that the NSZ format is used mainly for piracy, makes it hard especially if I'm the only person working on this to bring NSZ support to my Goldleaf fork. Unless someone wants to step to help me solve the crashing problem, I'm very close to just giving up. The repository has now been archived/been made read-only, but I can undo this change if anyone requests it.
In the meantime, I will likely return to upstream Goldleaf, but I will use https://github.com/nicoboss/nsz to convert my NSZ files into NSP beforehand, since Goldleaf will keep NSP support.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    Veho @ Veho: There's even a TV series.