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

Decouple Script from Zenity #104

Closed
1 of 7 tasks
thw26 opened this issue Nov 30, 2022 · 0 comments · Fixed by #163
Closed
1 of 7 tasks

Decouple Script from Zenity #104

thw26 opened this issue Nov 30, 2022 · 0 comments · Fixed by #163
Assignees
Labels
enhancement New feature or request

Comments

@thw26
Copy link
Collaborator

thw26 commented Nov 30, 2022

Or make CLI something like a first class citizen. The ground work is now laid for this in #98.

The script should possibly be smart enough to check for Zenity independently, and, if not found, continue the install without erroring and requiring Zenity to be installed.

This should implement an abstraction for dialog and whiptail for OS portability. Will require determining which one the user has installed, if neither, then check for zenity, and it not, report an error to the user. Programming at least one of these and implementing the latter at another time would be acceptable for the purpose of this issue.

This will also require determining if the script is launched from the CLI or not. If it is not from the CLI, the script should check for zenity and error if zenity is not installed.

We should also consider further abstraction for pure bash for the sake of #149.

  • Abstract script messages (Error messages #151, Add logos_info() and logos_warn() #152)
  • Abstract gtk_question, gtk_continue_question
  • Abstract zenity --progress
  • Abstract radiolist, used in, e.g., chooseProduct
  • Abstract gtk_download
  • Move all message communication to abstract classes (i.e., all echo/printf messages to the CLI should be edited to use logos_info or cli_msg (e.g., here).)
  • Create a CLI alternative for gtk_question, gtk_continue_question, zenity's radiolist, gtk_download

This will also likely require that the script only executes one of these at a time, otherwise the script would have to monitor both functions. As the easiest solution, the abstract functions should likely receive a required variable to indicate which communication method to use with the user. e.g., logos_error(DIALOG) {…}. cf. winetrick's implementation of auto-detecting GTK or QT.

@thw26 thw26 added the enhancement New feature or request label Nov 30, 2022
@thw26 thw26 added this to the Make Zenity Optional milestone Nov 30, 2022
@thw26 thw26 mentioned this issue Dec 27, 2022
5 tasks
@thw26 thw26 self-assigned this Jan 20, 2023
@thw26 thw26 mentioned this issue Jan 25, 2023
@thw26 thw26 mentioned this issue Mar 2, 2023
thw26 added a commit that referenced this issue Mar 2, 2023
Streamlines error messages in the script for both Zenity and CLI, and makes it easier for #104 and #136.
thw26 pushed a commit to thw26/LogosLinuxInstaller that referenced this issue Mar 9, 2023
@thw26 thw26 changed the title Optionally Remove Zenity Dependency Decouple Script from Zenity Mar 9, 2023
thw26 pushed a commit to thw26/LogosLinuxInstaller that referenced this issue Mar 9, 2023
thw26 added a commit that referenced this issue Mar 20, 2023
Decouple script from Zenity. Fix #104.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant