Add desktop entry file for Linux app launchers

Refs <https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html>

PR #3351 <https://github.com/Genymobile/scrcpy/pull/3351>
Replaces PR #296 <https://github.com/Genymobile/scrcpy/pull/296>
Fixes #295 <https://github.com/Genymobile/scrcpy/issues/295>
Fixes #748 <https://github.com/Genymobile/scrcpy/issues/748>
Fixes #1636 <https://github.com/Genymobile/scrcpy/issues/1636>

Co-authored-by: Addison Snelling <addison@asnell.io>
Co-authored-by: Chih-Hsuan Yen <yan12125@gmail.com>
Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
Addison Snelling 2018-10-14 03:50:35 -05:00 committed by Chih-Hsuan Yen
parent 9f217c535b
commit 6eb8dcbd22
No known key found for this signature in database
GPG key ID: F98EF2A7B0A098AE
2 changed files with 17 additions and 0 deletions

10
app/data/scrcpy.desktop Normal file
View file

@ -0,0 +1,10 @@
[Desktop Entry]
Name=scrcpy
GenericName=Android Remote Control
Comment=Display and control your Android device
Exec=scrcpy
Icon=scrcpy
Terminal=false
Type=Application
Categories=Utility;RemoteAccess;
StartupNotify=false

View file

@ -235,6 +235,13 @@ install_data('data/zsh-completion/_scrcpy',
install_data('data/bash-completion/scrcpy',
install_dir: join_paths(datadir, 'bash-completion/completions'))
# Desktop entry file for application launchers
if host_machine.system() == 'linux'
# Install a launcher (ex: /usr/local/share/applications/scrcpy.desktop)
install_data('data/scrcpy.desktop',
install_dir: join_paths(datadir, 'applications'))
endif
### TESTS