diff --git a/app/data/scrcpy-console.desktop b/app/data/scrcpy-console.desktop new file mode 100644 index 0000000000..47a63ec99e --- /dev/null +++ b/app/data/scrcpy-console.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name=scrcpy (console) +GenericName=Android Remote Control +Comment=Display and control your Android device +# For some users, the PATH or ADB environment variables are set from the shell +# startup file, like .bashrc or .zshrc… Run an interactive shell to get +# environment correctly initialized. +Exec=/bin/bash --norc --noprofile -i -c '"$SHELL" -i -c scrcpy || read -p "Press any key to quit..."' +Icon=scrcpy +Terminal=true +Type=Application +Categories=Utility;RemoteAccess; +StartupNotify=false diff --git a/app/data/scrcpy.desktop b/app/data/scrcpy.desktop new file mode 100644 index 0000000000..082b75e0f0 --- /dev/null +++ b/app/data/scrcpy.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name=scrcpy +GenericName=Android Remote Control +Comment=Display and control your Android device +# For some users, the PATH or ADB environment variables are set from the shell +# startup file, like .bashrc or .zshrc… Run an interactive shell to get +# environment correctly initialized. +Exec=/bin/sh -c '"$SHELL" -i -c scrcpy' +Icon=scrcpy +Terminal=false +Type=Application +Categories=Utility;RemoteAccess; +StartupNotify=false diff --git a/app/meson.build b/app/meson.build index f5d76c61dd..a7ba4009e4 100644 --- a/app/meson.build +++ b/app/meson.build @@ -223,14 +223,26 @@ executable('scrcpy', src, install: true, c_args: []) +# +datadir = get_option('datadir') # by default 'share' + install_man('scrcpy.1') install_data('data/icon.png', rename: 'scrcpy.png', - install_dir: 'share/icons/hicolor/256x256/apps') + install_dir: join_paths(datadir, 'icons/hicolor/256x256/apps')) install_data('data/zsh-completion/_scrcpy', - install_dir: 'share/zsh/site-functions') + install_dir: join_paths(datadir, 'zsh/site-functions')) install_data('data/bash-completion/scrcpy', - install_dir: 'share/bash-completion/completions') + 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')) + install_data('data/scrcpy-console.desktop', + install_dir: join_paths(datadir, 'applications')) +endif ### TESTS