zefie

RetroPie x86 lr-pcsx2.sh

May 5th, 2022 (edited)
413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.64 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. # This file is part of The RetroPie Project
  4. #
  5. # The RetroPie Project is the legal property of its developers, whose names are
  6. # too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
  7. #
  8. # See the LICENSE.md file at the top-level directory of this distribution and
  9. # at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
  10. #
  11.  
  12. rp_module_id="lr-pcsx2"
  13. rp_module_desc="PlayStation 2 emu - PCSX2 port for libretro"
  14. rp_module_help="ROM Extensions: .iso .bin\n\nCopy your PlayStation 2 roms to $romdir/ps2"
  15. rp_module_licence="GPL2 https://raw.githubusercontent.com/RetroPie/ppsspp/master/LICENSE.TXT"
  16. rp_module_repo="git https://github.com/libretro/pcsx2.git main"
  17. rp_module_section="exp"
  18. rp_module_flags="!all x86"
  19.  
  20. function depends_lr-pcsx2() {
  21.     getDepends ccache cmake libglvnd-dev xxd libaio-dev libpcap-dev libxml2-dev
  22. }
  23.  
  24. function sources_lr-pcsx2() {
  25.     gitPullOrClone
  26. }
  27.  
  28. function build_lr-pcsx2() {
  29.     cmake -B build \
  30.       -DLIBRETRO=ON \
  31.       -DCMAKE_BUILD_TYPE=Release \
  32.       -DENABLE_QT=OFF \
  33.       -DCMAKE_LINK_WHAT_YOU_USE=TRUE \
  34.       -Wno-dev
  35.  
  36.     cmake --build build
  37.     md_ret_require="$md_build/build/pcsx2/pcsx2_libretro.so"
  38. }
  39.  
  40. function install_lr-pcsx2() {
  41.     md_ret_files=(
  42.         'build/pcsx2/pcsx2_libretro.so'
  43.     )
  44. }
  45.  
  46. function configure_lr-pcsx2() {
  47.     mkRomDir "ps2"
  48.     ensureSystemretroconfig "ps2"
  49.  
  50.     if [[ "$md_mode" == "install" ]]; then
  51.         mkUserDir "$biosdir/pcsx2"
  52.         mkUserDir "$biosdir/pcsx2/bios"
  53.     fi
  54.  
  55.     addEmulator 1 "$md_id" "ps2" "$md_inst/pcsx2_libretro.so"
  56.     addSystem "ps2"
  57. }
Add Comment
Please, Sign In to add comment