Skip to content

Commit

Permalink
Added linux deploy for cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Jan 28, 2025
1 parent 9b4503b commit e9afb29
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ vscp-works-qt.sln
vscp-works-qt.vcxproj
vscp-works-qt.vcxproj.filters
DistributionKit/
deploy-qt-.cmake
deploy-qt-linux.cmake
deploy-qt-windows.cmake
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ You need expat, mosquitto, openssl and libcurl to build this project
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=~/Qt/6.8.1/gcc_64 ..
make
```

where **CMAKE_PREFIX_PATH** should point to the Qt version you installed previously
Expand Down
6 changes: 6 additions & 0 deletions deploy-qt-linux.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set(LINUXDEPLOYQT "@LINUXDEPLOYQT@")
set(COMPONENT_NAME_MAIN "@COMPONENT_NAME_MAIN@")
set(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@")


execute_process(COMMAND ${LINUXDEPLOYQT} --qmldir ${CMAKE_CURRENT_SOURCE_DIR} ${COMPONENT_NAME_MAIN}/data/bin WORKING_DIRECTORY ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages)
2 changes: 1 addition & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ MainWindow::checkRemoteEventDbVersion()
QString path = pworks->m_shareFolder;
path += "vscp_events.sqlite3";

// If there is a newer version we should download it
// If there is a newer version or it does not exist we should download it
if (!QFile::exists(path) ||
(pworks->m_lastEventDbServerDateTime.toSecsSinceEpoch() >
pworks->m_lastEventDbLoadDateTime.toSecsSinceEpoch())) {
Expand Down
4 changes: 2 additions & 2 deletions src/vscpworks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ vscpworks::loadSettings(void)

fprintf(stderr, "Loading application data\n");

// If the database don't exist, bail out
// If the config file does't exist, bail out after writing defaults
if (!QFile::exists(m_configFile)) {
writeSettings();
if (!QFile::exists(m_configFile)) {
Expand Down Expand Up @@ -747,7 +747,7 @@ vscpworks::loadEventDb(void)
QString dbpath = m_shareFolder;
dbpath += "vscp_events.sqlite3";

// If the database don't exist, bail out
// If the database does not exist, bail out
if (!QFile::exists(dbpath)) {
QString err = QString(tr("The VSCP event database does not exist. Is it available? [%s]")).arg(dbpath);
fprintf(stderr, "%s", err.toStdString().c_str());
Expand Down

0 comments on commit e9afb29

Please sign in to comment.