project(launcher) # Launcher add_executable(launcher src/bootstrap.c src/patchelf.c src/crash-report.c) if(MCPI_SERVER_MODE) target_sources(launcher PRIVATE src/server/launcher.c) else() target_sources(launcher PRIVATE src/client/launcher.cpp) endif() target_link_libraries(launcher reborn-util) # Install install(TARGETS launcher DESTINATION "${MCPI_INSTALL_DIR}") install_symlink("../${MCPI_INSTALL_DIR}/launcher" "bin/${MCPI_VARIANT_NAME}") # Install Available Feature Flags List if(NOT MCPI_SERVER_MODE) install(FILES "src/client/available-feature-flags" DESTINATION "${MCPI_INSTALL_DIR}") endif() # Install Desktop Entry file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/launcher.desktop" "[Desktop Entry]\n" "Name=${MCPI_APP_TITLE}\n" "Comment=Fun with Blocks\n" "Icon=${MCPI_APP_ID}\n" "Exec=${MCPI_VARIANT_NAME}\n" "Type=Application\n" "Categories=Game;\n" ) if(MCPI_HEADLESS_MODE) file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/launcher.desktop" "Terminal=true\n" "NoDisplay=true\n" ) else() file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/launcher.desktop" "Terminal=false\n" "StartupNotify=false\n" "StartupWMClass=${MCPI_APP_TITLE}\n" ) endif() install( FILES "${CMAKE_CURRENT_BINARY_DIR}/launcher.desktop" DESTINATION "share/applications" RENAME "${MCPI_APP_ID}.desktop" ) # Install AppStream Metadata file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/appstream.xml" "\n" "\n" " ${MCPI_APP_ID}\n" " ${MCPI_APP_TITLE}\n" " CC0-1.0\n" " Fun with Blocks\n" " \n" "

Minecraft: Pi Edition Modding Project.

\n" "

NOTE: This is not verified by, affiliated with, or supported by Mojang or Microsoft.

\n" "
\n" " https://gitea.thebrokenrail.com/TheBrokenRail/minecraft-pi-reborn\n" " ${MCPI_APP_ID}.desktop\n" " \n" " com.thebrokenrail.MCPIRebornClient.desktop\n" " \n" " LicenseRef-proprietary\n" " TheBrokenRail & Mojang AB\n" " \n" " moderate\n" " none\n" " none\n" " none\n" " none\n" " none\n" " none\n" " none\n" " none\n" " none\n" " none\n" " none\n" " none\n" " intense\n" " none\n" " none\n" " none\n" " none\n" " none\n" " none\n" " \n" " \n" " \n" " \n" ) if(NOT MCPI_HEADLESS_MODE) file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/appstream.xml" " \n" " \n" " https://gitea.thebrokenrail.com/TheBrokenRail/minecraft-pi-reborn/raw/branch/master/images/start.png\n" " \n" " \n" ) endif() file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/appstream.xml" "
\n" ) install( FILES "${CMAKE_CURRENT_BINARY_DIR}/appstream.xml" DESTINATION "share/metainfo" RENAME "${MCPI_APP_ID}.appdata.xml" )