diff --git a/CMakeLists.txt b/CMakeLists.txt index a052ed3b..34611169 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -807,6 +807,14 @@ elseif(UNIX) endif() endif() endfunction() + function(move_app_image_file) + set(SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/resources/${ARGV0}") + set(DST "${CMAKE_BINARY_DIR}/bin/${ARGV0}") + add_custom_command(TARGET lovr POST_BUILD + DEPENDS ${SRC} + COMMAND ${CMAKE_COMMAND} -E copy ${SRC} ${DST} + ) + endfunction() move_lib(${LOVR_GLFW}) move_lib(${LOVR_LUA}) move_lib(${LOVR_ODE}) @@ -816,4 +824,9 @@ elseif(UNIX) foreach(target ${ALL_PLUGIN_TARGETS}) move_lib(${target}) endforeach() + if(LOVR_BUILD_BUNDLE) + move_app_image_file("lovr.desktop") + move_app_image_file("AppRun") + move_app_image_file("logo.svg") + endif() endif() diff --git a/src/resources/AppRun b/src/resources/AppRun new file mode 100755 index 00000000..0bce2526 --- /dev/null +++ b/src/resources/AppRun @@ -0,0 +1,5 @@ +#!/bin/sh + +IMAGE_DIR="$(dirname "$(readlink -f "$0")")" + +exec "$IMAGE_DIR/lovr" "$@" diff --git a/src/resources/logo.svg b/src/resources/logo.svg new file mode 100644 index 00000000..8da8659c --- /dev/null +++ b/src/resources/logo.svg @@ -0,0 +1 @@ + diff --git a/src/resources/lovr.desktop b/src/resources/lovr.desktop new file mode 100644 index 00000000..e08efdca --- /dev/null +++ b/src/resources/lovr.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Type=Application +Name=LÖVR +Icon=logo +Categories=