From 515404a22000244bb111b2ab7e477f1b16914442 Mon Sep 17 00:00:00 2001 From: rattatwinko Date: Wed, 1 Jul 2026 21:45:03 +0200 Subject: [PATCH] fix: the reencode dialog codec help text being weirdly coloured on different platforms refactor: build.sh --- build.sh | 40 ++++++++++++++++++++++++++++++++------ src/gui/ReencodeDialog.cpp | 7 ++----- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/build.sh b/build.sh index 8db33d8..f1c7b3c 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,11 @@ #!/usr/bin/env bash set -e +RED="\e[1;31m" +GREEN="\e[1;32m" +BLUE="\e[1;34m" +RESET="\e[0m" + clean() { echo "cleaning build dir" rm -rf build @@ -14,12 +19,30 @@ incremental_build() { } clean_build() { + local starttime endtime elapsed + + starttime=$(date +%s) + clean - mkdir build - cd build - echo "doing a clean build" - cmake .. - make -j"$(nproc)" + + mkdir -p build + cd build || return 1 + + printf "${BLUE}==> Doing a clean build...${RESET}\n" + + cmake .. || { + printf "${RED}CMake configuration failed.${RESET}\n" + return 1 + } + + if make -j"$(nproc)"; then + endtime=$(date +%s) + elapsed=$((endtime - starttime)) + printf "${GREEN}Build completed in %d seconds.${RESET}\n" "$elapsed" + else + printf "${RED}Build failed.${RESET}\n" + return 1 + fi } release_build() { @@ -67,7 +90,12 @@ case "${1:-build}" in clean_appimage ;; cbr|clean_build_run) - clean_build && run_executable + clean_build || exit 1 + # build leaves us in build dir, so change back 1 so we can run the exec + cd .. + printf "${BLUE} Running Executable ; All logs below are from SubWave ${RESET}" + run_executable || exit 1 + printf "${BLUE} Completed running the executable ; DONE ${RESET}\n" ;; *) echo "Usage: $0 {build|clean|cleanbuild|cb}" diff --git a/src/gui/ReencodeDialog.cpp b/src/gui/ReencodeDialog.cpp index acbc0ab..6e89f88 100644 --- a/src/gui/ReencodeDialog.cpp +++ b/src/gui/ReencodeDialog.cpp @@ -57,13 +57,10 @@ void ReencodeDialog::buildUi() m_presetCombo = new QComboBox(this); - // Create the description label BEFORE connecting signals and adding items m_presetDesc = new QLabel(this); m_presetDesc->setWordWrap(true); - m_presetDesc->setStyleSheet("color: palette(mid);"); settingsGrid->addWidget(m_presetDesc, 1, 1, 1, 2); - // Now connect the signal and add items (signal may fire during addItem) connect(m_presetCombo, QOverload::of(&QComboBox::currentIndexChanged), this, &ReencodeDialog::onPresetChanged); for (const auto &p : m_presets) @@ -94,7 +91,7 @@ void ReencodeDialog::buildUi() m_table->setAlternatingRowColors(true); root->addWidget(m_table, 1); - // Progress row + // progress row auto *progressLayout = new QHBoxLayout; m_statusLabel = new QLabel("Ready", this); m_statusLabel->setMinimumWidth(120); @@ -106,7 +103,7 @@ void ReencodeDialog::buildUi() progressLayout->addWidget(m_overallBar, 1); root->addLayout(progressLayout); - // Button row + // button row auto *btnLayout = new QHBoxLayout; btnLayout->addStretch(); m_startStopBtn = new QPushButton("Start Encoding", this);