Skip to content

Commit 72432b1

Browse files
committed
getting the scripts up to date
needed to merge them before i could apply the fixes. retropieuser is not able to get to a computer to apply the fixes himself
1 parent 3a041c4 commit 72432b1

File tree

2 files changed

+59
-48
lines changed

2 files changed

+59
-48
lines changed

scriptmodules/ports/2s2h.sh

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,23 @@
1313
rp_module_id="2s2h"
1414
rp_module_desc="2s2h - 2ship2harkinian is an advanced source port for The Legend of Zelda - Majora's Mask"
1515
rp_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"
1717
rp_module_section="exp"
1818
rp_module_flags="all"
1919

2020
function 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

2429
function 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-
4333
function 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

8575
function install_2s2h() {
@@ -91,6 +81,7 @@ function install_2s2h() {
9181
}
9282

9383
function 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
}

scriptmodules/ports/soh.sh

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,22 @@
1313
rp_module_id="soh"
1414
rp_module_desc="soh - Ship of Harkinian is an advanced source port for The Legend of Zelda - Ocarina of Time"
1515
rp_module_help="Save your valid PAL .z64 copy of Ocarina of Time and/or Ocarina of Time Master Quest to $romdir/n64"
16-
rp_module_repo="git https://github.com/HarbourMasters/Shipwright 8.0.4"
16+
rp_module_repo="git https://github.com/HarbourMasters/Shipwright develop"
1717
rp_module_section="exp"
1818
rp_module_flags="!all 64bit"
1919

2020
function depends_soh() {
21-
getDepends gcc g++ git cmake ninja-build libglew-dev 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
22-
}
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 libpulse-dev)
24+
25+
getDepends "${depends[@]}"
2326

27+
}
2428
function sources_soh() {
2529
gitPullOrClone
2630
}
2731

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=2048/' /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-
4332
function check_and_copy_rom() {
4433
local romdir="$home/RetroPie/roms/n64"
4534
local destdir="$md_build/OTRExporter"
@@ -74,12 +63,12 @@ function build_soh() {
7463
return 1
7564
fi
7665

77-
increase_swap
66+
rpSwap on 2048
7867
cmake -H. -Bbuild-cmake -GNinja
79-
cmake --build build-cmake --target ExtractAssets
80-
cmake --build build-cmake
68+
cmake --build build-cmake --target ExtractAssets -j3
69+
cmake --build build-cmake-j3
8170
md_ret_require="$md_build/build-cmake/soh"
82-
restore_swap
71+
rpSwap off
8372
}
8473

8574
function install_soh() {
@@ -91,17 +80,46 @@ function install_soh() {
9180
}
9281

9382
function configure_soh() {
83+
local launch_prefix="XINIT-WM:"
9484

9585
cat > "$md_inst/soh.sh" << _EOF_
9686
#!/bin/bash
9787
9888
# Change directory
99-
cd "$md_conf_root/soh" || exit
89+
cd "$md_inst" || exit
10090
10191
# Run the soh.elf file
10292
./soh.elf
10393
_EOF_
94+
10495
chmod +x "$md_inst/soh.sh"
10596

106-
addPort "$md_id" "soh" "Ship of Harkinian - Ocarina of Time" "XINIT-WM:$md_inst/soh.sh"
97+
# Create the config file to default to fullscreen
98+
cat > "$md_inst/shipofharkinian.json" << _EOF_
99+
100+
{
101+
"Window": {
102+
"AudioBackend": "sdl",
103+
"Backend": {
104+
"Id": 3,
105+
"Name": "OpenGL"
106+
},
107+
"Fullscreen": {
108+
"Enabled": true,
109+
"Height": 1080,
110+
"Width": 1920
111+
},
112+
"Height": 1080,
113+
"PositionX": 0,
114+
"PositionY": 0,
115+
"Width": 1920
116+
}
117+
118+
}
119+
_EOF_
120+
chmod +x "$md_inst/shipofharkinian.json"
121+
122+
chown -R $user:$user "$md_inst"
123+
124+
addPort "$md_id" "soh" "Ship of Harkinian - Ocarina of Time" "$launch_prefix$md_inst/soh.sh"
107125
}

0 commit comments

Comments
 (0)