Homebrew [WIP] installMii - Graphical repository downloader

Where homebrew descriptions should be loaded from?

  • From the related smdh file

    Votes: 19 40.4%
  • From the repo package list (aka packages.json)

    Votes: 28 59.6%

  • Total voters
    47
  • Poll closed .

YodaDaCoda

Member
Newcomer
Joined
Jun 28, 2011
Messages
18
Trophies
0
XP
130
Country
@simonepsp I have a suggestion for your app that I think would make it more versatile.

Essentially, rather then downloading individual files, create a package (like a .zip or .tar.gz) for each homebrew application that can be downloaded and extracted directly to the SDcard. This would necessitate structuring the package in a precise manner to allow it to be directly extracted, but that's not hard to do. It would also necessitate some sort of decompression code within your app, but I expect you could use zlib to achieve this.

This would simplify creation of packages somewhat, and remove the need to have a separate package.list for each package.

Ideally, you'd also keep track of which packages are installed through the app and which versions, so that you could have a button to download all updated packages in one hit.

I know there's quite a lot to this, but it looks like you have the skills to make it happen. It'd make for a really complete system for managing homebrews.
 
Last edited by YodaDaCoda,

SMVB64

Now your playing with power! Super power!
Member
Joined
Feb 13, 2013
Messages
230
Trophies
1
XP
1,052
Country
Canada
For some reason Firefox is blocking the .zip when I try downloading it.
Anyone getting this? False positive?
 

AileenLumina

Python main, software engineer and API designer
Member
Joined
Sep 27, 2015
Messages
631
Trophies
0
Age
26
XP
614
Country
Germany
@simonepsp I have a suggestion for your app that I think would make it more versatile.

Essentially, rather then downloading individual files, create a package (like a .zip or .tar.gz) for each homebrew application that can be downloaded and extracted directly to the SDcard. This would necessitate structuring the package in a precise manner to allow it to be directly extracted, but that's not hard to do. It would also necessitate some sort of decompression code within your app, but I expect you could use zlib to achieve this.

This would simplify creation of packages somewhat, and remove the need to have a separate package.list for each package.

Ideally, you'd also keep track of which packages are installed through the app and which versions, so that you could have a button to download all updated packages in one hit.

I know there's quite a lot to this, but it looks like you have the skills to make it happen. It'd make for a really complete system for managing homebrews.
I second this (it's quite easy to do, see ZIP3DSFX by @d0k3 ), but first we should get file writing working. ^^
 
  • Like
Reactions: dark_samus3

Stack3r

Shizuo Heiwajima
Member
Joined
Jan 24, 2014
Messages
980
Trophies
0
Age
31
Location
Ikebukuro
XP
1,472
@simonepsp So idk if you are or not but are you going to implement updating already downloaded applications? And for some reason when i click the home menu icon the screen fades to black and just stays there i have to force my device off
 

BoltsJ

Member
Newcomer
Joined
Jan 2, 2016
Messages
11
Trophies
0
Age
34
XP
131
Country
United States
I just tried to download ReinandUpdater (see packages.json:
Code:
{"repo":{"name":"3DS CFW Kit","author":"AidanLumina","website":null},"packages":[{"name":"NASA","author":"Rinnegatamante","short_description":"CIA manager for 9.3.0+","category":"Other","website":"http://rinnegatamante.it","type":"3ds","version":"1.0.0","dl_path":"3ds/NASA/","info_path":"3ds/NASA/NASA.sdmh"},{"name":"ReinandUpdater","author":"Reisyukaku","short_description":"Reinand Updater","category":"CFW","website":"http://reisyukaku.org","type":"3ds","version":"2.1b","dl_path":"3ds/ReinandUpdater/","info_path":"3ds/ReinandUpdater/ReinandUpdater.sdmh"}]}
) but back in the HBL, nothing's changed. :/

You can take a look at my repo here.
Your package.list file is using dos line endings (\r\n) instead of unix (\n). That seems to be causing a literal '\r' character to be appended to the downloaded file name. I think, at least.
 

AileenLumina

Python main, software engineer and API designer
Member
Joined
Sep 27, 2015
Messages
631
Trophies
0
Age
26
XP
614
Country
Germany
Your package.list file is using dos line endings (\r\n) instead of unix (\n). That seems to be causing a literal '\r' character to be appended to the downloaded file name. I think, at least.
Thanks a lot! Yeah, I can't remember if I typed that file on my CM device or on my Windows desktop.
Edit: Yes, there were DOS linebreaks. Now that I have Linux linebreaks, everything is working perfectly fine now! :)
 
Last edited by AileenLumina,

ChaosJester

Active Member
Newcomer
Joined
Jun 16, 2015
Messages
33
Trophies
0
Age
41
XP
110
Country
Your package.list file is using dos line endings (\r\n) instead of unix (\n). That seems to be causing a literal '\r' character to be appended to the downloaded file name. I think, at least.
That was my issue as well.

So that got me thinking about scripting up something to generate and make sure the package.list is right.

Whipped this up - https://github.com/chaosjester/PSInstallMiiRepoGenerator its powershell, so windows only.

So far it just creates and fixes the package.list from your local repo folder. Once I play around a bit I am going to try and make it generate the packages.json file and the repo.list files too.

EDIT: Also going to try and get it to throw the info from the SMDH in to the packages.json file if I can figure this out
 
Last edited by ChaosJester,

AileenLumina

Python main, software engineer and API designer
Member
Joined
Sep 27, 2015
Messages
631
Trophies
0
Age
26
XP
614
Country
Germany
That was my issue as well.

So that got me thinking about scripting up something to generate and make sure the package.list is right.

Whipped this up - https://github.com/chaosjester/PSInstallMiiRepoGenerator its powershell, so windows only.

So far it just creates and fixes the package.list from your local repo folder. Once I play around a bit I am going to try and make it generate the packages.json file and the repo.list files too.

EDIT: Also going to try and get it to throw the info from the SMDH in to the packages.json file if I can figure this out
You can see the source of SMDH-Creator to find out about the algorithm. :) And nice project of yours, looking forward for this! :)
 

ChaosJester

Active Member
Newcomer
Joined
Jun 16, 2015
Messages
33
Trophies
0
Age
41
XP
110
Country
You can see the source of SMDH-Creator to find out about the algorithm. :) And nice project of yours, looking forward for this! :)

Thanks, quick update.

Managed to get it to pull out the data I needed from the SMDH, though just need to make it not do anything if there isn't one present.

Also just updated the github, the script will now generate your repo.list too. I know you can add more than 1 repo, but I am writing this assuming that 1 repo will be used, the repo.list can always be manually edited if need be, its the rest that is painful to do manually :P
 

AileenLumina

Python main, software engineer and API designer
Member
Joined
Sep 27, 2015
Messages
631
Trophies
0
Age
26
XP
614
Country
Germany
Thanks, quick update.

Managed to get it to pull out the data I needed from the SMDH, though just need to make it not do anything if there isn't one present.

Also just updated the github, the script will now generate your repo.list too. I know you can add more than 1 repo, but I am writing this assuming that 1 repo will be used, the repo.list can always be manually edited if need be, its the rest that is painful to do manually :P
Your Powershell application will work with FTP, did I get that right? :)
Also, when you're done with everything you're already planning, you could add a feature that allows importing a piece of software to the repo by providing the program with a github URL. :)

Another question to you all: Is it possible to write a server program that keeps the repo up-to-date? :)
 

ChaosJester

Active Member
Newcomer
Joined
Jun 16, 2015
Messages
33
Trophies
0
Age
41
XP
110
Country
Your Powershell application will work with FTP, did I get that right? :)
Also, when you're done with everything you're already planning, you could add a feature that allows importing a piece of software to the repo by providing the program with a github URL. :)

Another question to you all: Is it possible to write a server program that keeps the repo up-to-date? :)

Right now it is all local so it won't do anything with FTP. My skills are quite limited and to make it do what I want it to do is already pushing me to learn more.

Not saying its not possible, just not sure when I could get it to that kind of level.

Though I have been thinking that it might be time to ditch this idea and do something in PHP that could do all of this on the server side, so you would just FTP up your files, run a PHP script and have all this generated.

But my PHP skills are pretty limited too so don't hold your breath.
 

AileenLumina

Python main, software engineer and API designer
Member
Joined
Sep 27, 2015
Messages
631
Trophies
0
Age
26
XP
614
Country
Germany
Right now it is all local so it won't do anything with FTP. My skills are quite limited and to make it do what I want it to do is already pushing me to learn more.

Not saying its not possible, just not sure when I could get it to that kind of level.

Though I have been thinking that it might be time to ditch this idea and do something in PHP that could do all of this on the server side, so you would just FTP up your files, run a PHP script and have all this generated.

But my PHP skills are pretty limited too so don't hold your breath.
I'd say just continue working on what you did already if you don't feel like you can make it in PHP. Someone else will probably pick it up and finish it for you. :)
 

AileenLumina

Python main, software engineer and API designer
Member
Joined
Sep 27, 2015
Messages
631
Trophies
0
Age
26
XP
614
Country
Germany
Soooooo I have the PHP version pretty much at the same point as the powershell version...

https://github.com/chaosjester/PHPInstallMiiRepo

It will create the repo.list and the packages.list's too :)

Required Apache on Linux with PHP shell_exec enabled, I am pretty happy with it and will work to get the rest working in time.
Wow, that's awesome! It will help me a lot to keep the repo up-to-date! :)

Now we just need a server version of ZIP3DSFX :) Or @simonepsp modifies the installMii source code so it can extract ZIP files to the root of the SD card. :)
 
Last edited by AileenLumina,

ChaosJester

Active Member
Newcomer
Joined
Jun 16, 2015
Messages
33
Trophies
0
Age
41
XP
110
Country
Small update, I have SMDH file scraping done, just need to work out how to make the JSON from there.

Quick question to @simonepsp does the packages.json have to have all of the fields in place for InstallMii to work?

For example, could I trim:

Code:
{"name":"eDuke3D","author":"masterfeizz","short_description":"Duke Nukem 3D","category":"games","website:":null,"type":"3ds","version":"0.2.1","dl_path":"3ds/eduke3d/","info_path":"3ds/eduke3d/eduke3d.smdh"}

to:

Code:
{"name":"eDuke3D","author":"masterfeizz","short_description":"Duke Nukem 3D","dl_path":"3ds/eduke3d/","info_path":"3ds/eduke3d/eduke3d.smdh"}

and still have it work?
 
Last edited by ChaosJester,

ChaosJester

Active Member
Newcomer
Joined
Jun 16, 2015
Messages
33
Trophies
0
Age
41
XP
110
Country
So with the help of @LiquidFenrir, who has been stupid crazy awesome I might add... I have a proof of concept for the whole package that will create your repo.list and scrape the details from the SMDH to create the packages.json.

Right now there are some tweeks that I need to do on the SMDH scraping but once I have that worked out it will all be good to go.

I am traveling a bit for work for a bit though so I can't say when it will be done and available but it should be soon!

The only real issue is that if you manually add a package that does not contain an SMDH file, it will get kicked out of packages.json every time you run the script. So there are a lot of SMDH creators out there so for anyone planning on using this, I would suggest creating your own SMDH, even if it just has dummy info.

Stay tuned ;)
 
  • Like
Reactions: AileenLumina

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: I've always been kind to @AncientBoi