Bottles icon indicating copy to clipboard operation
Bottles copied to clipboard

[Request]: Add CLI option to modify dependencies

Open TheJanzap opened this issue 11 months ago • 2 comments

Tell us the problem or your need

In order to fully automate bottle creation, it would be good if Installing/removing dependencies could be managed via the CLI. AFAIK it's currently only possible via the GUI, which can be a bit fiddly at times.

Describe the solution you'd like

I'd like to see a CLI command to list, add and remove dependencies to/from a bottle. Maybe this could be achieved via a new argument to bottles-cli edit?

Other solutions?

By looking at the docs it seems that it may already be possible by using bottles-cli new --custom-environment but I was unable to get it to work. I tried copying and modifying a bottle.yml from a existing bottle, but got the error Recipie not not found or not valid.... If it's indeed possible to add dependencies this way, more information in the docs about the environment.yml would be appreciated.

Additional context and references

No response

TheJanzap avatar Aug 04 '23 14:08 TheJanzap

Using flatpak run --command=bottles-cli com.usebottles.bottles new --bottle-name NEWONE --environment Gaming --custom-environment ./testbottle.yml I managed to successfully clone a bottle BUT dependencies were not installed on the cloned one. Weird.

I was trying to implement the feature myself due to frustration and had a hard time implementing it apart from the fact that I am very rusty with python and a absolute noob about debugging such large project; at least to understand how the GUI part works with deps installation.

I managed to implement the list_installed (very simple) and something about the remove (without proper testing) but absolutely zero luck in the install one.

lukeomatik avatar Oct 06 '23 16:10 lukeomatik

I began to work on this in #3324 , which currently includes functionally in the list command to list dependencies (and moves programs -b <bottle> over to list programs -f bottle:<name>), by adding complex -f|--filter functionality to the list command. I am working towards a solution that will also allow to call their installers, since I've been able to push my way through listing dependencies using the backend of Bottles, and adding complex filters, it is getting close.

This PR also includes the build script improvements to make it to build this project easier. So I hear you, I'm working it out. It have been 2 days of work so far of study to learn how this project's backed functions. But I think that I have an okay gasp now, and can begin to help with this sorely missing part of the project. bottles-cli automation of dependencies, like winetricks used to have, and the ability to use the cli more effectively with complex filters for queries on bottles, components, programs, and dependencies.

The biggest time consuming part so far is separating the functionality from GTK which has been done in my PR thusfar.

loopyd avatar Mar 28 '24 23:03 loopyd