project(launcher) # Launcher add_executable(launcher src/bootstrap.cpp src/patchelf.cpp src/util.c src/crash-report.c src/sdk.cpp src/mods.cpp src/options/parser.cpp src/main.cpp ) if(NOT MCPI_SERVER_MODE) embed_resource(launcher src/client/available-feature-flags) target_sources(launcher PRIVATE src/client/configuration.cpp src/client/cache.cpp src/client/available-feature-flags # Show In IDE ) endif() target_link_libraries(launcher reborn-util LIB_LIEF trampoline-headers) # RPath set_target_properties(launcher PROPERTIES INSTALL_RPATH "$ORIGIN/lib/native") target_link_options(launcher PRIVATE "LINKER:--disable-new-dtags") # Install install(TARGETS launcher DESTINATION "${MCPI_INSTALL_DIR}") install_symlink("../${MCPI_INSTALL_DIR}/launcher" "bin/${MCPI_VARIANT_NAME}") # 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_ID}\n" ) endif() install( FILES "${CMAKE_CURRENT_BINARY_DIR}/launcher.desktop" DESTINATION "${MCPI_SHARE_DIR}/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 "${MCPI_SHARE_DIR}/metainfo" RENAME "${MCPI_APP_ID}.appdata.xml" ) # AppImage if(MCPI_IS_APPIMAGE_BUILD) install_symlink("bin/${MCPI_VARIANT_NAME}" "AppRun") install_symlink("${MCPI_SHARE_DIR}/applications/${MCPI_APP_ID}.desktop" "${MCPI_APP_ID}.desktop") endif()