diff --git a/app/qbreak.pro b/app/qbreak.pro index 24d8ef5..1c70b75 100644 --- a/app/qbreak.pro +++ b/app/qbreak.pro @@ -1,5 +1,7 @@ QT += core gui svg multimedia +CONFIG += debug_and_release + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets dbus CONFIG += c++17 lrelease embed_translations diff --git a/scripts/build_linux_debug.sh b/scripts/build_linux_debug.sh new file mode 100755 index 0000000..4951b6c --- /dev/null +++ b/scripts/build_linux_debug.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# I use this script on two different hosts so there are logic to find proper Qt installation + +export QT_HOME=/home/$USER/qt5.15/5.15.2/gcc_64 +if [ ! -d "$QT_HOME" ] ; then + export QT_HOME=/home/$USER/qt5.15/5.15.2/gcc_64 +fi + +# Build .appimage +/usr/bin/python3 build_qbreak.py debug + diff --git a/scripts/build_qbreak.py b/scripts/build_qbreak.py index f890e05..b4e90ae 100755 --- a/scripts/build_qbreak.py +++ b/scripts/build_qbreak.py @@ -5,6 +5,7 @@ import platform import os import shutil import glob +import sys from pathlib import Path import multiprocessing import build_utils @@ -48,8 +49,13 @@ if platform.system() == 'Linux': print(f'qmake call failed with code {retcode}') exit(retcode) + # Check the requested type of build - debug or release + build_type = 'release' + if len(sys.argv) == 2: + build_type = sys.argv[1] + print('Build...') - retcode = os.system('make -j4') + retcode = os.system(f'make {build_type} -j4') if retcode != 0: print(f'make call failed with code {retcode}') exit(retcode)