removed lutris -w instead use lutris -r to install wine runner. and minor changes to readme file and runner.py

This commit is contained in:
Ahmed Al Balochi 2021-10-29 16:44:41 +05:00 committed by Mathieu Comandon
parent da9eb8e1f9
commit 92e1cae85d
3 changed files with 8 additions and 25 deletions

View file

@ -95,8 +95,7 @@ The following command line arguments are available::
-s, --list-steam-games List available Steam games
--list-steam-folders List all known Steam library folders
--list-runners List all known runners
--list-wine-runners List all known Wine runners
-w, --install-wine-runner Install a Wine Runner
--list-wine-runners List all known Wine runners
-r, --install-runner Install a Runner
-u, --uninstall-runner Uninstall a Runner
-j, --json Display the list of games in JSON format

View file

@ -193,14 +193,6 @@ class Application(Gtk.Application):
_("List all known Wine runners"),
None,
)
self.add_main_option(
"install-wine-runner",
ord("w"),
GLib.OptionFlags.NONE,
GLib.OptionArg.STRING,
_("Install a Wine Runner"),
None,
)
self.add_main_option(
"install-runner",
ord("r"),
@ -416,12 +408,6 @@ class Application(Gtk.Application):
self.print_wine_runners()
return 0
# install Wine Runner
if options.contains("install-wine-runner"):
version = options.lookup_value("install-wine-runner").get_string()
self.install_wine_runner(version)
return 0
# install Runner
if options.contains("install-runner"):
runner = options.lookup_value("install-runner").get_string()
@ -756,11 +742,11 @@ class Application(Gtk.Application):
if i["version"]:
print(i)
def install_wine_runner(self, version):
Runner.prepare_wine_runner_cli(version)
def install_runner(self, runner):
Runner.prepare_runner_cli(runner)
if runner.startswith("lutris"):
Runner.prepare_wine_runner_cli(runner)
else:
Runner.prepare_runner_cli(runner)
def uninstall_runner(self, runner):
if runner in "wine":

View file

@ -327,11 +327,10 @@ class Runner: # pylint: disable=too-many-public-methods
from lutris.gui.dialogs.download import simple_downloader
try:
self.install(downloader=simple_downloader, version=version)
print("Wine " + version + " is Installed")
except RunnerInstallationError as ex:
ErrorDialog(ex.message)
print("Wine " + version + " is Installed")
def wine_runner_uninstall(version):
version = version + "-x86_64"
WINE_DIR = os.path.join(settings.RUNNER_DIR, "wine")
@ -340,7 +339,7 @@ class Runner: # pylint: disable=too-many-public-methods
system.remove_folder(runner_path)
print("Wine Runner is Removed")
else:
print("Couldn't not remove the Runner, Please Check Your Input")
print("Wrong Input! Please Check if the Runner is installed. Or check if You have provided the right version name")
def prepare_runner_cli(runner_name):
"""
@ -366,11 +365,10 @@ class Runner: # pylint: disable=too-many-public-methods
from lutris.gui.dialogs.download import simple_downloader
try:
self.install(version=None, downloader=simple_downloader, callback=None)
print(self.name + " is now installed :)")
except RunnerInstallationError as ex:
ErrorDialog(ex.message)
print(self.name + " is now installed :)")
def uninstall_runner_cli(runner_name):
"""
uninstall the runner given in application file located in lutris/gui/application.py