mirror of
https://gitlab.com/Nanolx/patchimage.git
synced 2024-11-28 03:54:22 +01:00
add support for custom banners/download custom banners
pass --tt-id to wit improved cleanup
This commit is contained in:
parent
4ba23e12d6
commit
39b574b972
@ -59,6 +59,8 @@ case ${GAME_TYPE} in
|
||||
|
||||
detect_game_version
|
||||
place_files
|
||||
download_banner
|
||||
apply_banner
|
||||
|
||||
prepare_xml
|
||||
${WIT} dolpatch ${DOL} xml="${XML_FILE}" --source "${XML_SOURCE}" -q
|
||||
|
@ -11,6 +11,7 @@ GAMENAME="Another Super Mario Brothers Wii 2.0"
|
||||
XML_SOURCE="${RIIVOLUTION_DIR}"
|
||||
XML_FILE="Riivolution/Another.xml"
|
||||
GAME_TYPE=RIIVOLUTION
|
||||
BANNER_LOCATION=${WORKDIR}/files/opening.bnr
|
||||
|
||||
show_notes () {
|
||||
|
||||
@ -68,6 +69,7 @@ detect_game_version () {
|
||||
fi
|
||||
|
||||
GAMEID=SMN${REG_LETTER}05
|
||||
CUSTOM_BANNER=http://dl.dropboxusercontent.com/u/101209384/${GAMEID}.bnr
|
||||
|
||||
if [[ ${VERSION} == "EURv2" || ${VERSION} == "JPNv*" ]]; then
|
||||
echo -e "Version ${VERSION} is not supported!"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
TMD_OPTS="--ticket-id=K --tmd-id=K"
|
||||
TMD_OPTS="--tt-id=K"
|
||||
TMP_FILES=(Another Another_Super_Mario_Brothers_Wii_2.0.zip nsmb.d Newer_Super_Mario_Bros._Wii_HS.zip XmasNewer NewerSMBW.zip NewerFiles "Newer Summer Sun" Newer_Summer_Sun.zip ZPW_1.1.ips lozpw110.rar "*[Ll]ink*[Pp]ast*smc")
|
||||
|
||||
setup_tools () {
|
||||
@ -26,7 +26,7 @@ cleanup_prebuild () {
|
||||
|
||||
cleanup () {
|
||||
|
||||
rm -rf ${TMP_FILES[@]}
|
||||
rm -rf ${TMP_FILES[@]} *.wbfs *.bnr
|
||||
|
||||
}
|
||||
|
||||
@ -67,6 +67,29 @@ download_soundtrack () {
|
||||
|
||||
}
|
||||
|
||||
download_banner () {
|
||||
|
||||
if [[ ${DL_BANNER} == "TRUE" ]]; then
|
||||
if [[ ${CUSTOM_BANNER} ]]; then
|
||||
wget "${CUSTOM_BANNER}" -O ${GAMEID}-custom-banner.bnr
|
||||
BANNER=${GAMEID}-custom-banner.bnr
|
||||
else
|
||||
echo "no custom banner for ${GAMENAME} available, not modifying"
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
apply_banner () {
|
||||
|
||||
if [[ -e ${BANNER} ]]; then
|
||||
cp "${BANNER}" "${BANNER_LOCATION}"
|
||||
else
|
||||
echo "specified banner ${BANNER} does not exist, not modifying"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
check_input_image () {
|
||||
|
||||
if [[ ! ${IMAGE} ]]; then
|
||||
@ -221,6 +244,19 @@ while [[ $xcount -lt $pcount ]]; do
|
||||
exit $?
|
||||
;;
|
||||
|
||||
--banner=* )
|
||||
BANNER=${1/*=}
|
||||
BANNER_EXT=${BANNER//*./}
|
||||
if [[ ${BANNER_EXT} != "bnr" ]]; then
|
||||
echo "given banner (${BANNER}) is not a .bnr file!"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
--download-banner )
|
||||
DL_BANNER=TRUE
|
||||
;;
|
||||
|
||||
"" | --help )
|
||||
echo -e "create wbfs images from riivolution patches.\n
|
||||
***** using this script is only allowed, if you own an original copy of the game.
|
||||
@ -234,7 +270,9 @@ while [[ $xcount -lt $pcount ]]; do
|
||||
--sharesave | let modified game share savegame with original game
|
||||
--clean | cleanup the build-directory
|
||||
--download | download riivolution patchfiles
|
||||
--soundtrack | download soundtrack (if available) and exit"
|
||||
--soundtrack | download soundtrack (if available) and exit
|
||||
--banner=<banner.bnr> | use a custom banner (riivolution games)
|
||||
--download-banner | download a custom banner (if available)"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
@ -11,6 +11,7 @@ GAMENAME="Newer: Holiday Special"
|
||||
XML_SOURCE="${RIIVOLUTION_DIR}"
|
||||
XML_FILE="riivolution/Xmas"
|
||||
GAME_TYPE=RIIVOLUTION
|
||||
BANNER_LOCATION=${WORKDIR}/files/opening.bnr
|
||||
|
||||
show_notes () {
|
||||
|
||||
@ -69,6 +70,7 @@ detect_game_version () {
|
||||
|
||||
XML_FILE="${XML_FILE}"${REG_LETTER}.xml
|
||||
GAMEID=SMN${REG_LETTER}07
|
||||
CUSTOM_BANNER=http://dl.dropboxusercontent.com/u/101209384/${GAMEID}.bnr
|
||||
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,9 @@ GAMENAME="Newer SMB"
|
||||
XML_SOURCE="${RIIVOLUTION_DIR}"/NewerSMBW/
|
||||
XML_FILE="${RIIVOLUTION_DIR}"/riivolution/NewerSMBW.xml
|
||||
GAME_TYPE=RIIVOLUTION
|
||||
BANNER_LOCATION=${WORKDIR}/files/opening.bnr
|
||||
|
||||
}
|
||||
|
||||
show_notes () {
|
||||
|
||||
@ -67,6 +70,7 @@ detect_game_version () {
|
||||
fi
|
||||
|
||||
GAMEID=SMN${REG_LETTER}03
|
||||
CUSTOM_BANNER=http://dl.dropboxusercontent.com/u/101209384/${GAMEID}.bnr
|
||||
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@ GAMENAME="Newer Summer Sun"
|
||||
XML_SOURCE="${RIIVOLUTION_DIR}"/SumSun/
|
||||
XML_FILE="${RIIVOLUTION_DIR}"/riivolution/SumSun
|
||||
GAME_TYPE=RIIVOLUTION
|
||||
BANNER_LOCATION=${WORKDIR}/files/opening.bnr
|
||||
|
||||
show_notes () {
|
||||
|
||||
@ -68,6 +69,7 @@ detect_game_version () {
|
||||
|
||||
XML_FILE="${XML_FILE}"${REG_LETTER}.xml
|
||||
GAMEID=SMN${REG_LETTER}06
|
||||
CUSTOM_BANNER=http://dl.dropboxusercontent.com/u/101209384/${GAMEID}.bnr
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user