ConsoleConfiguration

Good to have CLI program or script

It should be possible to do a variety of Wine tasks solely from the command line. The advantage to this is that we can then configure Wine using scripts, without having to duplicate any code. Wine itself is the natural way to do this, as we can abstract away any possible differences between future versions of Wine and how it stores specific configuration metadata. We also prevent other projects from having to recreate and maintain their own registry parser code, which could become exceptionally difficult if Wine (or Windows) ever changes the way the registry is handled.

Desired features

Uninstallation

  • --list-uninstall: would output a list of applications that can be removed, as well as their short descriptions and the linux path of their icon
  • --uninstall FOO: would launch the uninstaller for application foo

These two commands are desirable so we can uninstall Windows applications from within the Gnome add/remove programs applet, gnome-app-install.

Windows version

  • --windows-version: list the default windows version
  • --windows-version FOO.EXE: show the windows version that foo.exe would run with. Output is "default" or whatever is in the registry
  • --windows-version [foo.exe] WINVERSION: set default windows version to WINVERSION, or set the version specifically for foo.exe

These commands are desirable so we can set the windows version from a context menu (right click the application, go to properties, and then set it there), as well as setting the default windows version from a (very simplified) version of winecfg.

Implementation

Implementation should come in a few steps to make it into small, Alexandre-approved patches.

  • Create stub functions for calling Wine with above arguments
  • Implement functionality for above commands - copy it from winecfg
  • Change winecfg to use the same codepath

maybe: modify winecfg so that it is a script, if the script detects no arguments then launch normal winecfg gui, if args detected then launch this new command line config program. Having this command line configure stuff separate from the main wine launcher might be more tasty to Alexandre. Maybe this is what you were meaning all along, in that case then I'm just clarifying =)

maybe: have winecfg be the command line tool when launched with arguments. Have all functionality of winecfg accessible through command line arguments. Use the existing winecfg code for the actual configuration.

No worker currently (in fact, this idea still needs to be mailed to wine-devel)

[ReeceDunn]: I have posted some ideas on how to improve winecfg (see http://www.winehq.org/pipermail/wine-devel/2008-February/062529.html), including adding CLI support to winecfg. While not as extensive as this, it should at least start the ball rolling. CLI support makes a lot of sense, especially allowing for post-install/pre-removal scripts to do the right thing. The usage model I was thinking of in the e-mail is to use winecfg to install a Ubuntu human.theme file as a post-install step.


CategoryToDo

ConsoleConfiguration (last edited 2008-05-11 23:49:54 by nathan.n)