Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial fix for #143; TUI Improvements; Resolve #157 #163

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

thw26
Copy link
Collaborator

@thw26 thw26 commented Aug 30, 2024

This PR helps to fix at least one of the issues in #143.

I've also swapped the choice processor to using a dict to make it easier to understand or even reuse code, as per #146.

I've also added in the ability to switch the TUI's color scheme. See bottom of main menu for button.

I've also fixed its vertical and horizontal resizing and made it so the console log grows in size, too.

This PR also adds in submenus to the TUI to reduce the number of options in any single menu.

Implements a config and a TUI solution to fix #157.

This PR resolves #106 for the TUI.

This PR also adds in logging deduplication, to avoid unnecessary additional logs.

@thw26 thw26 requested a review from n8marti August 30, 2024 05:07
@thw26 thw26 force-pushed the 143-partial-fix branch 2 times, most recently from 3b04223 to 25e3cdd Compare August 30, 2024 15:53
@thw26
Copy link
Collaborator Author

thw26 commented Sep 13, 2024

After implementing the Winetricks options, for some reason the winetricks commands are not working. We need to figure out why.

  • Fix wine.run_winetricks_cmd()

Example error:

2024-09-13 00:10:42 ERROR: Error running '/usr/bin/winetricks -q settings win10': 1

@thw26 thw26 mentioned this pull request Sep 13, 2024
@thw26 thw26 force-pushed the 143-partial-fix branch 2 times, most recently from c8fc3dc to 09b493e Compare September 13, 2024 05:06
@thw26 thw26 changed the title Partial fix for #143 Partial fix for #143; TUI Improvements; Resolve #157 Sep 13, 2024
installer.py Outdated Show resolved Hide resolved
@thw26 thw26 force-pushed the 143-partial-fix branch 2 times, most recently from 45c9e25 to 76a6941 Compare September 19, 2024 03:25
@thw26
Copy link
Collaborator Author

thw26 commented Sep 19, 2024

There is some kind of error when running winetricks in the TUI that causes a winetricks command to be run twice:

2024-09-18 23:40:39 INFO: running "winetricks -q settings renderer=gdi"
2024-09-18 23:40:39 DEBUG: Getting wine environment.
2024-09-18 23:40:39 DEBUG: dynamic_path: /home/thwright/LogosBible10/data/bin/wine-devel_9.12-x86_64.AppImage
2024-09-18 23:40:39 DEBUG: wine_exe_path=PosixPath('/home/thwright/LogosBible10/data/bin/wine-devel_9.12-x86_64.AppImage')
2024-09-18 23:40:39 DEBUG: Wine env: {'WINE': '/home/thwright/LogosBible10/data/bin/wine64', 'WINEDEBUG': 'fixme-all,err-all', 'WINEDLLOVERRIDES': '', 'WINELOADER': '/home/thwright/LogosBible10/data/bin/wine64', 'WINEPREFIX': '/home/thwright/LogosBible10/data/wine64_bottle', 'WINESERVER': '/home/thwright/LogosBible10/data/bin/wineserver'}
2024-09-18 23:40:39 DEBUG: run_wine_proc: /usr/bin/winetricks; exe=None; exe_args=['-q', 'settings', 'renderer=gdi']
2024-09-18 23:40:39 DEBUG: subprocess cmd: '/usr/bin/winetricks -q settings renderer=gdi'
2024-09-18 23:40:44 DEBUG: ------------------------------------------------------
2024-09-18 23:40:44 DEBUG: warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
2024-09-18 23:40:44 DEBUG: ------------------------------------------------------
2024-09-18 23:40:44 DEBUG: warning: You apppear to be using Wine's new wow64 mode. Note that this is EXPERIMENTAL and not yet fully supported. If reporting an issue, be sure to mention this.
2024-09-18 23:40:44 DEBUG: ------------------------------------------------------
2024-09-18 23:40:44 DEBUG: Using winetricks 20240105 - sha256sum: 8f28985b06e9e04b5268e2aef3429b2a0f6abd4fd12c4a30472dfe66355128fa with wine-9.12 and WINEARCH=win64
2024-09-18 23:40:45 DEBUG: Executing w_do_call renderer=gdi
2024-09-18 23:40:49 DEBUG: ------------------------------------------------------
2024-09-18 23:40:49 DEBUG: warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
2024-09-18 23:40:49 DEBUG: ------------------------------------------------------
2024-09-18 23:40:49 DEBUG: warning: You apppear to be using Wine's new wow64 mode. Note that this is EXPERIMENTAL and not yet fully supported. If reporting an issue, be sure to mention this.
2024-09-18 23:40:49 DEBUG: ------------------------------------------------------
2024-09-18 23:40:49 DEBUG: Executing load_renderer gdi
2024-09-18 23:40:49 DEBUG: Setting Direct3D/renderer to gdi
2024-09-18 23:40:49 DEBUG: Executing /home/thwright/LogosBible10/data/bin/wine64 C:\windows\syswow64\regedit.exe /S C:\windows\Temp\set-wined3d.reg
2024-09-18 23:40:50 DEBUG: Executing /home/thwright/LogosBible10/data/bin/wine64 C:\windows\regedit.exe /S C:\windows\Temp\set-wined3d.reg
2024-09-18 23:40:50 INFO: "winetricks -q settings renderer=gdi" DONE!
2024-09-18 23:40:50 INFO: * Starting wait_process_using_dir for /home/thwright/LogosBible10/data/wine64_bottle…
2024-09-18 23:40:50 INFO: * End of wait_process_using_dir.
2024-09-18 23:40:50 DEBUG: dynamic_path: /home/thwright/LogosBible10/data/bin/wine-devel_9.12-x86_64.AppImage
2024-09-18 23:40:50 DEBUG: wine_exe_path=PosixPath('/home/thwright/LogosBible10/data/bin/wine-devel_9.12-x86_64.AppImage')
2024-09-18 23:40:50 DEBUG: Wine env: {'WINE': '/home/thwright/LogosBible10/data/bin/wine64', 'WINEDEBUG': 'fixme-all,err-all', 'WINEDLLOVERRIDES': '', 'WINELOADER': '/home/thwright/LogosBible10/data/bin/wine64', 'WINEPREFIX': '/home/thwright/LogosBible10/data/wine64_bottle', 'WINESERVER': '/home/thwright/LogosBible10/data/bin/wineserver'}
2024-09-18 23:40:53 INFO: "/home/thwright/LogosBible10/data/bin/wineserver -w" has ended properly.
2024-09-18 23:40:53 INFO: running "winetricks -q settings renderer=Return to Main Menu"
2024-09-18 23:40:53 DEBUG: Getting wine environment.
2024-09-18 23:40:53 DEBUG: dynamic_path: /home/thwright/LogosBible10/data/bin/wine-devel_9.12-x86_64.AppImage
2024-09-18 23:40:53 DEBUG: wine_exe_path=PosixPath('/home/thwright/LogosBible10/data/bin/wine-devel_9.12-x86_64.AppImage')
2024-09-18 23:40:53 DEBUG: Wine env: {'WINE': '/home/thwright/LogosBible10/data/bin/wine64', 'WINEDEBUG': 'fixme-all,err-all', 'WINEDLLOVERRIDES': '', 'WINELOADER': '/home/thwright/LogosBible10/data/bin/wine64', 'WINEPREFIX': '/home/thwright/LogosBible10/data/wine64_bottle', 'WINESERVER': '/home/thwright/LogosBible10/data/bin/wineserver'}
2024-09-18 23:40:53 DEBUG: run_wine_proc: /usr/bin/winetricks; exe=None; exe_args=['-q', 'settings', 'renderer=Return to Main Menu']
2024-09-18 23:40:53 DEBUG: subprocess cmd: '/usr/bin/winetricks -q settings renderer=Return to Main Menu'
2024-09-18 23:40:58 DEBUG: ------------------------------------------------------
2024-09-18 23:40:58 DEBUG: warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
2024-09-18 23:40:58 DEBUG: ------------------------------------------------------
2024-09-18 23:40:58 DEBUG: warning: You apppear to be using Wine's new wow64 mode. Note that this is EXPERIMENTAL and not yet fully supported. If reporting an issue, be sure to mention this.
2024-09-18 23:40:58 DEBUG: ------------------------------------------------------
2024-09-18 23:40:59 DEBUG: Using winetricks 20240105 - sha256sum: 8f28985b06e9e04b5268e2aef3429b2a0f6abd4fd12c4a30472dfe66355128fa with wine-9.12 and WINEARCH=win64
2024-09-18 23:41:00 DEBUG: Unknown arg renderer=Return to Main Menu
2024-09-18 23:41:00 DEBUG: Usage: /usr/bin/winetricks [options] [command|verb|path-to-verb] ...
2024-09-18 23:41:00 DEBUG: Executes given verbs.  Each verb installs an application or changes a setting.
2024-09-18 23:41:00 DEBUG: 
2024-09-18 23:41:00 DEBUG: Options:
2024-09-18 23:41:00 DEBUG:     --country=CC      Set country code to CC and don't detect your IP address
2024-09-18 23:41:00 DEBUG: -f, --force           Don't check whether packages were already installed
2024-09-18 23:41:00 DEBUG:     --gui             Show gui diagnostics even when driven by commandline
2024-09-18 23:41:00 DEBUG:     --gui=OPT         Set OPT to kdialog or zenity to override GUI engine
2024-09-18 23:41:00 DEBUG:     --isolate         Install each app or game in its own bottle (WINEPREFIX)
2024-09-18 23:41:00 DEBUG:     --self-update     Update this application to the last version
2024-09-18 23:41:00 DEBUG:     --update-rollback Rollback the last self update
2024-09-18 23:41:00 DEBUG: -k, --keep_isos       Cache isos (allows later installation without disc)
2024-09-18 23:41:00 DEBUG:     --no-clean        Don't delete temp directories (useful during debugging)
2024-09-18 23:41:00 DEBUG:     --optin           Opt in to reporting which verbs you use to the Winetricks maintainers
2024-09-18 23:41:00 DEBUG:     --optout          Opt out of reporting which verbs you use to the Winetricks maintainers
2024-09-18 23:41:00 DEBUG: -q, --unattended      Don't ask any questions, just install automatically
2024-09-18 23:41:00 DEBUG: -r, --ddrescue        Retry hard when caching scratched discs
2024-09-18 23:41:00 DEBUG: -t  --torify          Run downloads under torify, if available
2024-09-18 23:41:00 DEBUG:     --verify          Run (automated) GUI tests for verbs, if available
2024-09-18 23:41:00 DEBUG: -v, --verbose         Echo all commands as they are executed
2024-09-18 23:41:00 DEBUG: -h, --help            Display this message and exit
2024-09-18 23:41:00 DEBUG: -V, --version         Display version and exit
2024-09-18 23:41:00 DEBUG: 
2024-09-18 23:41:00 DEBUG: Commands:
2024-09-18 23:41:00 DEBUG: list                  list categories
2024-09-18 23:41:00 DEBUG: list-all              list all categories and their verbs
2024-09-18 23:41:00 DEBUG: apps list             list verbs in category 'applications'
2024-09-18 23:41:00 DEBUG: benchmarks list       list verbs in category 'benchmarks'
2024-09-18 23:41:00 DEBUG: dlls list             list verbs in category 'dlls'
2024-09-18 23:41:00 DEBUG: fonts list            list verbs in category 'fonts'
2024-09-18 23:41:00 DEBUG: settings list         list verbs in category 'settings'
2024-09-18 23:41:00 DEBUG: list-cached           list cached-and-ready-to-install verbs
2024-09-18 23:41:00 DEBUG: list-download         list verbs which download automatically
2024-09-18 23:41:00 DEBUG: list-manual-download  list verbs which download with some help from the user
2024-09-18 23:41:00 DEBUG: list-installed        list already-installed verbs
2024-09-18 23:41:00 DEBUG: arch=32|64            create wineprefix with 32 or 64 bit, this option must be
2024-09-18 23:41:00 DEBUG:                       given before prefix=foobar and will not work in case of
2024-09-18 23:41:00 DEBUG:                       the default wineprefix.
2024-09-18 23:41:00 DEBUG: prefix=foobar         select WINEPREFIX=/home/thwright/.local/share/wineprefixes/foobar
2024-09-18 23:41:00 DEBUG: annihilate            Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPREFIX
2024-09-18 23:41:00 ERROR: Error running '/usr/bin/winetricks -q settings renderer=Return to Main Menu': 1
2024-09-18 23:41:00 CRITICAL: "['/usr/bin/winetricks', '-q', 'settings', 'renderer=Return to Main Menu']" failed with exit code: 1

EDIT: This has to do with the tui_app.TUI.{winetricks_option}_select() and how they submit a choice_q.put entry.


EDIT: Resolved in next force push

@thw26 thw26 force-pushed the 143-partial-fix branch 2 times, most recently from e234b00 to 3a40a0e Compare September 19, 2024 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Switch to Install Logos Beta Winetricks Quick Action Buttons
1 participant