Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add install script for Rigelengine to play Duke Nukem 2 on Retropie .sh #3738

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 4 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
55 changes: 55 additions & 0 deletions scriptmodules/ports/rigelengine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env bash

# This file is part of The RetroPie Project
#
# The RetroPie Project is the legal property of its developers, whose names are
# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
#
# See the LICENSE.md file at the top-level directory of this distribution and
# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
#

rp_module_id="rigelengine"
rp_module_desc="RigelEngine - Duke Nukem 2 source port"
rp_module_help="Copy your game to roms/ports/duke2 folder"
rp_module_licence="GPL2 https://github.com/lethal-guitar/RigelEngine/blob/master/LICENSE.md"
rp_module_repo="git https://github.com/lethal-guitar/RigelEngine.git v0.9.1"
rp_module_section="exp"
rp_module_flags="noinstclean"

function depends_rigelengine() {
getDepends cmake libsdl2-dev libsdl2-mixer-dev
}

function sources_rigelengine() {
gitPullOrClone
}

function build_rigelengine() {
mkdir "$md_build/build"
cd "$md_build/build"
cmake .. -DUSE_GL_ES=ON -DCMAKE_BUILD_TYPE=Release -DWARNINGS_AS_ERRORS=OFF

make

md_ret_require="$md_build/build/src/RigelEngine"
}

function install_rigelengine() {
md_ret_files=(
build/src/RigelEngine
)
}

function game_data_rigelengine() {
if [[ ! -f "$romdir/ports/duke2/NUKEM2.EXE" ]]; then
downloadAndExtract "https://github.com/Exarkuniv/game-data/raw/main/duke2.zip" "$romdir/ports/duke2/"
chown -R $user:$user "$romdir/ports/duke2"
fi
}

function configure_rigelengine() {
addPort "$md_id" "rigelengine" "RigelEngine - Duke Nukem 2 source port" "$md_inst/RigelEngine /home/pi/RetroPie/roms/ports/duke2"
Exarkuniv marked this conversation as resolved.
Show resolved Hide resolved
mkRomDir "ports/duke2"
[[ "$md_mode" == "install" ]] && game_data_rigelengine
}