diff --git a/ChangeLog b/ChangeLog index 10f09a1..6d393e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -40,6 +40,9 @@ v7.0.0: - when downloading covers for Wii games fail, retry with the US cover - don't re-download covers that already exist - don't re-download soundtracks that already exist +- for NSMBW character mods, Mario Kart Wii font, item and kart mods, + don't download the files from the interwebs, instead use files supplied + and installed with patchimage ::game additions diff --git a/Makefile b/Makefile index 8c674d6..97c82d9 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ all: install: mkdir -p $(DESTDIR)/usr/bin/ mkdir -p $(DESTDIR)/usr/share/patchimage/ - cp -rv patches tools override script.d $(DESTDIR)/usr/share/patchimage/ + cp -rv data database override patches script.d tools $(DESTDIR)/usr/share/patchimage/ install -m755 patchimage.sh $(DESTDIR)/usr/bin/patchimage uninstall: diff --git a/server/mkwiimm_fonts/cbc.szs b/data/mkwiimm_fonts/cbc.szs similarity index 100% rename from server/mkwiimm_fonts/cbc.szs rename to data/mkwiimm_fonts/cbc.szs diff --git a/server/mkwiimm_fonts/cbf.szs b/data/mkwiimm_fonts/cbf.szs similarity index 100% rename from server/mkwiimm_fonts/cbf.szs rename to data/mkwiimm_fonts/cbf.szs diff --git a/server/mkwiimm_fonts/dky.szs b/data/mkwiimm_fonts/dky.szs similarity index 100% rename from server/mkwiimm_fonts/dky.szs rename to data/mkwiimm_fonts/dky.szs diff --git a/server/mkwiimm_fonts/drk.szs b/data/mkwiimm_fonts/drk.szs similarity index 100% rename from server/mkwiimm_fonts/drk.szs rename to data/mkwiimm_fonts/drk.szs diff --git a/server/mkwiimm_fonts/mvb.szs b/data/mkwiimm_fonts/mvb.szs similarity index 100% rename from server/mkwiimm_fonts/mvb.szs rename to data/mkwiimm_fonts/mvb.szs diff --git a/server/mkwiimm_fonts/rpp.szs b/data/mkwiimm_fonts/rpp.szs similarity index 100% rename from server/mkwiimm_fonts/rpp.szs rename to data/mkwiimm_fonts/rpp.szs diff --git a/server/mkwiimm_fonts/spp.szs b/data/mkwiimm_fonts/spp.szs similarity index 100% rename from server/mkwiimm_fonts/spp.szs rename to data/mkwiimm_fonts/spp.szs diff --git a/server/mkwiimm_items/bbb.brres b/data/mkwiimm_items/bbb.brres similarity index 100% rename from server/mkwiimm_items/bbb.brres rename to data/mkwiimm_items/bbb.brres diff --git a/server/mkwiimm_items/blk.brres b/data/mkwiimm_items/blk.brres similarity index 100% rename from server/mkwiimm_items/blk.brres rename to data/mkwiimm_items/blk.brres diff --git a/server/mkwiimm_items/blp.brres b/data/mkwiimm_items/blp.brres similarity index 100% rename from server/mkwiimm_items/blp.brres rename to data/mkwiimm_items/blp.brres diff --git a/server/mkwiimm_items/boo.brres b/data/mkwiimm_items/boo.brres similarity index 100% rename from server/mkwiimm_items/boo.brres rename to data/mkwiimm_items/boo.brres diff --git a/server/mkwiimm_items/bss.brres b/data/mkwiimm_items/bss.brres similarity index 100% rename from server/mkwiimm_items/bss.brres rename to data/mkwiimm_items/bss.brres diff --git a/server/mkwiimm_items/buk.brres b/data/mkwiimm_items/buk.brres similarity index 100% rename from server/mkwiimm_items/buk.brres rename to data/mkwiimm_items/buk.brres diff --git a/server/mkwiimm_items/bwc.brres b/data/mkwiimm_items/bwc.brres similarity index 100% rename from server/mkwiimm_items/bwc.brres rename to data/mkwiimm_items/bwc.brres diff --git a/server/mkwiimm_items/bye.brres b/data/mkwiimm_items/bye.brres similarity index 100% rename from server/mkwiimm_items/bye.brres rename to data/mkwiimm_items/bye.brres diff --git a/server/mkwiimm_items/cpb.brres b/data/mkwiimm_items/cpb.brres similarity index 100% rename from server/mkwiimm_items/cpb.brres rename to data/mkwiimm_items/cpb.brres diff --git a/server/mkwiimm_items/cpk.brres b/data/mkwiimm_items/cpk.brres similarity index 100% rename from server/mkwiimm_items/cpk.brres rename to data/mkwiimm_items/cpk.brres diff --git a/server/mkwiimm_items/cpp.brres b/data/mkwiimm_items/cpp.brres similarity index 100% rename from server/mkwiimm_items/cpp.brres rename to data/mkwiimm_items/cpp.brres diff --git a/server/mkwiimm_items/dbk.brres b/data/mkwiimm_items/dbk.brres similarity index 100% rename from server/mkwiimm_items/dbk.brres rename to data/mkwiimm_items/dbk.brres diff --git a/server/mkwiimm_items/dkw.brres b/data/mkwiimm_items/dkw.brres similarity index 100% rename from server/mkwiimm_items/dkw.brres rename to data/mkwiimm_items/dkw.brres diff --git a/server/mkwiimm_items/fnl.brres b/data/mkwiimm_items/fnl.brres similarity index 100% rename from server/mkwiimm_items/fnl.brres rename to data/mkwiimm_items/fnl.brres diff --git a/server/mkwiimm_items/grp.brres b/data/mkwiimm_items/grp.brres similarity index 100% rename from server/mkwiimm_items/grp.brres rename to data/mkwiimm_items/grp.brres diff --git a/server/mkwiimm_items/gth.brres b/data/mkwiimm_items/gth.brres similarity index 100% rename from server/mkwiimm_items/gth.brres rename to data/mkwiimm_items/gth.brres diff --git a/server/mkwiimm_items/gyb.brres b/data/mkwiimm_items/gyb.brres similarity index 100% rename from server/mkwiimm_items/gyb.brres rename to data/mkwiimm_items/gyb.brres diff --git a/server/mkwiimm_items/hob.brres b/data/mkwiimm_items/hob.brres similarity index 100% rename from server/mkwiimm_items/hob.brres rename to data/mkwiimm_items/hob.brres diff --git a/server/mkwiimm_items/kww.brres b/data/mkwiimm_items/kww.brres similarity index 100% rename from server/mkwiimm_items/kww.brres rename to data/mkwiimm_items/kww.brres diff --git a/server/mkwiimm_items/lat.brres b/data/mkwiimm_items/lat.brres similarity index 100% rename from server/mkwiimm_items/lat.brres rename to data/mkwiimm_items/lat.brres diff --git a/server/mkwiimm_items/nmm.brres b/data/mkwiimm_items/nmm.brres similarity index 100% rename from server/mkwiimm_items/nmm.brres rename to data/mkwiimm_items/nmm.brres diff --git a/server/mkwiimm_items/ork.brres b/data/mkwiimm_items/ork.brres similarity index 100% rename from server/mkwiimm_items/ork.brres rename to data/mkwiimm_items/ork.brres diff --git a/server/mkwiimm_items/pik.brres b/data/mkwiimm_items/pik.brres similarity index 100% rename from server/mkwiimm_items/pik.brres rename to data/mkwiimm_items/pik.brres diff --git a/server/mkwiimm_items/puk.brres b/data/mkwiimm_items/puk.brres similarity index 100% rename from server/mkwiimm_items/puk.brres rename to data/mkwiimm_items/puk.brres diff --git a/server/mkwiimm_items/rep.brres b/data/mkwiimm_items/rep.brres similarity index 100% rename from server/mkwiimm_items/rep.brres rename to data/mkwiimm_items/rep.brres diff --git a/server/mkwiimm_items/rkw.brres b/data/mkwiimm_items/rkw.brres similarity index 100% rename from server/mkwiimm_items/rkw.brres rename to data/mkwiimm_items/rkw.brres diff --git a/server/mkwiimm_items/rmm.brres b/data/mkwiimm_items/rmm.brres similarity index 100% rename from server/mkwiimm_items/rmm.brres rename to data/mkwiimm_items/rmm.brres diff --git a/server/mkwiimm_items/rtc.brres b/data/mkwiimm_items/rtc.brres similarity index 100% rename from server/mkwiimm_items/rtc.brres rename to data/mkwiimm_items/rtc.brres diff --git a/server/mkwiimm_items/rth.brres b/data/mkwiimm_items/rth.brres similarity index 100% rename from server/mkwiimm_items/rth.brres rename to data/mkwiimm_items/rth.brres diff --git a/server/mkwiimm_items/snk.brres b/data/mkwiimm_items/snk.brres similarity index 100% rename from server/mkwiimm_items/snk.brres rename to data/mkwiimm_items/snk.brres diff --git a/server/mkwiimm_items/tuk.brres b/data/mkwiimm_items/tuk.brres similarity index 100% rename from server/mkwiimm_items/tuk.brres rename to data/mkwiimm_items/tuk.brres diff --git a/server/mkwiimm_items/udk.brres b/data/mkwiimm_items/udk.brres similarity index 100% rename from server/mkwiimm_items/udk.brres rename to data/mkwiimm_items/udk.brres diff --git a/server/mkwiimm_items/whk.brres b/data/mkwiimm_items/whk.brres similarity index 100% rename from server/mkwiimm_items/whk.brres rename to data/mkwiimm_items/whk.brres diff --git a/server/mkwiimm_items/wik.brres b/data/mkwiimm_items/wik.brres similarity index 100% rename from server/mkwiimm_items/wik.brres rename to data/mkwiimm_items/wik.brres diff --git a/server/mkwiimm_items/wpb.brres b/data/mkwiimm_items/wpb.brres similarity index 100% rename from server/mkwiimm_items/wpb.brres rename to data/mkwiimm_items/wpb.brres diff --git a/server/mkwiimm_items/yek.brres b/data/mkwiimm_items/yek.brres similarity index 100% rename from server/mkwiimm_items/yek.brres rename to data/mkwiimm_items/yek.brres diff --git a/server/mkwiimm_karts/20p.szs b/data/mkwiimm_karts/20p.szs similarity index 100% rename from server/mkwiimm_karts/20p.szs rename to data/mkwiimm_karts/20p.szs diff --git a/server/mkwiimm_karts/btc.szs b/data/mkwiimm_karts/btc.szs similarity index 100% rename from server/mkwiimm_karts/btc.szs rename to data/mkwiimm_karts/btc.szs diff --git a/server/mkwiimm_karts/cpt.szs b/data/mkwiimm_karts/cpt.szs similarity index 100% rename from server/mkwiimm_karts/cpt.szs rename to data/mkwiimm_karts/cpt.szs diff --git a/server/mkwiimm_karts/dbj.szs b/data/mkwiimm_karts/dbj.szs similarity index 100% rename from server/mkwiimm_karts/dbj.szs rename to data/mkwiimm_karts/dbj.szs diff --git a/server/mkwiimm_karts/dks.szs b/data/mkwiimm_karts/dks.szs similarity index 100% rename from server/mkwiimm_karts/dks.szs rename to data/mkwiimm_karts/dks.szs diff --git a/server/mkwiimm_karts/fmc.szs b/data/mkwiimm_karts/fmc.szs similarity index 100% rename from server/mkwiimm_karts/fmc.szs rename to data/mkwiimm_karts/fmc.szs diff --git a/server/mkwiimm_karts/jof.szs b/data/mkwiimm_karts/jof.szs similarity index 100% rename from server/mkwiimm_karts/jof.szs rename to data/mkwiimm_karts/jof.szs diff --git a/server/mkwiimm_karts/jth.szs b/data/mkwiimm_karts/jth.szs similarity index 100% rename from server/mkwiimm_karts/jth.szs rename to data/mkwiimm_karts/jth.szs diff --git a/server/mkwiimm_karts/lin.szs b/data/mkwiimm_karts/lin.szs similarity index 100% rename from server/mkwiimm_karts/lin.szs rename to data/mkwiimm_karts/lin.szs diff --git a/server/mkwiimm_karts/luc.szs b/data/mkwiimm_karts/luc.szs similarity index 100% rename from server/mkwiimm_karts/luc.szs rename to data/mkwiimm_karts/luc.szs diff --git a/server/mkwiimm_karts/mid.szs b/data/mkwiimm_karts/mid.szs similarity index 100% rename from server/mkwiimm_karts/mid.szs rename to data/mkwiimm_karts/mid.szs diff --git a/server/mkwiimm_karts/pbb.szs b/data/mkwiimm_karts/pbb.szs similarity index 100% rename from server/mkwiimm_karts/pbb.szs rename to data/mkwiimm_karts/pbb.szs diff --git a/server/mkwiimm_karts/ren.szs b/data/mkwiimm_karts/ren.szs similarity index 100% rename from server/mkwiimm_karts/ren.szs rename to data/mkwiimm_karts/ren.szs diff --git a/server/mkwiimm_karts/sth.szs b/data/mkwiimm_karts/sth.szs similarity index 100% rename from server/mkwiimm_karts/sth.szs rename to data/mkwiimm_karts/sth.szs diff --git a/server/nsmbw_characters/blu.arc b/data/nsmbw_characters/blu.arc similarity index 100% rename from server/nsmbw_characters/blu.arc rename to data/nsmbw_characters/blu.arc diff --git a/server/nsmbw_characters/bma.arc b/data/nsmbw_characters/bma.arc similarity index 100% rename from server/nsmbw_characters/bma.arc rename to data/nsmbw_characters/bma.arc diff --git a/server/nsmbw_characters/br2.arc b/data/nsmbw_characters/br2.arc similarity index 100% rename from server/nsmbw_characters/br2.arc rename to data/nsmbw_characters/br2.arc diff --git a/server/nsmbw_characters/clt.arc b/data/nsmbw_characters/clt.arc similarity index 100% rename from server/nsmbw_characters/clt.arc rename to data/nsmbw_characters/clt.arc diff --git a/server/nsmbw_characters/drk.arc b/data/nsmbw_characters/drk.arc similarity index 100% rename from server/nsmbw_characters/drk.arc rename to data/nsmbw_characters/drk.arc diff --git a/server/nsmbw_characters/dry.arc b/data/nsmbw_characters/dry.arc similarity index 100% rename from server/nsmbw_characters/dry.arc rename to data/nsmbw_characters/dry.arc diff --git a/server/nsmbw_characters/gik.arc b/data/nsmbw_characters/gik.arc similarity index 100% rename from server/nsmbw_characters/gik.arc rename to data/nsmbw_characters/gik.arc diff --git a/server/nsmbw_characters/sam.arc b/data/nsmbw_characters/sam.arc similarity index 100% rename from server/nsmbw_characters/sam.arc rename to data/nsmbw_characters/sam.arc diff --git a/server/nsmbw_characters/sco.arc b/data/nsmbw_characters/sco.arc similarity index 100% rename from server/nsmbw_characters/sco.arc rename to data/nsmbw_characters/sco.arc diff --git a/server/nsmbw_characters/shg.arc b/data/nsmbw_characters/shg.arc similarity index 100% rename from server/nsmbw_characters/shg.arc rename to data/nsmbw_characters/shg.arc diff --git a/server/nsmbw_characters/son.arc b/data/nsmbw_characters/son.arc similarity index 100% rename from server/nsmbw_characters/son.arc rename to data/nsmbw_characters/son.arc diff --git a/script.d/mkwii/mkwiimm_fonts.sh b/script.d/mkwii/mkwiimm_fonts.sh index 9843903..5398ab7 100644 --- a/script.d/mkwii/mkwiimm_fonts.sh +++ b/script.d/mkwii/mkwiimm_fonts.sh @@ -2,7 +2,6 @@ GAME_TYPE="MKWIIMM" GAME_NAME="Mario Kart Wiimm" -ITEMS_BASE="http://riivolution.nanolx.org/mkwiimm_fonts" FSZS="files/Scene/UI/Font.szs" show_notes () { @@ -46,12 +45,9 @@ orig Original Mario Kart Wii Font" read FONT if [[ ${FONT} != orig ]]; then - if [[ ! -f ${PATCHIMAGE_RIIVOLUTION_DIR}/mkwiimm_font_${FONT} ]]; then - wget -O ${PATCHIMAGE_RIIVOLUTION_DIR}/mkwiimm_font_${FONT} \ - ${ITEMS_BASE}/${FONT} &>/dev/null \ - || (echo "download of ${FONT} failed." \ - && rm ${PATCHIMAGE_RIIVOLUTION_DIR}/${FONT} \ - && exit 57) + if [[ ! -f ${PATCHIMAGE_DATA_DIR}/mkwiimm_fonts/${FONT} ]]; then + echo "Font ${FONT} unknown" + exit 75 fi fi @@ -73,7 +69,7 @@ build_mkwiimm () { fi echo "*** 7) replacing font" - cp "${PATCHIMAGE_RIIVOLUTION_DIR}"/mkwiimm_font_${FONT} workdir/${FSZS} + cp "${PATCHIMAGE_DATA_DIR}"/mkwiimm_fonts/${FONT} workdir/${FSZS} echo "*** 8) rebuilding game" echo " (storing game in ${PATCHIMAGE_GAME_DIR}/${ID})" diff --git a/script.d/mkwii/mkwiimm_items.sh b/script.d/mkwii/mkwiimm_items.sh index 9445c47..d9c84df 100644 --- a/script.d/mkwii/mkwiimm_items.sh +++ b/script.d/mkwii/mkwiimm_items.sh @@ -2,7 +2,6 @@ GAME_TYPE="MKWIIMM" GAME_NAME="Mario Kart Wiimm" -ITEMS_BASE="http://riivolution.nanolx.org/mkwiimm_items" CSZS="files/Race/Common.szs" CSZD="files/Race/Common.d" @@ -93,11 +92,9 @@ download_items () { for item in ${choosenitems[@]}; do id=${item/*:} - if [[ ! -f ${PATCHIMAGE_RIIVOLUTION_DIR}/mkwiimm_item_${id} ]]; then - wget -O ${PATCHIMAGE_RIIVOLUTION_DIR}/mkwiimm_item_${id} \ - ${ITEMS_BASE}/${id} &>/dev/null \ - || (echo "download of ${id} failed." \ - && rm ${PATCHIMAGE_RIIVOLUTION_DIR}/${id}) + if [[ ! -f ${PATCHIMAGE_DATA_DIR}/mkwiimm_items/${id} ]]; then + echo "unknown Item ${item}" + exit 75 fi done @@ -132,10 +129,8 @@ build_mkwiimm () { for item in ${choosenitems[@]}; do slot=${item/:*} newi=${item/*:} - if [[ -f ${PATCHIMAGE_RIIVOLUTION_DIR}/mkwiimm_item_${newi} ]]; then - cp ${PATCHIMAGE_RIIVOLUTION_DIR}/mkwiimm_item_${newi} \ - workdir/${CSZD}/${slot} - fi + cp ${PATCHIMAGE_DATA_DIR}/mkwiimm_items/${newi} \ + workdir/${CSZD}/${slot} done ${SZS} create -o workdir/${CSZD} -q || \ ( echo "szs caught an error rebuilding common.szs" && exit 51 ) diff --git a/script.d/mkwii/mkwiimm_karts.sh b/script.d/mkwii/mkwiimm_karts.sh index 096d13f..48e2370 100644 --- a/script.d/mkwii/mkwiimm_karts.sh +++ b/script.d/mkwii/mkwiimm_karts.sh @@ -2,7 +2,6 @@ GAME_TYPE="MKWIIMM" GAME_NAME="Mario Kart Wiimm" -ITEMS_BASE="http://riivolution.nanolx.org/mkwiimm_karts" show_notes () { @@ -70,12 +69,9 @@ download_wiimm () { read KART for kart in ${KART[@]}; do - if [[ ! -f ${PATCHIMAGE_RIIVOLUTION_DIR}/mkwiimm_kart_${kart} ]]; then - wget -O ${PATCHIMAGE_RIIVOLUTION_DIR}/mkwiimm_kart_${kart} \ - ${ITEMS_BASE}/${kart} &>/dev/null \ - || (echo "download of ${kart} failed." \ - && rm ${PATCHIMAGE_RIIVOLUTION_DIR}/${KART} \ - && exit 57) + if [[ ! -f ${PATCHIMAGE_DATA_DIR}/mkwiimm_karts/${kart} ]]; then + echo "unknown Kart ${kart}" + exit 75 fi done ask_slot @@ -109,11 +105,11 @@ build_mkwiimm () { source=${kart/*:} dest=${kart/:*} echo " old: ${dest}.szs new: ${source}" - cp "${PATCHIMAGE_RIIVOLUTION_DIR}"/mkwiimm_kart_${source} \ + cp "${PATCHIMAGE_DATA_DIR}"/mkwiimm_karts/${source} \ workdir/files/Race/Kart/${dest}.szs - cp "${PATCHIMAGE_RIIVOLUTION_DIR}"/mkwiimm_kart_${source} \ + cp "${PATCHIMAGE_DATA_DIR}"/mkwiimm_karts/${source} \ workdir/files/Race/Kart/${dest}_2.szs - cp "${PATCHIMAGE_RIIVOLUTION_DIR}"/mkwiimm_kart_${source} \ + cp "${PATCHIMAGE_DATA_DIR}"/mkwiimm_karts/${source} \ workdir/files/Race/Kart/${dest}_4.szs done diff --git a/script.d/nsmbw/nsmbw_characters.sh b/script.d/nsmbw/nsmbw_characters.sh index 8dd29bd..5372c4f 100644 --- a/script.d/nsmbw/nsmbw_characters.sh +++ b/script.d/nsmbw/nsmbw_characters.sh @@ -2,7 +2,6 @@ GAME_TYPE="WII_GENERIC" GAME_NAME="New Super Mario Bros. Wii" -ITEMS_BASE="http://riivolution.nanolx.org/nsmbw_characters" show_notes () { @@ -56,12 +55,9 @@ pi_action () { read PLAYERS for player in ${PLAYERS[@]}; do - if [[ ! -f ${PATCHIMAGE_RIIVOLUTION_DIR}/nsmbw_player_${player} ]]; then - wget -O ${PATCHIMAGE_RIIVOLUTION_DIR}/nsmbw_player_${player} \ - ${ITEMS_BASE}/${player} &>/dev/null \ - || (echo "download of ${player} failed." \ - && rm ${PATCHIMAGE_RIIVOLUTION_DIR}/${player} \ - && exit 57) + if [[ ! -f "${PATCHIMAGE_DATA_DIR}"/nsmbw_characters/${player} ]]; then + echo "unkown character ${player}" + exit 75 fi slot=$(gawk -F \: "/^${player}/"'{print $2}' ${PATCHIMAGE_DATABASE_DIR}/nsmbw_characters.db) choosenplayers=( ${choosenplayers[@]} ${player}:${slot} ) @@ -88,7 +84,7 @@ pi_action () { echo "*** 5) replacing characters" for player in ${choosenplayers[@]}; do - cp "${PATCHIMAGE_RIIVOLUTION_DIR}"/nsmbw_player_${player/:*} \ + cp "${PATCHIMAGE_DATA_DIR}"/nsmbw_characters/${player/:*} \ workdir/files/Object/${player/*:} done