2014-05-11 19:28:08 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
DOWNLOAD_LINK="http://download.wiimm.de/wiimmfi/mkw-wiimmfi-patcher.7z"
|
|
|
|
GAME_TYPE="MKWIIMM"
|
2014-05-11 19:49:57 +02:00
|
|
|
GAME_NAME="Mario Kart Wiimmfi"
|
2014-05-11 19:28:08 +02:00
|
|
|
|
|
|
|
show_notes () {
|
|
|
|
|
|
|
|
echo -e \
|
|
|
|
"************************************************
|
|
|
|
${GAMENAME}
|
|
|
|
|
|
|
|
Patches Mario Kart Wii to use Wiimm's custom server
|
|
|
|
|
|
|
|
Source: http://wiiki.wii-homebrew.com/Wiimmfi-Patcher
|
|
|
|
Base Image: Mario Kart Wii (RMC?01)
|
|
|
|
Supported Versions: EUR, JAP, USA
|
|
|
|
************************************************"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
check_input_image_special () {
|
|
|
|
|
|
|
|
check_input_image_mkwiimm
|
2014-05-11 21:57:19 +02:00
|
|
|
ask_input_image_mkwiimm ${IMAGE%/*}
|
|
|
|
echo -e "type ALL or RMC???.wbfs:\n"
|
|
|
|
read ID
|
2014-05-11 19:28:08 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
download_wiimm () {
|
|
|
|
|
|
|
|
mkdir -p "${HOME}/.patchimage/tools/"
|
|
|
|
cd ${HOME}/.patchimage/tools
|
|
|
|
rm -rf wiimmfi-patcher/ *.7z*
|
|
|
|
wget "${DOWNLOAD_LINK}"
|
|
|
|
${UNP} mkw-wiimmfi-patcher.7z >/dev/null
|
|
|
|
mv mkw-wiimmfi-patcher*/ wiimmfi-patcher
|
|
|
|
chmod +x wiimmfi-patcher/*.sh
|
|
|
|
rm *.7z
|
|
|
|
}
|
|
|
|
|
|
|
|
patch_wiimm () {
|
|
|
|
|
|
|
|
cd ${HOME}/.patchimage/tools/wiimmfi-patcher/
|
2014-05-11 21:57:19 +02:00
|
|
|
|
|
|
|
if [[ ${ID} == ALL ]]; then
|
|
|
|
for image in ${IMAGE%/*}/RMC???.{iso,wbfs}; do
|
|
|
|
if [[ -e ${image} ]]; then
|
2014-05-14 20:35:43 +02:00
|
|
|
ln -s "${image}" .
|
2014-05-11 21:57:19 +02:00
|
|
|
fi
|
|
|
|
done
|
2014-05-14 20:35:43 +02:00
|
|
|
|
|
|
|
./create-image.sh >/dev/null
|
|
|
|
mv -v ./wiimmfi-images/* "${PATCHIMAGE_GAME_DIR}"/
|
|
|
|
|
2014-05-11 21:57:19 +02:00
|
|
|
else
|
2014-05-13 17:49:00 +02:00
|
|
|
if [[ ! -f ${IMAGE%/*}/${ID} ]]; then
|
|
|
|
echo "unvalid game passed from user-input. exit"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2014-05-14 20:35:43 +02:00
|
|
|
ln -s ${IMAGE%/*}/${ID} .
|
2014-05-11 21:57:19 +02:00
|
|
|
./create-image.sh >/dev/null
|
|
|
|
mv -v ./wiimmfi-images/${ID} "${PATCHIMAGE_GAME_DIR}"/
|
|
|
|
fi
|
|
|
|
|
2014-05-11 19:28:08 +02:00
|
|
|
rm -rf ${HOME}/.patchimage/tools/wiimfi-patcher/
|
|
|
|
}
|