merge tui! (#409)

* Merge main into tui (#406)

* plooshInit support

* Add override libcheckra1nhelper option

* update credits.c

* Update build.yml

---------

Co-authored-by: Nick Chan <[email protected]>
Co-authored-by: meow <[email protected]>

* Add TUI

* ISO C forbids an empty translation unit

* Default to TUI

* thanks iPadOS

* I forgot

* make random quotes more related (#408)

Definitely a good concept of the TUI (and one that I am a fan of), but (as has been somewhat brought up by others) we should probably make them more related to checkm8, checkra1n, or palera1n (since those are the types of things that this tool is based off of)

* "Connect your iPhone, iPad, iPod Touch, or Apple TV"

* Add Linux TTY support

* DIsable TUI for certain options

* Fix boot-args overflow

* auto reposition cursor

* Moved droplet, no one could behave

* Move the droplet back because it actually made it worse

---------

Co-authored-by: Nick Chan <[email protected]>
Co-authored-by: meow <[email protected]>
Co-authored-by: Michael <[email protected]>
Co-authored-by: Samara <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-03-27 22:50:45 -07:00
1 parent 5dd2980e96
commit e332a00cf9
19 files changed
+2314 -182

No files matched your search

+14 -4
View File
@@ -90,7 +90,17 @@ void log_cb(libusb_context *ctx, enum libusb_log_level level, const char *str) {
}
#endif
int palera1n(int argc, char *argv[]) {
// save argc, argv, and envp for restarting
int saved_argc;
char** saved_argv;
char** saved_envp;
int palera1n(int argc, char *argv[], char *envp[]) {
saved_argc = argc;
saved_argv = argv;
saved_envp = envp;
print_credits();
int ret = 0;
pthread_mutex_init(&log_mutex, NULL);
@@ -101,7 +111,7 @@ int palera1n(int argc, char *argv[]) {
if ((ret = optparse(argc, argv))) goto cleanup;
if (!(palerain_flags & palerain_option_device_info) && (palerain_flags & palerain_option_palerain_version)) goto normal_exit;
#ifdef TUI
if ((palerain_flags & palerain_option_tui)) {
if ((palerain_flags & palerain_option_tui) || (isatty(STDIN_FILENO) && isatty(STDOUT_FILENO) && !(palerain_flags & palerain_option_cli))) {
ret = tui();
if (ret) goto cleanup;
else goto normal_exit;
@@ -173,6 +183,6 @@ cleanup:
}
int main (int argc, char* argv[]) {
return palera1n(argc, argv);
int main (int argc, char* argv[], char* envp[]) {
return palera1n(argc, argv, envp);
}