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

Simple GUI #6

Draft
wants to merge 81 commits into
base: develop
Choose a base branch
from
Draft

Simple GUI #6

wants to merge 81 commits into from

Conversation

ktwrd
Copy link
Owner

@ktwrd ktwrd commented Jun 7, 2024

Implement a simple wizard GUI so this doesn't scare off people who don't understand that command-line != virus.

fltk-rs will be used since I already have some knowledge about it with one of my projects rustgrab, and it's fairly simple to understand. The only downside is that everything has to run on one thread, so multi-threading might be a little bit difficult.

  • Download Progress (src/gui/download_ui.fl)
    • vcredist installer
    • Full game .tar.zstd
  • Implementation of Wizard as GUI
    • Install Confirmation (w/ size calculations)
    • Update Confirmation (w/ size calculations)
    • Butler Patching/Verify Progress
    • Generic Dialogs
      • Single Label w/ OK button.
      • Confirm Action
        • Install
        • Update
    • Action-Specific Error Dialogs
      • Install: Not Enough Free Space
      • Update: No Patch Available
      • Update: Not enough free space
      • Verify: Missing signature URL
      • Verify: Missing heal URL
  • Directory Picker when sourcemods not found.

All handling for gui-related things belong in the gui module, which can be found in ./src/gui/mod.rs.

@ktwrd ktwrd added the enhancement New feature or request label Jun 7, 2024
@ktwrd ktwrd self-assigned this Jun 7, 2024
@ktwrd
Copy link
Owner Author

ktwrd commented Jun 7, 2024

Due to how the GUI is implemented for src/download.rs, the download will pause when the window is moved around because app::wait_for is a blocking function in the progress_wake parameter that is passed through in the with_progress_gui function.

Could be resolved if the GUI is initialized on a thread then in the init function (inside of said thread) we can do the usual while app.wait() loop that is used in rustgrab. But when the progress is updated with the progress parameter, we would have to execute that code on the thread that the UI lives on.

@ktwrd ktwrd added this to the v1.5.0 milestone Jun 7, 2024
@ktwrd
Copy link
Owner Author

ktwrd commented Jun 9, 2024

been working on the update workflow in the GUI. finished making the confirmation dialog and make it work with the rest of the actual code. also includes a handful of refactoring for some of the ui handling (to remove duplicate definitions)

screennshot of the update confirmation window

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 this pull request may close these issues.

1 participant