libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.39k stars 1.84k forks source link

Add support for commandline option to update cores and other stuff (Feature Request) #12175

Open thingsiplay opened 3 years ago

thingsiplay commented 3 years ago

Feature Request

Currently I can update the cores and assets through the GUI by simply clicking the icon. I imagine it would be an easy thing to add a commandline option like --update cores assets and so on to kick the exact same update procedure without using the GUI. This can be used to automate the update process through scripts, in example whenever I update my system. Here is an image of the section I am talking about: https://i.imgur.com/D1A3Pks.png

Description

No way to update cores and assets without using the GUI.

Expected behavior

Commandline option like --update cores assets, so the updating these parts would not require opening the GUI.

Version/Commit

Environment information

cascardian commented 3 years ago

I like this feature request. So let me add on to it.

I'm also not seeing a way to update Retroarch itself, or the redistributables, via command line (it's not documented in --help). There should probably be a way to do that in lieu of using complicated batch/PowerShell/etc. scripting.

So -u, i. e., --update retroarch redist cores core-info assets controller-profiles cheats databases overlays slang-shaders and so on. Maybe comma-separated? And maybe use --update retroarch for stable and something like --update retroarch-nightly for nightly builds?

thingsiplay commented 3 years ago

The actual implementation is secondary, I was more talking about the main idea to do that on the commandline. For updating retroarch itself, I don't know if it makes sense to do that from the retroarch command option itself. Because usually the program is installed through a package manager or flatpak in example. I am not even suggesting to add new functionality, other than binding existing functionality from the gui to the commandline.

It could be a comma separated list, nothing wrong with it. But I don't see any need for it here. One problem from your example is that I do not recommend a dash "-" in option arguments, because it needs extra work to parse them correctly (or it does not, I don't know exactly) or can cause confusion. In example instead "core-info", just name it "coreinfo".

Maybe add a sub-command "all" to it, so you do not need to list everything. And even if new update categories are added, "all" would cover them automatically without the need to revisit your script, figure out which one is new and edit. Or a dedicated option to --update-all.

cascardian commented 3 years ago

You make good points!

Because usually the program is installed through a package manager or flatpak in example. I am not even suggesting to add new functionality, other than binding existing functionality from the gui to the commandline.

This would primarily be for Windows users. There is an already existing Qt GUI function for it as well.

christianhaitian commented 1 year ago

Just adding that this would be an awesome feature.

MasterRee commented 5 months ago

Just another vote for this feature. The ability to automate the updates through the CLI would be very helpful.