mirror of
https://gitlab.com/Nanolx/patchimage.git
synced 2024-11-28 03:54:22 +01:00
code improvements for MKWiimm
This commit is contained in:
parent
28e2f9148a
commit
6ff30a8ec9
@ -1,3 +1,8 @@
|
||||
v6.2.0:
|
||||
- code improvements for MKWiimm
|
||||
- use ${WIT} instead of wit when checking image region for
|
||||
MKWiimm and Kirbys Adventure Wii
|
||||
|
||||
v6.1.0:
|
||||
- update szs to version 1.50a
|
||||
- update title database
|
||||
|
@ -57,6 +57,9 @@ RMC?25 Wiimms MKW-Fun 2014-04
|
||||
RMC?26 Wiimms MKW-Fun 2014-11
|
||||
RMC?27 Wiimms MKW-Fun 2015-03
|
||||
RMC?28 Wiimms MKW-Fun 2015-05
|
||||
RMC?29 Wiimms MKW-Fun 2015-08
|
||||
RMC?30 Wiimms MKW-Fun 2015-12
|
||||
RMC?31 Wiimms MKW-Fun 2016-02
|
||||
|
||||
### Kirby's Adventure Wii ###
|
||||
|
||||
|
@ -81,7 +81,7 @@ read ID
|
||||
cp -r "${PATCHIMAGE_RIIVOLUTION_DIR}"/hero/* workdir/${PATH_HERO}/
|
||||
fi
|
||||
|
||||
REG=$(gawk '/^SUK/{print $3}' <(wit ll ${IMAGE}))
|
||||
REG=$(gawk '/^SUK/{print $3}' <(${WIT} ll ${IMAGE}))
|
||||
|
||||
case $REG in
|
||||
PAL) REG=P ;;
|
||||
|
@ -57,19 +57,7 @@ wiimmfi () {
|
||||
|
||||
}
|
||||
|
||||
build_mkwiimm () {
|
||||
|
||||
MY_ID=${1}
|
||||
DIST=$(gawk -F \: "/^${MY_ID}/"'{print $2}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm.db)
|
||||
DOWNLOAD=$(gawk -F \: "/^${MY_ID}/"'{print $3}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm.db)
|
||||
FILENAME=$(gawk -F \: "/^${MY_ID}/"'{split($3, a, "/") ; print a[3]}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm.db)
|
||||
|
||||
if [[ ${FILENAME} != mkw* ]]; then
|
||||
echo "wrong ID passed from user-input, exiting."
|
||||
exit 75
|
||||
fi
|
||||
|
||||
rm -rf ${FILENAME/.7z}
|
||||
mkwiimm_distfiles () {
|
||||
|
||||
if [[ -f ${PATCHIMAGE_RIIVOLUTION_DIR}/${FILENAME} ]]; then
|
||||
echo "*** 5) extracting mkwiimm files"
|
||||
@ -87,24 +75,9 @@ build_mkwiimm () {
|
||||
( echo "something went wrong extracting files" && exit 63 )
|
||||
fi
|
||||
|
||||
cd ${FILENAME/.7z}
|
||||
}
|
||||
|
||||
REG=$(gawk '/^RMC/{print $3}' <(wit ll ${IMAGE}))
|
||||
|
||||
ln -s ${IMAGE} .
|
||||
|
||||
case $REG in
|
||||
PAL) REG=P ;;
|
||||
NTSC-J) REG=J ;;
|
||||
NTSC-U) REG=E ;;
|
||||
esac
|
||||
chmod +x *.sh
|
||||
|
||||
if [[ ${MKWIIMM_OVERRIDE_SZS} == "TRUE" ]]; then
|
||||
cp -r ${PATCHIMAGE_SCRIPT_DIR}/../override/* ${PWD}/bin/
|
||||
fi
|
||||
|
||||
if [[ ${MY_ID} -lt 27 ]]; then
|
||||
mkwiimm_build_olddist () {
|
||||
|
||||
if [[ ${MKWIIMM_MSG_LANG} && ${MKWIIMM_OWN_SAVE} ]]; then
|
||||
echo "LANGUAGE=${MKWIIMM_MSG_LANG}
|
||||
@ -119,7 +92,9 @@ PRIV_SAVEGAME=${MKWIIMM_OWN_SAVE}" > ${PWD}/config.def
|
||||
./create-image.sh --dest=${XD}/RMC${REG}${MY_ID}.wbfs || exit 51
|
||||
fi
|
||||
|
||||
else
|
||||
}
|
||||
|
||||
mkwiimm_build_newdist () {
|
||||
|
||||
if [[ ${MKWIIMM_MSG_LANG} && ${MKWIIMM_OWN_SAVE} && ${MKWIIMM_CTRENAME} && ${MKWIIMM_CTREORDER} ]]; then
|
||||
echo "LANGUAGE=${MKWIIMM_MSG_LANG}
|
||||
@ -139,19 +114,51 @@ PRIV_SAVEGAME=${MKWIIMM_OWN_SAVE}" > ${PWD}/config.def
|
||||
./create-image.sh --dest=${XD}/RMC${REG}${MY_ID}.wbfs || exit 51
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
build_mkwiimm () {
|
||||
|
||||
MY_ID=${1}
|
||||
DIST=$(gawk -F \: "/^${MY_ID}/"'{print $2}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm.db)
|
||||
DOWNLOAD=$(gawk -F \: "/^${MY_ID}/"'{print $3}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm.db)
|
||||
FILENAME=$(gawk -F \: "/^${MY_ID}/"'{split($3, a, "/") ; print a[3]}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm.db)
|
||||
|
||||
if [[ ${FILENAME} != mkw* ]]; then
|
||||
echo "wrong ID passed from user-input, exiting."
|
||||
exit 75
|
||||
fi
|
||||
|
||||
rm -rf ${FILENAME/.7z}
|
||||
mkwiimm_distfiles
|
||||
cd ${FILENAME/.7z}
|
||||
|
||||
REG=$(gawk '/^RMC/{print $3}' <(${WIT} ll ${IMAGE}))
|
||||
|
||||
case $REG in
|
||||
PAL) REG=P ;;
|
||||
NTSC-J) REG=J ;;
|
||||
NTSC-U) REG=E ;;
|
||||
esac
|
||||
|
||||
ln -s "${IMAGE}" .
|
||||
chmod +x *.sh
|
||||
|
||||
if [[ ${MKWIIMM_OVERRIDE_SZS} == "TRUE" ]] && cp -r ${PATCHIMAGE_SCRIPT_DIR}/../override/* ${PWD}/bin/
|
||||
|
||||
if [[ ${MY_ID} -lt 27 ]]; then
|
||||
mkwiimm_olddist
|
||||
else mkwiimm_newdist
|
||||
fi
|
||||
|
||||
if [[ ${MY_ID} -lt 23 ]]; then
|
||||
echo "*** 7) patching >${DIST}< to use custom server"
|
||||
wiimmfi ${XD}/RMC${REG}${MY_ID}.wbfs || exit 69
|
||||
wiimmfi ${XD}/RMC${REG}${MY_ID}.wbfs || (echo "something went wrong wiimmfi-ing ${XD}/RMC${REG}${MY_ID}.wbfs" && exit 69)
|
||||
echo "*** 8) storing game"
|
||||
else echo "*** 7) storing game"
|
||||
fi
|
||||
|
||||
cd ${XD}
|
||||
|
||||
if [[ ${MY_ID} -lt 23 ]]; then
|
||||
echo "*** 8) storing game"
|
||||
else echo "*** 7) storing game"
|
||||
fi
|
||||
echo " ${DIST} saved as ${PATCHIMAGE_GAME_DIR}/RMC${REG}${MY_ID}.wbfs"
|
||||
mv RMC${REG}${MY_ID}.wbfs \
|
||||
${PATCHIMAGE_GAME_DIR}/RMC${REG}${MY_ID}.wbfs || exit 51
|
||||
@ -161,6 +168,7 @@ PRIV_SAVEGAME=${MKWIIMM_OWN_SAVE}" > ${PWD}/config.def
|
||||
else
|
||||
echo "*** 8) cleaning up workdir"
|
||||
fi
|
||||
|
||||
rm -rf ${FILENAME/.7z}
|
||||
|
||||
if [[ ${PATCHIMAGE_COVER_DOWNLOAD} == TRUE ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user