Don't Require MCPI_DEBUG For Command Errors
Some checks failed
minecraft-pi-reborn/pipeline/head There was a failure building this commit

This commit is contained in:
TheBrokenRail 2022-05-15 00:53:46 -04:00
parent b3a96dc3e2
commit cb4560a602
5 changed files with 13 additions and 15 deletions

@ -1 +1 @@
Subproject commit 633e00f277ff6996e2c6d5b746f7a372e7a4b4a2
Subproject commit d673e9aab842d7151d92eb9164872dc05e748db2

View File

@ -151,10 +151,18 @@ static void exit_handler(__attribute__((unused)) int signal_id) {
// Pre-Bootstrap
void pre_bootstrap() {
// GTK Dark Mode
#ifndef MCPI_HEADLESS_MODE
#ifndef MCPI_SERVER_MODE
set_and_print_env("GTK_THEME", "Adwaita:dark");
#endif
// Debug Zenity
{
const char *is_debug = getenv("MCPI_DEBUG");
if (is_debug != NULL && strlen(is_debug) > 0) {
set_and_print_env("ZENITY_DEBUG", "1");
}
}
// AppImage
#ifdef MCPI_IS_APPIMAGE_BUILD
{

View File

@ -77,14 +77,6 @@ char *run_command(const char *const command[], int *return_code) {
close(output_pipe[0]);
close(output_pipe[1]);
// Close stderr (But Not In Debug Mode)
const char *is_debug = getenv("MCPI_DEBUG");
if (is_debug == NULL || strlen(is_debug) < 1) {
int null_fd = open("/dev/null", O_WRONLY);
dup2(null_fd, STDERR_FILENO);
close(null_fd);
}
// Run
safe_execvpe(command, (const char *const *) environ);
} else {

View File

@ -1,10 +1,5 @@
project(mods)
## Setup
# Disable C++11 String ABI
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
## Mods
add_library(compat SHARED src/compat/compat.c src/compat/egl.c src/compat/x11.c src/compat/bcm_host.c)

View File

@ -2,3 +2,6 @@ project(symbols)
add_library(symbols INTERFACE)
target_include_directories(symbols INTERFACE include)
# Disable C++11 String ABI
target_compile_definitions(symbols INTERFACE -D_GLIBCXX_USE_CXX11_ABI=0)