From 5ed525abb5647cf62eb2acf9dabfc4ff239e86e6 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Fri, 16 Oct 2020 11:06:25 +0200 Subject: [PATCH 1/3] install symlink for gcodeviewer --- src/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dbdd22778..84026b667 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -247,4 +247,7 @@ if (WIN32) endif () else () install(TARGETS PrusaSlicer RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + + # Install the symlink for gcodeviewer + install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink prusa-slicer prusa-gcodeviewer WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR})") endif () From bd271981d33f2733934865e0ad3b663e449548c6 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Fri, 16 Oct 2020 11:14:18 +0200 Subject: [PATCH 2/3] Add the desktop file for Linux desktops --- src/platform/unix/PrusaSlicer.desktop | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/platform/unix/PrusaSlicer.desktop diff --git a/src/platform/unix/PrusaSlicer.desktop b/src/platform/unix/PrusaSlicer.desktop new file mode 100644 index 000000000..464873f45 --- /dev/null +++ b/src/platform/unix/PrusaSlicer.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=PrusaSlicer +Exec=prusa-slicer %F +Icon=PrusaSlicer +Terminal=false +Type=Application +MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf; +Categories=Graphics;3DGraphics; +Keywords=3D;Printing;Slicer; \ No newline at end of file From 0db675721c8eae4afbb4cbe04ebad1169793191a Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Fri, 16 Oct 2020 14:04:10 +0200 Subject: [PATCH 3/3] Add installing of the desktop file to cmake --- CMakeLists.txt | 3 +++ src/CMakeLists.txt | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f2afb814..9f30f18ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -511,7 +511,10 @@ if (WIN32) elseif (SLIC3R_FHS) set(SLIC3R_FHS_RESOURCES "${CMAKE_INSTALL_FULL_DATAROOTDIR}/PrusaSlicer") install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${SLIC3R_FHS_RESOURCES}") + install(FILES src/platform/unix/PrusaSlicer.desktop DESTINATION ${SLIC3R_FHS_RESOURCES}/applications) else () + install(FILES src/platform/unix/PrusaSlicer.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/resources/applications) install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/resources") endif () + configure_file(${LIBDIR}/platform/unix/fhs.hpp.in ${LIBDIR_BIN}/platform/unix/fhs.hpp) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 84026b667..c93d95946 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -204,11 +204,11 @@ if (WIN32) VERBATIM ) endif () - + # This has to be a separate target due to the windows command line lenght limits add_custom_target(PrusaSlicerDllsCopy ALL DEPENDS PrusaSlicer) prusaslicer_copy_dlls(PrusaSlicerDllsCopy) - + else () if (APPLE) # On OSX, the name of the binary matches the name of the Application.