From 323a549eca11dd34a1f2b0359634ef41394ee32a Mon Sep 17 00:00:00 2001 From: blue Date: Thu, 10 Oct 2019 14:45:21 +0300 Subject: [PATCH] got rid of organization name, made building with system qxmpp by default --- CMakeLists.txt | 10 +++++----- external/qxmpp | 2 +- main.cpp | 8 ++++---- packaging/Archlinux/PKGBUILD | 14 +++++++------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab73444..28d32d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,15 +39,15 @@ qt5_add_resources(RCC resources/resources.qrc) add_executable(squawk ${squawk_SRC} ${RCC}) target_link_libraries(squawk Qt5::Widgets) -add_subdirectory(ui) -add_subdirectory(core) - -option(SYSTEM_QXMPP "Use system qxmpp lib" OFF) +option(SYSTEM_QXMPP "Use system qxmpp lib" ON) if(NOT SYSTEM_QXMPP) add_subdirectory(external/qxmpp) endif() +add_subdirectory(ui) +add_subdirectory(core) + target_link_libraries(squawk squawkUI) target_link_libraries(squawk squawkCORE) target_link_libraries(squawk uuid) @@ -56,7 +56,7 @@ add_dependencies(${CMAKE_PROJECT_NAME} translations) # Install the executable install(TARGETS squawk DESTINATION ${CMAKE_INSTALL_BINDIR}) -install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/Macaw/Squawk/l10n) +install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/squawk/l10n) install(FILES squawk.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps) install(FILES squawk48.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/48x48/apps RENAME squawk.png) install(FILES squawk64.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/64x64/apps RENAME squawk.png) diff --git a/external/qxmpp b/external/qxmpp index e6eb0b7..b18a57d 160000 --- a/external/qxmpp +++ b/external/qxmpp @@ -1 +1 @@ -Subproject commit e6eb0b78d0cb17fccd5ddb60966ba2a0a2d2b593 +Subproject commit b18a57daa33f0fefa5f4c63aa7f448b48d302e0d diff --git a/main.cpp b/main.cpp index dac0e91..6fcf6c9 100644 --- a/main.cpp +++ b/main.cpp @@ -36,10 +36,9 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); SignalCatcher sc(&app); - QCoreApplication::setOrganizationName("Macaw"); - QCoreApplication::setOrganizationDomain("macaw.me"); - QCoreApplication::setApplicationName("Squawk"); - QCoreApplication::setApplicationVersion("0.0.5"); + QApplication::setApplicationName("squawk"); + QApplication::setApplicationDisplayName("Squawk"); + QApplication::setApplicationVersion("0.0.5"); QTranslator qtTranslator; qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); @@ -49,6 +48,7 @@ int main(int argc, char *argv[]) QStringList shares = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation); bool found = false; for (QString share : shares) { + qDebug() << share; found = myappTranslator.load(QLocale(), QLatin1String("squawk"), ".", share + "/l10n"); if (found) { break; diff --git a/packaging/Archlinux/PKGBUILD b/packaging/Archlinux/PKGBUILD index 316b8e9..bd979b5 100644 --- a/packaging/Archlinux/PKGBUILD +++ b/packaging/Archlinux/PKGBUILD @@ -5,15 +5,15 @@ pkgrel=1 pkgdesc="An XMPP desktop messenger, written on qt" arch=('i686' 'x86_64') url="https://git.macaw.me/blue/squawk" -license=('GPLv3') -depends=('qt5-base' 'qt5-svg' 'lmdb' 'qxmpp>=1.0.0' 'libutil-linux') -makedepends=('cmake>=3.3' 'imagemagick') -source=("https://git.macaw.me/blue/squawk/archive/master.tar.gz") -md5sums=('SKIP') +license=('GPL3') +depends=('hicolor-icon-theme' 'desktop-file-utils' 'lmdb' 'qxmpp>=1.0.0') +makedepends=('cmake>=3.3' 'imagemagick' 'qt5-tools') +source=("$pkgname-$pkgver.tar.gz") +sha256sums=('12bfc517574387257a82143d8970ec0d8d434ccd32f7ac400355ed5fa18192ab') build() { cd "$srcdir/squawk" - cmake . -D SYSTEM_QXMPP:BOOL=True -D CMAKE_INSTALL_PREFIX=/usr -G Ninja - cmake --build . + cmake . -D CMAKE_INSTALL_PREFIX=/usr + cmake --build . -j $nproc } package() { cd "$srcdir/squawk"