Advertisement
Guest User

Untitled

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