Skip to content

Commit

Permalink
install desktop and icon file for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Feb 6, 2023
1 parent 1290bbf commit a3f55ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ jobs:
curl -LO https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
curl -LO https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh
chmod +x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-gtk.sh
cp ../resources/linux/implay.desktop .
cp ../resources/icon.png implay.png
DEPLOY_GTK_VERSION=3 ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin gtk --output appimage \
--desktop-file implay.desktop --icon-file implay.png
DEPLOY_GTK_VERSION=3 ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin gtk --output appimage
mv ImPlay*.AppImage $(echo ImPlay-*.deb | sed 's/deb/AppImage/')
- uses: actions/upload-artifact@v3
with:
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,8 @@ if(CREATE_PACKAGE)
else()
include(GNUInstallDirs)
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
if(UNIX AND NOT APPLE)
install(FILES ${PROJECT_SOURCE_DIR}/resources/linux/implay.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(FILES ${PROJECT_SOURCE_DIR}/resources/icon.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps RENAME implay.png)
endif()
endif()
2 changes: 2 additions & 0 deletions cmake/CreateCpackPackage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ macro(prepare_package)
else()
include(GNUInstallDirs)
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${PROJECT_SOURCE_DIR}/resources/linux/implay.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(FILES ${PROJECT_SOURCE_DIR}/resources/icon.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps RENAME implay.png)
endif()
endmacro()

Expand Down

0 comments on commit a3f55ec

Please sign in to comment.