2021-01-27 21:26:19 +00:00
|
|
|
project(launcher)
|
|
|
|
|
2021-06-17 21:32:24 +00:00
|
|
|
# Launcher
|
2024-02-08 02:15:48 +00:00
|
|
|
add_executable(launcher
|
2024-11-18 03:48:25 +00:00
|
|
|
src/bootstrap/bootstrap.cpp
|
|
|
|
src/bootstrap/mods.cpp
|
|
|
|
src/bootstrap/assets.cpp
|
|
|
|
src/bootstrap/patchelf.cpp
|
|
|
|
src/bootstrap/debug.cpp
|
|
|
|
src/util/util.cpp
|
|
|
|
src/util/sdk.cpp
|
|
|
|
src/logger/logger.cpp
|
|
|
|
src/logger/crash-report.cpp
|
2024-05-12 07:19:01 +00:00
|
|
|
src/options/parser.cpp
|
|
|
|
src/main.cpp
|
2024-11-20 17:22:36 +00:00
|
|
|
src/ui/frame.cpp
|
2024-11-21 08:16:11 +00:00
|
|
|
src/ui/color.cpp
|
2024-06-15 12:52:15 +00:00
|
|
|
src/client/configuration.cpp
|
|
|
|
src/client/cache.cpp
|
2024-11-21 07:16:25 +00:00
|
|
|
src/client/ui.cpp
|
|
|
|
src/client/flags/node.cpp
|
|
|
|
src/client/flags/flags.cpp
|
|
|
|
src/client/flags/available-feature-flags # Show In IDE
|
2024-02-08 02:15:48 +00:00
|
|
|
)
|
2024-11-21 07:16:25 +00:00
|
|
|
embed_resource(launcher src/client/flags/available-feature-flags)
|
2024-11-20 17:22:36 +00:00
|
|
|
target_link_libraries(launcher
|
|
|
|
reborn-util
|
|
|
|
LIB_LIEF
|
|
|
|
imgui
|
|
|
|
trampoline-headers
|
|
|
|
)
|
2022-07-02 22:14:23 +00:00
|
|
|
# RPath
|
|
|
|
set_target_properties(launcher PROPERTIES INSTALL_RPATH "$ORIGIN/lib/native")
|
2024-05-12 07:19:01 +00:00
|
|
|
target_link_options(launcher PRIVATE "LINKER:--disable-new-dtags")
|
2024-11-18 03:48:25 +00:00
|
|
|
# Files
|
|
|
|
target_compile_definitions(launcher PRIVATE _FILE_OFFSET_BITS=64)
|
2022-06-10 01:31:40 +00:00
|
|
|
|
|
|
|
# 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"
|
|
|
|
)
|
2024-06-15 12:52:15 +00:00
|
|
|
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/launcher.desktop"
|
2024-06-16 04:47:36 +00:00
|
|
|
"Terminal=false\n"
|
|
|
|
"StartupNotify=false\n"
|
|
|
|
"StartupWMClass=${MCPI_APP_ID}\n"
|
2024-06-15 12:52:15 +00:00
|
|
|
)
|
2022-06-10 01:31:40 +00:00
|
|
|
install(
|
|
|
|
FILES "${CMAKE_CURRENT_BINARY_DIR}/launcher.desktop"
|
2022-07-07 04:37:53 +00:00
|
|
|
DESTINATION "${MCPI_SHARE_DIR}/applications"
|
2022-06-10 01:31:40 +00:00
|
|
|
RENAME "${MCPI_APP_ID}.desktop"
|
|
|
|
)
|
|
|
|
|
|
|
|
# Install AppStream Metadata
|
|
|
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/appstream.xml"
|
|
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
|
|
|
"<component type=\"desktop\">\n"
|
|
|
|
" <id>${MCPI_APP_ID}</id>\n"
|
|
|
|
" <name>${MCPI_APP_TITLE}</name>\n"
|
|
|
|
" <metadata_license>CC0-1.0</metadata_license>\n"
|
|
|
|
" <summary>Fun with Blocks</summary>\n"
|
2022-06-10 03:23:37 +00:00
|
|
|
" <description>\n"
|
|
|
|
" <p>Minecraft: Pi Edition Modding Project.</p>\n"
|
|
|
|
" <p>NOTE: This is not verified by, affiliated with, or supported by Mojang or Microsoft.</p>\n"
|
|
|
|
" </description>\n"
|
2022-06-10 01:31:40 +00:00
|
|
|
" <url type=\"homepage\">https://gitea.thebrokenrail.com/TheBrokenRail/minecraft-pi-reborn</url>\n"
|
|
|
|
" <launchable type=\"desktop-id\">${MCPI_APP_ID}.desktop</launchable>\n"
|
|
|
|
" <provides>\n"
|
|
|
|
" <id>com.thebrokenrail.MCPIRebornClient.desktop</id>\n"
|
|
|
|
" </provides>\n"
|
|
|
|
" <project_license>LicenseRef-proprietary</project_license>\n"
|
|
|
|
" <developer_name>TheBrokenRail & Mojang AB</developer_name>\n"
|
|
|
|
" <content_rating type=\"oars-1.0\">\n"
|
|
|
|
" <content_attribute id=\"violence-cartoon\">moderate</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"violence-fantasy\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"violence-realistic\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"violence-bloodshed\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"violence-sexual\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"drugs-alcohol\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"drugs-narcotics\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"drugs-tobacco\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"sex-nudity\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"sex-themes\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"language-profanity\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"language-humor\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"language-discrimination\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"social-chat\">intense</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"social-info\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"social-audio\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"social-location\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"social-contacts\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"money-purchasing\">none</content_attribute>\n"
|
|
|
|
" <content_attribute id=\"money-gambling\">none</content_attribute>\n"
|
|
|
|
" </content_rating>\n"
|
|
|
|
" <releases>\n"
|
2022-06-11 03:49:15 +00:00
|
|
|
" <release version=\"${MCPI_VERSION}\" date=\"${MCPI_VERSION_DATE}\"></release>\n"
|
|
|
|
" </releases>\n"
|
2024-06-15 12:52:15 +00:00
|
|
|
" <screenshots>\n"
|
|
|
|
" <screenshot type=\"default\">\n"
|
|
|
|
" <image>https://gitea.thebrokenrail.com/TheBrokenRail/minecraft-pi-reborn/raw/branch/master/images/start.png</image>\n"
|
|
|
|
" </screenshot>\n"
|
|
|
|
" </screenshots>\n"
|
2022-06-10 01:31:40 +00:00
|
|
|
"</component>\n"
|
|
|
|
)
|
|
|
|
install(
|
|
|
|
FILES "${CMAKE_CURRENT_BINARY_DIR}/appstream.xml"
|
2022-07-07 04:37:53 +00:00
|
|
|
DESTINATION "${MCPI_SHARE_DIR}/metainfo"
|
2022-06-10 01:31:40 +00:00
|
|
|
RENAME "${MCPI_APP_ID}.appdata.xml"
|
|
|
|
)
|
2022-07-04 20:44:00 +00:00
|
|
|
|
|
|
|
# AppImage
|
|
|
|
if(MCPI_IS_APPIMAGE_BUILD)
|
|
|
|
install_symlink("bin/${MCPI_VARIANT_NAME}" "AppRun")
|
2022-07-07 04:37:53 +00:00
|
|
|
install_symlink("${MCPI_SHARE_DIR}/applications/${MCPI_APP_ID}.desktop" "${MCPI_APP_ID}.desktop")
|
2022-07-04 20:44:00 +00:00
|
|
|
endif()
|