diff --git a/UI/CMakeLists.txt b/UI/CMakeLists.txt index b64b2bf29..502d07c29 100644 --- a/UI/CMakeLists.txt +++ b/UI/CMakeLists.txt @@ -378,9 +378,7 @@ install_obs_data(obs data obs-studio) install_obs_data_file(obs ../AUTHORS obs-studio/authors) if (UNIX AND UNIX_STRUCTURE AND NOT APPLE) - install(FILES dist/obs.desktop DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/applications) - install(FILES forms/images/obs.png - DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/icons/hicolor/256x256/apps) + add_subdirectory(xdg-data) endif() add_subdirectory(frontend-plugins) diff --git a/UI/xdg-data/CMakeLists.txt b/UI/xdg-data/CMakeLists.txt new file mode 100644 index 000000000..9acd14e83 --- /dev/null +++ b/UI/xdg-data/CMakeLists.txt @@ -0,0 +1,24 @@ +if(NOT DEFINED APPDATA_RELEASE_DATE) + if(EXISTS "${CMAKE_SOURCE_DIR}/.git") + execute_process(COMMAND git log --tags -1 --pretty=%cd --date=short + OUTPUT_VARIABLE APPDATA_RELEASE_DATE + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + OUTPUT_STRIP_TRAILING_WHITESPACE) + else() + file(TIMESTAMP "${CMAKE_SOURCE_DIR}/CMakeLists.txt" APPDATA_RELEASE_DATE "%Y-%m-%d") + endif() +endif() + +configure_file( + com.obsproject.Studio.appdata.xml.in + com.obsproject.Studio.appdata.xml) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/com.obsproject.Studio.appdata.xml + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo) + +install(FILES com.obsproject.Studio.desktop + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) + +install(FILES ../forms/images/obs.png + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps + RENAME com.obsproject.Studio.png) diff --git a/UI/xdg-data/com.obsproject.Studio.appdata.xml.in b/UI/xdg-data/com.obsproject.Studio.appdata.xml.in new file mode 100644 index 000000000..6844e88dc --- /dev/null +++ b/UI/xdg-data/com.obsproject.Studio.appdata.xml.in @@ -0,0 +1,23 @@ + + + com.obsproject.Studio + com.obsproject.Studio.desktop + CC0-1.0 + GPL-2.0 + OBS Studio + OBS Project + Live streaming and video recording software + +

Free and open source software for video capturing, recording, and live streaming.

+
+ https://obsproject.com + + + https://obsproject.com/assets/images/OBSDemoApp.jpg + + + + + + +
diff --git a/UI/dist/obs.desktop b/UI/xdg-data/com.obsproject.Studio.desktop similarity index 94% rename from UI/dist/obs.desktop rename to UI/xdg-data/com.obsproject.Studio.desktop index 9c3b50f1a..05f80d389 100644 --- a/UI/dist/obs.desktop +++ b/UI/xdg-data/com.obsproject.Studio.desktop @@ -7,7 +7,7 @@ Comment=Free and Open Source Streaming/Recording Software Comment[fr]=Logiciel libre d'enregistrement et de diffusion sur Internet Comment[ru]=Бесплатная программа с открытым кодом для записи/трансляции видео Exec=obs -Icon=obs +Icon=com.obsproject.Studio Terminal=false Type=Application Categories=AudioVideo;Recorder;