Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,23 @@ target_link_libraries(librepods
target_include_directories(librepods PRIVATE ${PULSEAUDIO_INCLUDE_DIRS})

include(GNUInstallDirs)

# Install the binary
install(TARGETS librepods
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

# Install desktop entry
install(FILES assets/me.kavishdevar.librepods.desktop
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
)

# Install icon
install(FILES assets/librepods.png
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps")
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps"
)

# Translation support
qt_add_translations(librepods
Expand All @@ -99,4 +107,16 @@ qt_add_translations(librepods

# Install translation files
install(FILES ${QM_FILES}
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/librepods/translations")
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/librepods/translations"
)

# --------------------------------------------------------------
# Update icon and desktop caches after installation
# --------------------------------------------------------------
install(CODE "
message(STATUS \"Updating icon cache...\")
execute_process(COMMAND update-icon-caches ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor)

message(STATUS \"Updating desktop database...\")
execute_process(COMMAND update-desktop-database ${CMAKE_INSTALL_DATAROOTDIR}/applications)
")
14 changes: 12 additions & 2 deletions linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ A native Linux application to control your AirPods, with support for:

# For Debian
sudo apt-get install qt6-base-dev qt6-declarative-dev qt6-connectivity-dev qt6-multimedia-dev \
qml6-module-qtquick-controls qml6-module-qtqml-workerscript qml6-module-qtquick-templates \
qml6-module-qtquick-window qml6-module-qtquick-layouts
qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libxkbcommon-dev \
qml6-module-qtquick-controls qml6-module-qtqml-workerscript qml6-module-qtquick-templates \
qml6-module-qtquick-window qml6-module-qtquick-layouts build-essential cmake ninja-build


# For Fedora
sudo dnf install qt6-qtbase-devel qt6-qtconnectivity-devel \
Expand Down Expand Up @@ -84,6 +86,14 @@ A native Linux application to control your AirPods, with support for:
```bash
./librepods
```
3. (Optional) Install system-wide desktop entry + icon
```bash
sudo make install
```
After this, you can launch LibrePods from your desktop menu or run:
```bash
librepods
```

## Troubleshooting

Expand Down