fix: the reencode dialog codec help text being weirdly coloured on different platforms
refactor: build.sh
This commit is contained in:
@@ -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}"
|
||||
|
||||
@@ -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<int>::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);
|
||||
|
||||
Reference in New Issue
Block a user