Advertisement
Guest User

Untitled

a guest
Jul 16th, 2021
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.26 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="gemrb"
  13. rp_module_desc="gemrb - open-source implementation of Infinity Engine"
  14. rp_module_licence="GPL2 https://raw.githubusercontent.com/gemrb/gemrb/master/COPYING"
  15. rp_module_repo="git https://github.com/gemrb/gemrb.git v0.9.0"
  16. rp_module_section="exp"
  17. rp_module_flags="!mali dispmanx"
  18.  
  19. function depends_gemrb() {
  20. getDepends python2-dev libopenal-dev cmake libpng-dev libfreetype6-dev libsdl2-dev libvorbis-dev libvlc-dev libvlccore-dev
  21. }
  22.  
  23. function sources_gemrb() {
  24. gitPullOrClone
  25. }
  26.  
  27. function build_gemrb() {
  28. mkdir -p build
  29. cd build
  30. make clean
  31. cmake .. -DCMAKE_INSTALL_PREFIX="$md_inst" -DCMAKE_BUILD_TYPE=Release -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype2/ -DSDL_BACKEND=SDL2 -DUSE_SDLMIXER=OFF
  32. make
  33. md_ret_require="$md_build/build/gemrb/gemrb"
  34. }
  35.  
  36. function install_gemrb() {
  37. cd build
  38. make install
  39. }
  40.  
  41. function configure_gemrb() {
  42. mkRomDir "ports/baldurs1"
  43. mkRomDir "ports/baldurs2"
  44. mkRomDir "ports/icewind1"
  45. mkRomDir "ports/icewind2"
  46. mkRomDir "ports/planescape"
  47. mkRomDir "ports/cache"
  48.  
  49. addPort "$md_id" "baldursgate1" "Baldurs Gate 1" "$md_inst/bin/gemrb -C $md_conf_root/baldursgate1/GemRB.cfg"
  50. addPort "$md_id" "baldursgate2" "Baldurs Gate 2" "$md_inst/bin/gemrb -C $md_conf_root/baldursgate2/GemRB.cfg"
  51. addPort "$md_id" "icewind1" "Icewind Dale 1" "$md_inst/bin/gemrb -C $md_conf_root/icewind1/GemRB.cfg"
  52. addPort "$md_id" "icewind2" "Icewind Dale 2" "$md_inst/bin/gemrb -C $md_conf_root/icewind2/GemRB.cfg"
  53. addPort "$md_id" "planescape" "Planescape Torment" "$md_inst/bin/gemrb -C $md_conf_root/planescape/GemRB.cfg"
  54.  
  55. #create Baldurs Gate 1 configuration
  56. cat > "$md_conf_root/baldursgate1/GemRB.cfg" << _EOF_
  57. GameType=bg1
  58. GameName=Baldurs Gate 1
  59. Width=800
  60. Height=600
  61. Bpp=32
  62. Fullscreen=0
  63. TooltipDelay=500
  64. AudioDriver = alsa
  65. GUIEnhancements = 15
  66. DrawFPS=0
  67. CaseSensitive=1
  68. GamePath=$romdir/ports/baldurs1/
  69. CD1=$romdir/ports/baldurs1/
  70. CachePath=$romdir/ports/cache/
  71. _EOF_
  72.  
  73. #create Baldurs Gate 2 configuration
  74. cat > "$md_conf_root/baldursgate2/GemRB.cfg" << _EOF_
  75. GameType=bg2
  76. GameName=Baldurs Gate 2
  77. Width=800
  78. Height=600
  79. Bpp=32
  80. Fullscreen=0
  81. TooltipDelay=500
  82. AudioDriver = openal
  83. GUIEnhancements = 15
  84. DrawFPS=0
  85. CaseSensitive=1
  86. GamePath=$romdir/ports/baldurs2/
  87. CD1=$romdir/ports/baldurs2/data/
  88. CachePath=$romdir/ports/cache/
  89. _EOF_
  90.  
  91. #create Icewind 1 configuration
  92. cat > "$md_conf_root/icewind1/GemRB.cfg" << _EOF_
  93. GameType=auto
  94. GameName=Icewind Dale 1
  95. Width=800
  96. Height=600
  97. Bpp=32
  98. Fullscreen=0
  99. TooltipDelay=500
  100. AudioDriver = openal
  101. GUIEnhancements = 15
  102. DrawFPS=0
  103. CaseSensitive=1
  104. GamePath=$romdir/ports/icewind1/
  105. CD1=$romdir/ports/icewind1/Data/
  106. CD2=$romdir/ports/icewind1/CD2/Data/
  107. CD3=$romdir/ports/icewind1/CD3/Data/
  108. CachePath=$romdir/ports/cache/
  109. _EOF_
  110.  
  111. #create Icewind2 configuration
  112. cat > "$md_conf_root/icewind2/GemRB.cfg" << _EOF_
  113. GameType=iwd2
  114. GameName=Icewind Dale 2
  115. Width=800
  116. Height=600
  117. Bpp=32
  118. Fullscreen=0
  119. TooltipDelay=500
  120. AudioDriver = openal
  121. GUIEnhancements = 15
  122. DrawFPS=0
  123. CaseSensitive=1
  124. GamePath=$romdir/ports/icewind2/
  125. CD1=$romdir/ports/icewind2/data/
  126. CachePath=$romdir/ports/cache/
  127. _EOF_
  128.  
  129. #create Planescape configuration
  130. cat > "$md_conf_root/planescape/GemRB.cfg" << _EOF_
  131. GameType=pst
  132. GameName=Planescape Torment
  133. Width=800
  134. Height=600
  135. Bpp=32
  136. Fullscreen=0
  137. TooltipDelay=500
  138. AudioDriver = openal
  139. GUIEnhancements = 15
  140. DrawFPS=0
  141. CaseSensitive=1
  142. GamePath=$romdir/ports/planescape/
  143. CD1=$romdir/ports/planescape/data/
  144. CachePath=$romdir/ports/cache/
  145. _EOF_
  146.  
  147. chown $user:$user "$md_conf_root/baldursgate1/GemRB.cfg"
  148. chown $user:$user "$md_conf_root/baldursgate2/GemRB.cfg"
  149. chown $user:$user "$md_conf_root/icewind1/GemRB.cfg"
  150. chown $user:$user "$md_conf_root/icewind2/GemRB.cfg"
  151. chown $user:$user "$md_conf_root/planescape/GemRB.cfg"
  152. }
  153.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement