|
| 1 | +#!/usr/bin/env bash |
| 2 | + |
| 3 | +# Input Server Address and Port - Place [srb2kart-assets.tar.gz] in root of webSERVER |
| 4 | +webSERVER=127.0.0.1 |
| 5 | +webPORT=8000 |
| 6 | +srb2kVER=v1.3 |
| 7 | + |
| 8 | +# This file is part of The RetroPie Project |
| 9 | +# |
| 10 | +# The RetroPie Project is the legal property of its developers, whose names are |
| 11 | +# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source. |
| 12 | +# |
| 13 | +# See the LICENSE.md file at the top-level directory of this distribution and |
| 14 | +# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md |
| 15 | +# |
| 16 | + |
| 17 | +rp_module_id="srb2kart" |
| 18 | +rp_module_desc="Sonic Robo Blast 2 Kart - 3D Sonic the Hedgehog fan-game based on Sonic Robo Blast 2 built using a modified version of the Doom Legacy source port of Doom" |
| 19 | +rp_module_licence="GPL2 https://raw.githubusercontent.com/STJr/Kart-Public/master/LICENSE" |
| 20 | +rp_module_section="exp" |
| 21 | + |
| 22 | +function depends_srb2kart() { |
| 23 | + getDepends cmake libsdl2-dev libsdl2-mixer-dev |
| 24 | +} |
| 25 | + |
| 26 | +function sources_srb2kart() { |
| 27 | + gitPullOrClone "$md_build" https://github.com/STJr/Kart-Public.git $srb2kVER |
| 28 | + downloadAndExtract "$webSERVER:$webPORT/srb2kart-assets.tar.gz" "$md_build" |
| 29 | +} |
| 30 | + |
| 31 | +function build_srb2kart() { |
| 32 | + mkdir build |
| 33 | + cd build |
| 34 | + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$md_inst" |
| 35 | + make |
| 36 | + md_ret_require="$md_build/build/bin/srb2kart" |
| 37 | +} |
| 38 | + |
| 39 | +function install_srb2kart() { |
| 40 | + # copy and dereference, so we get a srb2kart binary rather than a symlink to srb2kart-version |
| 41 | + cp -L 'build/bin/srb2kart' "$md_inst/srb2kart" |
| 42 | + md_ret_files=( |
| 43 | + 'assets/installer/bonuschars.kart' |
| 44 | + 'assets/installer/chars.kart' |
| 45 | + 'assets/installer/gfx.kart' |
| 46 | + 'assets/installer/maps.kart' |
| 47 | + 'assets/installer/music.kart' |
| 48 | + 'assets/installer/patch.kart' |
| 49 | + 'assets/installer/sounds.kart' |
| 50 | + 'assets/installer/textures.kart' |
| 51 | + 'assets/installer/srb2.srb' |
| 52 | + ) |
| 53 | +} |
| 54 | + |
| 55 | +function configure_srb2kart() { |
| 56 | + addPort "$md_id" "srb2kart" "Sonic Robo Blast 2 Kart" "pushd $md_inst; ./srb2kart; popd" |
| 57 | + moveConfigDir "$home/.srb2kart" "$md_conf_root/$md_id" |
| 58 | +} |
| 59 | + |
0 commit comments