-
Notifications
You must be signed in to change notification settings - Fork 275
improve startmenu.rb #469
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
base: master
Are you sure you want to change the base?
improve startmenu.rb #469
Conversation
YO4
commented
Jan 6, 2026
- Add RubyInstaller2 logo and help command guidance to irb start screen.
- Make console reading more robust.
- Improve console window size calculation
irb with the RubyInstaller2 logo and help command guidance. also clear the screen when it seems appropriate.
When selecting while a large amount of console input is arriving at high rate, the console read thread may continue reading. For example, hold down the cursor keys to move the mouse cursor and click while doing so. To address this, only perform console input when necessary.
reserve lines for the headline. handle cases when the console is too small.
|
Hey this is great, thank you for working on this. The startmenu.rb is my ad-hoc solution for shrinking the number of icons to only one, in order to meet the Microsoft store requirements. It shall run without external dependencies. |
bin/startmenu.cmd
Outdated
| @echo off | ||
|
|
||
| set dir=%~dp0 | ||
| ruby -r "%dir:\=/%../lib/ruby_installer/runtime/console_ui" "%dir:\=/%../resources/files/startmenu.rb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ruby -I "%dir:\=/%../lib" "%dir:\=/%../resources/files/startmenu.rb"
is enough to run the startmenu in the project tree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was only concerned about console_ui, but your suggestion looks smarter.
ruby_installer/runtime/colors.rb is loaded from outside the repository, so a note will be added.
| if @base_console_input_mode | ||
| IO.console.write "." | ||
| setconsolemode(@base_console_input_mode | ENABLE_EXTENDED_FLAGS) | ||
| IO.console.write "+" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this debug code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm embarrassed.
Would it be okay if I stash it away in the end?
Added a note regarding other files that are loaded.
It seems the mouse can't be used when using conhost (not Windows Terminal). Running `start ruby startmenu.rb` from within the terminal causes identification to fail, but worrying about that is probably pointless.
|
In fact, on my end, the screen clearing output is being ignored in ButtonMatrix#repaint. The cause has not been identified. Even so, I believe this has improved accessibility for users at this point. |