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

+15 -2
View File
@@ -26,6 +26,9 @@ extern char **environ;
extern char* gOverrideLibcheckra1nHelper;
#include <palerain.h>
#ifdef TUI
#include <tui.h>
#endif
#include <xxd-embedded.h>
char* pongo_path = NULL;
bool external_pongo = false;
@@ -156,8 +159,17 @@ checkra1n_exec: {};
LOG(LOG_VERBOSE5, args);
if (pongo_path != NULL) LOG(LOG_VERBOSE5, pongo_path);
pid_t pid;
posix_spawn_file_actions_t action;
posix_spawn_file_actions_init(&action);
#ifdef TUI
if (tui_is_jailbreaking) {
// silence checkra1n
posix_spawn_file_actions_addopen(&action, 1, "/dev/null", O_WRONLY, 0);
posix_spawn_file_actions_addopen(&action, 2, "/dev/null", O_WRONLY, 0);
}
#endif
if (pongo_path != NULL) {
ret = posix_spawn(&pid, checkra1n_path, NULL, NULL, (char* []){
ret = posix_spawn(&pid, checkra1n_path, &action, NULL, (char* []){
checkra1n_path,
args,
"-k",
@@ -165,12 +177,13 @@ checkra1n_exec: {};
NULL
}, environ);
} else {
ret = posix_spawn(&pid, checkra1n_path, NULL, NULL, (char* []){
ret = posix_spawn(&pid, checkra1n_path, &action, NULL, (char* []){
checkra1n_path,
args,
NULL
}, environ);
}
posix_spawn_file_actions_destroy(&action);
if (ret) {
LOG(LOG_FATAL, "Cannot posix spawn %s: %d (%s)", checkra1n_path, errno, strerror(errno));
if (ext_checkra1n != NULL) unlink(checkra1n_path);