diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0cb4876 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +build/ +*.user +*.autosave +*.qmlc +*.jsc +CMakeLists.txt.user +cmake-build-*/ +.idea/ +.vscode/ +.cache/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 820216e..c7a1cea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,8 @@ if(WITH_HTTP_SERVER) find_package(Qt6 6.8 COMPONENTS HttpServer) endif() +include(GNUInstallDirs) + add_subdirectory(src/core) add_subdirectory(src/app) @@ -30,3 +32,31 @@ if(BUILD_TESTS) find_package(Qt6 REQUIRED COMPONENTS Test) add_subdirectory(tests) endif() + +install(DIRECTORY data/icons/ + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor +) + +install(FILES data/org.localsend.localsend-qt.desktop + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications +) + +set(CPACK_PACKAGE_NAME "localsend-qt") +set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Share files between devices on the local network") +set(CPACK_PACKAGE_DESCRIPTION "LocalSend Qt is a native Qt6 client for the LocalSend protocol, \ +allowing fast and secure file sharing between devices on the same local network.") +set(CPACK_PACKAGE_HOMEPAGE_URL "https://localsend.org") +set(CPACK_PACKAGE_CONTACT "LocalSend Qt Developers") +set(CPACK_PACKAGE_LICENSE "MIT") +set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${PROJECT_VERSION}_${CMAKE_SYSTEM_PROCESSOR}") + +set(CPACK_GENERATOR "DEB") +set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt6core6 (>= 6.8), libqt6network6 (>= 6.8), libqt6quick6 (>= 6.8), libqt6quickcontrols2-6 (>= 6.8), libqt6httpserver6 (>= 6.8), libc6") +set(CPACK_DEBIAN_PACKAGE_SECTION "net") +set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) +set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}") +set(CPACK_DEBIAN_COMPRESSION_TYPE "zstd") + +include(CPack) diff --git a/data/icons/128x128/apps/localsend-qt.png b/data/icons/128x128/apps/localsend-qt.png new file mode 100644 index 0000000..9affd87 Binary files /dev/null and b/data/icons/128x128/apps/localsend-qt.png differ diff --git a/data/icons/256x256/apps/localsend-qt.png b/data/icons/256x256/apps/localsend-qt.png new file mode 100644 index 0000000..b97748d Binary files /dev/null and b/data/icons/256x256/apps/localsend-qt.png differ diff --git a/data/icons/512x512/apps/localsend-qt.png b/data/icons/512x512/apps/localsend-qt.png new file mode 100644 index 0000000..3e20f21 Binary files /dev/null and b/data/icons/512x512/apps/localsend-qt.png differ diff --git a/data/org.localsend.localsend-qt.desktop b/data/org.localsend.localsend-qt.desktop new file mode 100644 index 0000000..f3f4597 --- /dev/null +++ b/data/org.localsend.localsend-qt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Application +Name=LocalSend Qt +GenericName=File Transfer +Comment=Share files between devices on the local network +Exec=localsend-qt +Icon=localsend-qt +Terminal=false +Categories=Network;FileTransfer;Qt; +Keywords=transfer;share;files;local;network; +StartupNotify=true +StartupWMClass=LocalSend diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index c192125..c6c6e54 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -4,6 +4,10 @@ qt_add_executable(LocalSendQt AppController.cpp ) +set_target_properties(LocalSendQt PROPERTIES + OUTPUT_NAME localsend-qt +) + qt_add_qml_module(LocalSendQt URI LocalSend VERSION 1.0 @@ -18,6 +22,7 @@ target_link_libraries(LocalSendQt PRIVATE ) install(TARGETS LocalSendQt + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 9672488..c18a75d 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -53,3 +53,13 @@ set_target_properties(LocalSendCore PROPERTIES SOVERSION 1 OUTPUT_NAME localsend-core ) + +install(TARGETS LocalSendCore + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +) + +if(INSTALL_DEVEL_HEADERS) + install(DIRECTORY include/LocalSendCore + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) +endif()