- one-liner builds

This commit is contained in:
Dmytro Bogovych 2022-05-29 14:19:56 +03:00
parent 1f2c4ca0d2
commit 5f42406c04
7 changed files with 26 additions and 24 deletions

View File

@ -1,3 +1,4 @@
#include "config.h"
#include "mainwindow.h" #include "mainwindow.h"
#include <QApplication> #include <QApplication>
#include <QLayout> #include <QLayout>
@ -12,14 +13,14 @@ int main(int argc, char *argv[])
helper::theme::applyCurrent(Settings::instance()); helper::theme::applyCurrent(Settings::instance());
QFont f = app.font(); QFont f = app.font();
f.setFamily("Monaco"); // f.setFamily("Monaco");
f.setPointSize(16); f.setPointSize(14);
app.setFont(f); app.setFont(f);
app.setApplicationName(APPNAME);
// Path to database. // Path to database.
QString path = Settings::instance().getDatabasePath(); QString path = Settings::instance().getDatabasePath();
QString folder = QFileInfo(path).absoluteDir().path(); QString folder = QFileInfo(path).absoluteDir().path();
Storage::instance().setPath(path); Storage::instance().setPath(path);

View File

@ -7,7 +7,7 @@
QT += core gui widgets printsupport QT += core gui widgets printsupport
CONFIG += c++17 CONFIG += c++17
TARGET = Noo TARGET = noo
TEMPLATE = app TEMPLATE = app
# Send version to app # Send version to app
@ -39,15 +39,15 @@ macx {
unix { unix {
DEFINES += TARGET_LINUX DEFINES += TARGET_LINUX
ICON = icons/app/noo_128x128.png ICON = icons/app/noo_128x128.png
LIBS += -ldl -luuid ../lib/openssl/linux_x64/libssl.a ../lib/openssl/linux_x64/libcrypto.a LIBS += -ldl -luuid $$PWD/../lib/openssl/linux_x64/libssl.a $$PWD/../lib/openssl/linux_x64/libcrypto.a
INCLUDEPATH += ../lib/openssl/include INCLUDEPATH += $$PWD/../lib/openssl/include
} }
DEFINES += USE_ENCRYPTED_DB DEFINES += USE_ENCRYPTED_DB
DEFINES += SQLITE_HAS_CODEC SQLITE_TEMP_STORE=2 SQLITE_THREADSAFE DEFINES += SQLITE_HAS_CODEC SQLITE_TEMP_STORE=2 SQLITE_THREADSAFE
INCLUDEPATH += sqlitecpp/include INCLUDEPATH += $$PWD/sqlitecpp/include
INCLUDEPATH += ../lib/include INCLUDEPATH += $$PWD/../lib/include
SOURCES += main.cpp \ SOURCES += main.cpp \

View File

@ -43,24 +43,25 @@ if platform.system() == 'Linux':
print('Configure...') print('Configure...')
qt_home = Path(os.environ['QT_HOME']).resolve() qt_home = Path(os.environ['QT_HOME']).resolve()
cmake_params = { # cmake_params = {
'Qt5Core_DIR': qt_home / 'lib/cmake/Qt5Core', # 'Qt5Core_DIR': qt_home / 'lib/cmake/Qt5Core',
'Qt5Widgets_DIR': qt_home / 'lib/cmake/Qt5Widgets', # 'Qt5Widgets_DIR': qt_home / 'lib/cmake/Qt5Widgets',
'Qt5DBus_DIR': qt_home / 'lib/cmake/Qt5DBus', # 'Qt5DBus_DIR': qt_home / 'lib/cmake/Qt5DBus',
'Qt5Gui_DIR': qt_home / 'lib/cmake/Qt5Gui', # 'Qt5Gui_DIR': qt_home / 'lib/cmake/Qt5Gui',
'Qt5LinguistTools_DIR': qt_home / 'lib/cmake/Qt5LinguistTools', # 'Qt5LinguistTools_DIR': qt_home / 'lib/cmake/Qt5LinguistTools',
'Qt5PrintSupport_DIR': qt_home / 'lib/cmake/Qt5PrintSupport', # 'Qt5PrintSupport_DIR': qt_home / 'lib/cmake/Qt5PrintSupport',
'Qt5OpenGL_DIR': qt_home / 'lib/cmake/Qt5OpenGL', # 'Qt5OpenGL_DIR': qt_home / 'lib/cmake/Qt5OpenGL',
'Qt5Network_DIR': qt_home / 'lib/cmake/Qt5Network' # 'Qt5Network_DIR': qt_home / 'lib/cmake/Qt5Network'
} # }
cmake_cmd = 'cmake ' # cmake_cmd = 'cmake '
for k,v in cmake_params.items(): # for k,v in cmake_params.items():
cmake_cmd = f'{cmake_cmd} -D{k}={v} ' # cmake_cmd = f'{cmake_cmd} -D{k}={v} '
cmake_cmd = f'{cmake_cmd} ../../client' # cmake_cmd = f'{cmake_cmd} ../../client'
print(f'cmake command line: {cmake_cmd}') # print(f'cmake command line: {cmake_cmd}')
retcode = os.system(f'{cmake_cmd} ../../client') # retcode = os.system(f'{cmake_cmd} ../../client')
retcode = os.system(f'{qt_home}/bin/qmake ../../client')
if retcode != 0: if retcode != 0:
print(f'cmake call failed with code {retcode}') print(f'cmake call failed with code {retcode}')
exit(retcode) exit(retcode)