1313rp_module_id=" 2s2h"
1414rp_module_desc=" 2s2h - 2ship2harkinian is an advanced source port for The Legend of Zelda - Majora's Mask"
1515rp_module_help=" Save your valid USA .z64 copy of Majora's Mask to $romdir /n64"
16- rp_module_repo=" git https://github.com/HarbourMasters/2ship2harkinian.git 1.0.1 "
16+ rp_module_repo=" git https://github.com/HarbourMasters/2ship2harkinian.git develop "
1717rp_module_section=" exp"
1818rp_module_flags=" all"
1919
2020function depends_2s2h() {
21- getDepends gcc g++ git cmake ninja-build lsb-release libsdl2-dev libpng-dev libsdl2-net-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev libtinyxml2-dev libspdlog-dev libboost-dev libopengl-dev jq
21+ local depends=(gcc g++ git cmake ninja-build lsb-release libsdl2-dev libpng-dev
22+ libsdl2-net-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev
23+ libtinyxml2-dev libspdlog-dev libboost-dev libopengl-dev jq xorg)
24+
25+ getDepends " ${depends[@]} "
26+
2227}
2328
2429function sources_2s2h() {
2530 gitPullOrClone
2631}
2732
28- function increase_swap() {
29- original_swap=$( grep SwapTotal /proc/meminfo | awk ' {print $2}' )
30- sudo dphys-swapfile swapoff
31- sudo sed -i ' s/^CONF_SWAPSIZE=.*/CONF_SWAPSIZE=4096/' /etc/dphys-swapfile
32- sudo dphys-swapfile setup
33- sudo dphys-swapfile swapon
34- }
35-
36- function restore_swap() {
37- sudo dphys-swapfile swapoff
38- sudo sed -i " s/^CONF_SWAPSIZE=.*/CONF_SWAPSIZE=$(( original_swap / 1024 )) /" /etc/dphys-swapfile
39- sudo dphys-swapfile setup
40- sudo dphys-swapfile swapon
41- }
42-
4333function copy_rom_2s2h() {
4434 local romdir=" $home /RetroPie/roms/n64"
4535 local destdir=" $md_build /OTRExporter"
@@ -74,12 +64,12 @@ function build_2s2h() {
7464 return 1
7565 fi
7666
77- increase_swap
67+ rpSwap on 2048
7868 cmake -H. -Bbuild-cmake -GNinja
79- cmake --build build-cmake --target ExtractAssets
80- cmake --build build-cmake
69+ cmake --build build-cmake --target ExtractAssets -j4
70+ cmake --build build-cmake -j4
8171 md_ret_require=" $md_build /build-cmake/mm"
82- restore_swap
72+ rpSwap off
8373}
8474
8575function install_2s2h() {
@@ -91,6 +81,7 @@ function install_2s2h() {
9181}
9282
9383function configure_2s2h() {
84+ local launch_prefix=" XINIT-WM:"
9485
9586# Create the boot .sh file
9687 cat > " $md_inst /2s2h.sh" << _EOF_
@@ -126,8 +117,10 @@ _EOF_
126117}
127118_EOF_
128119 chmod +x " $md_inst /2ship2harkinian.json"
129-
130- addPort " $md_id " " 2s2h" " 2ship2harkinian - Majora's Mask" " $md_inst /2s2h.sh"
131-
120+
132121 chown -R $user :$user " $md_inst "
122+
123+ addPort " $md_id " " 2s2h" " 2ship2harkinian - Majora's Mask" " $launch_prefix$md_inst /2s2h.sh"
124+
125+
133126}
0 commit comments