Skip to content

Commit

Permalink
Added .destkop files for GUI Apps
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianReimold committed Dec 17, 2020
1 parent 414d4f6 commit 31251ec
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 6 deletions.
7 changes: 7 additions & 0 deletions app/mon/mon_gui/appmenu/app.desktop.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Name=eCAL Monitor
Comment=eCAL Monitoring Application
Exec=@CMAKE_INSTALL_PREFIX@/@eCAL_install_app_dir@/ecal_@TARGET_NAME@
Terminal=false
Type=Application
Icon=ecal_@TARGET_NAME@
Binary file added app/mon/mon_gui/appmenu/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions app/play/play_gui/appmenu/app.desktop.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Name=eCAL Player
Comment=Player for replaying eCAL Measurements
Exec=@CMAKE_INSTALL_PREFIX@/@eCAL_install_app_dir@/ecal_@TARGET_NAME@ %f
Terminal=false
Type=Application
Icon=ecal_@TARGET_NAME@
Binary file added app/play/play_gui/appmenu/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions app/rec/rec_gui/appmenu/app.desktop.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Name=eCAL Recorder
Comment=Recorder for creating eCAL Measurements
Exec=@CMAKE_INSTALL_PREFIX@/@eCAL_install_app_dir@/ecal_@TARGET_NAME@ %f
Terminal=false
Type=Application
Icon=ecal_@TARGET_NAME@
Binary file added app/rec/rec_gui/appmenu/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/sys/sys_gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,4 @@ endif()

set_property(TARGET ${PROJECT_NAME} PROPERTY FOLDER app/sys)

ecal_install_app(${PROJECT_NAME})
ecal_install_app(${PROJECT_NAME} START_MENU_NAME "eCAL Sys")
7 changes: 7 additions & 0 deletions app/sys/sys_gui/appmenu/app.desktop.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Name=eCAL Sys
Comment=Application for starting and monitoring sets of eCAL Applications
Exec=@CMAKE_INSTALL_PREFIX@/@eCAL_install_app_dir@/ecal_@TARGET_NAME@ %f
Terminal=false
Type=Application
Icon=ecal_@TARGET_NAME@
Binary file added app/sys/sys_gui/appmenu/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions app/util/launcher/appmenu/app.desktop.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Name=eCAL Launcher
Comment=Launch eCAL Applications
Exec=@CMAKE_INSTALL_PREFIX@/@eCAL_install_app_dir@/ecal_@TARGET_NAME@
Terminal=false
Type=Application
Icon=ecal_@TARGET_NAME@
Binary file added app/util/launcher/appmenu/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions cmake/helper_functions/app.desktop.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Name=@ECAL_INSTALL_APP_START_MENU_NAME@
Comment=@ECAL_INSTALL_APP_START_MENU_NAME@
Exec=@CMAKE_INSTALL_PREFIX@/@eCAL_install_app_dir@/@TARGET_NAME@
Terminal=false
Type=Application
# Icon=ecalmon
25 changes: 20 additions & 5 deletions cmake/helper_functions/ecal_install_functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -32,7 +32,7 @@ endfunction()

# this appends the 64 / 32 suffix (required for the eCAL Core libraries)
function(ecal_install_ecal_static_library TARGET_NAME)

install(TARGETS ${TARGET_NAME}
# IMPORTANT: Add the library to the "export-set"
EXPORT eCALCoreTargets
Expand All @@ -44,7 +44,7 @@ endfunction()
# installing shared libraries is a li
# this appends the 64 / 32 suffix (required for the eCAL Core libraries)
function(ecal_install_ecal_shared_library TARGET_NAME)

# Windows, RUNTIME -> .dll, ARCHIVE -> .lib, Unix: LIBRARY -> .so
install(TARGETS ${TARGET_NAME}
# IMPORTANT: Add the library to the "export-set"
Expand Down Expand Up @@ -106,6 +106,21 @@ function(ecal_install_app TARGET_NAME)
set_property(INSTALL "${eCAL_install_app_dir}/$<TARGET_FILE_NAME:${TARGET_NAME}>"
PROPERTY CPACK_START_MENU_SHORTCUTS "${ECAL_INSTALL_APP_START_MENU_NAME}"
)

if(UNIX AND (DEFINED ECAL_INSTALL_APP_START_MENU_NAME))
configure_file("${CMAKE_CURRENT_LIST_DIR}/appmenu/app.desktop.in"
"${CMAKE_CURRENT_BINARY_DIR}/appmenu/ecal_${TARGET_NAME}.desktop"
@ONLY)
configure_file("${CMAKE_CURRENT_LIST_DIR}/appmenu/icon.png"
"${CMAKE_CURRENT_BINARY_DIR}/appmenu/ecal_${TARGET_NAME}.png"
COPYONLY)

INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/appmenu/ecal_${TARGET_NAME}.png"
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/256x256/apps/")

INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/appmenu/ecal_${TARGET_NAME}.desktop"
DESTINATION "${CMAKE_INSTALL_DATADIR}/applications/")
endif()
endfunction()

function(ecal_install_gtest TARGET_NAME)
Expand Down Expand Up @@ -140,4 +155,4 @@ install(TARGETS ${TARGET_NAME}
RUNTIME DESTINATION "${eCAL_install_bin_dir}/${ECAL_MON_PLUGIN_DIR}" COMPONENT app
LIBRARY DESTINATION $<IF:$<BOOL:${WIN32}>,${eCAL_install_bin_dir}/${ECAL_MON_PLUGIN_DIR},${eCAL_install_lib_dir}/${ECAL_MON_PLUGIN_DIR}> COMPONENT app
)
endfunction()
endfunction()

0 comments on commit 31251ec

Please sign in to comment.