Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ I'll have a note at the end with some Info about it. if there is NO note or [X]
- [X] - `lmarbles.sh` - Open Source Atomix game - **Installs Runs fine, screen is alitte off center**
- [X] - `ltris.sh` - Open Source Tetris game - **Installs, Plays great**
- [X] - `manaplus.sh` - manaplus - 2D MMORPG Client - **x86, cant test, was told it works**
- [ ] - `mcpelauncher.sh` - mcpelauncher - Unofficial launcher for Minecraft: Bedrock Edition (Android) on Linux - **Untested, requires own copy of the game**
- [X] - `meritous.sh` - Port of an action-adventure dungeon crawl game - **Installs, Plays great**
- [X] - `nblood.sh` - Blood source port - **Installs, Plays great**
- [ ] - `nkaruga.sh` - Ikaruga demake. - **Blocked from installing on Pi4**
Expand Down
70 changes: 70 additions & 0 deletions scriptmodules/ports/mcpelauncher.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/usr/bin/env bash

# This file is part of RetroPie-Extra, a supplement to RetroPie.
# For more information, please visit:
#
# https://github.com/RetroPie/RetroPie-Setup
# https://github.com/Exarkuniv/RetroPie-Extra
#
# See the LICENSE file distributed with this source and at
# https://raw.githubusercontent.com/Exarkuniv/RetroPie-Extra/master/LICENSE
#

rp_module_id="mcpelauncher"
rp_module_desc="mcpelauncher - Unofficial launcher for Minecraft: Bedrock Edition (Android) on Linux"
rp_module_licence="GPL3 https://raw.githubusercontent.com/minecraft-linux/mcpelauncher-manifest/ng/LICENSE"
rp_module_help="Minecraft is NOT free. You must provide your own copy of the game.\n\nExtract the contents of a Minecraft: Bedrock Edition Android APK into:\n\n$romdir/ports/mcpelauncher/game\n\nThe folder must contain 'AndroidManifest.xml', the 'assets' folder and the 'lib' folder from the APK. Xbox Live login opens a browser window; a display/keyboard is required for the initial sign-in."
rp_module_repo="git https://github.com/minecraft-linux/mcpelauncher-manifest.git ng"
rp_module_section="exp"
rp_module_flags="!all rpi4 rpi5 x86_64"

function depends_mcpelauncher() {
getDepends cmake pkg-config libssl-dev libpng-dev libx11-dev libxi-dev libudev-dev libevdev-dev libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev libuv1-dev libzip-dev libprotobuf-dev protobuf-compiler libcurl4-openssl-dev libasound2-dev libpulse-dev zlib1g-dev
}

function sources_mcpelauncher() {
gitPullOrClone
}

function build_mcpelauncher() {
mkdir -p "$md_build/build"
cd "$md_build/build"
cmake \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX="$md_inst" \
-DBUILD_UI=OFF \
-DUSE_OWN_CURL=OFF \
-DENABLE_DEV_PATHS=OFF \
..
make -j"$(nproc)"
md_ret_require="$md_build/build/mcpelauncher-client/mcpelauncher-client"
}

function install_mcpelauncher() {
cd "$md_build/build"
make install
}

function configure_mcpelauncher() {
local game_dir="$romdir/ports/mcpelauncher/game"

if [[ "$md_mode" == "install" ]]; then
mkRomDir "ports/mcpelauncher"
mkRomDir "ports/mcpelauncher/game"

cat > "$md_inst/mcpelauncher.sh" << _EOF_
#!/usr/bin/env bash
"$md_inst/bin/mcpelauncher-client" \\
-dg "$game_dir" \\
-dd "$home/.local/share/mcpelauncher" \\
-dc "$home/.cache/mcpelauncher" \\
"\$@"
_EOF_
chmod +x "$md_inst/mcpelauncher.sh"
chown -R "$user:$user" "$romdir/ports/mcpelauncher"
fi

moveConfigDir "$home/.local/share/mcpelauncher" "$md_conf_root/mcpelauncher"

addPort "$md_id" "mcpelauncher" "Minecraft: Bedrock Edition" "$md_inst/mcpelauncher.sh"
}