Compare commits

...

9 commits

Author SHA1 Message Date
David Borel 7dc8a5be97
Merge af78eed1ba into 6d458aafac 2024-05-09 21:08:43 +02:00
Jools Wills 6d458aafac
Merge pull request #3916 from theofficialgman/master
emulationstation: fix OpenGL version check
2024-05-08 20:40:18 +01:00
theofficialgman a9bdf98195 emulationstation: fix OpenGL version check 2024-05-08 15:28:33 -04:00
David Borel af78eed1ba
Rename openlara to openlara.sh 2024-01-29 12:08:22 -08:00
David Borel 54d809ff96
Merge pull request #2 from dborel/OpenLara2
Removed outdated delete command.
2024-01-29 12:02:16 -08:00
David Borel fcde0f91e3
Merge pull request #1 from dborel/patch-2
Merge
2024-01-29 12:01:20 -08:00
David Borel c1fe1ca55f
Removed outdated delete command. 2024-01-29 11:58:35 -08:00
David Borel 8c4e14fb64
Don't attempt to download busted demo. Let people read the libretro docs to get set up properly. 2024-01-29 11:51:22 -08:00
David Borel 93f5e195f8
New port: OpenLara.
Includes 3MB demo data. Enhanced water and lighting with OpenGL 3.1 and SDL. Tested on RPI4 with x11 and kmsdrm. For more information, see https://docs.libretro.com/library/openlara .
2024-01-29 09:41:42 -08:00
2 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,63 @@
#!/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="openlara"
rp_module_desc="OpenLara - Source port of Tomb Raider 1-5 (only 1 works)."
rp_module_licence="BSD 2-Clause https://github.com/XProger/OpenLara?tab=BSD-2-Clause-1-ov-file#readme"
rp_module_help="OpenLara requires the data from a full or demo version of Tomb Raider 1-5. For example, copy the full DATA and FMV folders from the PC CD-ROM. This script installs the PC demo."
rp_module_section="exp"
rp_module_flags=""
function depends_openlara() {
local depends=(libsdl2-dev libsdl2-net-dev libsdl2-mixer-dev libsdl2-image-dev)
if compareVersions "$__os_debian_ver" lt 10; then
depends+=(libgles2-mesa-dev)
fi
getDepends "${depends[@]}"
}
function sources_openlara() {
gitPullOrClone "$md_build" https://github.com/XProger/OpenLara.git
}
function build_openlara() {
cd "$md_build/src/platform/sdl2"
#./build.sh
g++ -std=c++11 `sdl2-config --cflags` -O3 -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -DNDEBUG -D__SDL2__ -D_SDL2_OPENGL main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c -I../../ -o OpenLara `sdl2-config --libs` -lGL -lm -lrt -lpthread -lasound -ludev
md_ret_require="$md_build/src/platform/sdl2"
}
function install_openlara() {
md_ret_files=(
'src/platform/sdl2/OpenLara'
)
}
function game_data_openlara() {
mkdir "$home/.openlara"
chown -R $user:$user "$romdir/ports/tombraider"
chown -R $user:$user "$md_conf_root/openlara"
}
function configure_openlara() {
addPort "openlara" "openlara" "Tomb Raider" "pushd $romdir/ports/tombraider; MESA_GL_VERSION_OVERRIDE=3.1 $md_inst/OpenLara; popd"
mkRomDir "ports/tombraider"
moveConfigDir "$home/.openlara" "$md_conf_root/openlara"
[[ "$md_mode" == "install" ]] && game_data_openlara
}
function remove_openlara() {
rm /home/pi/.openlara
}

View file

@ -173,7 +173,10 @@ function build_emulationstation() {
compareVersions $gles_ver lt 2.0 && params+=(-DUSE_GLES1=On)
else
params+=(-DGL=On)
# mesa specific check of OpenGL version
local gl_ver=$(sudo -u $user glxinfo -B | grep -oP 'Max compat profile version:\s\K.*')
# generic fallback check of OpenGL version
[[ -z "$gl_ver" ]] && gl_ver=$(sudo -u $user glxinfo -B | grep -oP "OpenGL version string: \K[^ ]+")
compareVersions $gl_ver gt 2.0 && params+=(-DUSE_GL21=On)
fi
elif isPlatform "gles"; then