- add PATCHIMAGE_DATABASE_DIR new internal variable

- add PATCHIMAGE_OVERRIDE_DIR new internal variable
- shift around some paths
- update database with New Super Mario Bros. Wii mods
This commit is contained in:
Christopher Roy Bratusek 2016-08-04 20:28:09 +02:00
parent e3d0c302b4
commit 79e9767068
52 changed files with 74 additions and 63 deletions

View File

@ -1,9 +1,12 @@
v7.0.0:
::internal changes
- add PATCHIMAGE_DIR new internal variable
- add PATCHIMAGE_DATABASE_DIR new internal variable
- add PATCHIMAGE_OVERRIDE_DIR new internal variable
- add UNP_EXTRA_ARGS new internal variable
- make check_input_rom search in both ${PATCHIMAGE_3DS_DIR} and ${PWD}
- make check_input_rom a common.sh function, prevent duplicated code
- shift around some paths
- update database with New Super Mario Bros. Wii mods
::bug fixes
- before creating any of the directories defined in ${HOME}/.patchimage.rc
@ -31,6 +34,7 @@ v7.0.0:
- now includes expected filenames
::misc. changes
- make check_input_rom search in both ${PATCHIMAGE_3DS_DIR} and ${PWD}
- show full path for Hans Files for all games, instead of relative
- only show path to Hans files if they exist
- when downloading covers for Wii games fail, retry with the US cover

View File

@ -1,5 +1,4 @@
SLF*01:NSMBW3 The Final Levels
SMN*01:Original New Super Mario Bros. Wii
SLF?01:NSMBW3: The Final Levels
SMN*03:Newer Super Mario Bros. Wii
SMN*04:Canon Super Mario Bros. Wii
SMN*05:Another Super Mario Bros. Wii
@ -11,13 +10,17 @@ SMN*11:New Super Mario Bros. 4
SMN*12:Awesomer Super Luigi Mini
SMN*31:New Super Mario Bros. Wii - Other World
SMN*41:Devil Mario Winter Special
SMN*60:Remixed Super Mario Bros. Wii
SMN*65:Ghostly Super Ghost Boos. Wii
SMN*66:The Legend of Yoshi
SMN*69:Revised Super Mario Bros. Wii
SMN*DU:DarkUmbra Super Mario Bros: Anniversary Edition
SMN*FL:Newer Falling Leaf
SMN*FL:Newer: Falling Leaf
SMN*MI:Midi's Super Mario Bros Wii - Just A Little Adventure
SMN*RV:RVLution Wii (NewSMB Mod)
SMN*YL:Luigi's Super Yoshi Bros.
SMN*ZA:Newer Apocalypse
SMN*ZY:Super Mario Skyland
SMM*02:Super Mario Mushroom Adventure PLUS - Winter Moon
SMV*01:Super Mario Vacation
MRR*01:New Super Mario Bros. Wii Retro Remix
SMM?02:Super Mario: Mushroom Adventure PLUS - Winter Moon
SMV?01:Super Mario Vacation
MRR?01:New Super Mario Bros. Wii Retro Remix

View File

@ -16,11 +16,15 @@ if [[ -d ${basedir}/script.d ]]; then
PATCHIMAGE_PATCH_DIR=${basedir}/patches
PATCHIMAGE_DATA_DIR=${basedir}/data
PATCHIMAGE_TOOLS_DIR=${basedir}/tools
PATCHIMAGE_OVERRIDE_DIR=${basedir}/override
PATCHIMAGE_DATABASE_DIR=${basedir}/database
else
PATCHIMAGE_SCRIPT_DIR=/usr/share/patchimage/script.d
PATCHIMAGE_PATCH_DIR=/usr/share/patchimage/patches
PATCHIMAGE_DATA_DIR=/usr/share/patchimage/data
PATCHIMAGE_TOOLS_DIR=/usr/share/patchimage/tools
PATCHIMAGE_OVERRIDE_DIR=/usr/share/patchimage/override
PATCHIMAGE_DATABASE_DIR=/usr/share/patchimage/database
fi
PATCHIMAGE_RIIVOLUTION_DIR=${basedir}
@ -40,115 +44,115 @@ setup_tools
case ${GAME} in
NSMB1 | NewerSMB | NewerSMBW )
source ${PATCHIMAGE_SCRIPT_DIR}/newersmb.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/newersmb.sh
;;
NSMB2 | NewerSummerSun )
source ${PATCHIMAGE_SCRIPT_DIR}/newersummersun.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/newersummersun.sh
;;
NSMB3 | ASMBW | AnotherSMBW )
source ${PATCHIMAGE_SCRIPT_DIR}/anothersmb.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/anothersmb.sh
;;
NSMB4 | HolidaySpecial | "Newer: Holiday Special" )
source ${PATCHIMAGE_SCRIPT_DIR}/newerholiday.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/newerholiday.sh
;;
NSMB5 | Cannon | "Cannon SMBW" )
source ${PATCHIMAGE_SCRIPT_DIR}/cannon.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/cannon.sh
;;
NSMB6 | ESBW | "Epic Super Bowser World" )
source ${PATCHIMAGE_SCRIPT_DIR}/epicbowserworld.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/epicbowserworld.sh
;;
NSMB7 | Koopa | "Koopa Country" )
source ${PATCHIMAGE_SCRIPT_DIR}/koopacountry.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/koopacountry.sh
;;
NSMB8 | "New Super Mario Bros. 4" )
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw4.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/nsmbw4.sh
;;
NSMB9 | Retro | "Retro Remix" )
source ${PATCHIMAGE_SCRIPT_DIR}/retroremix.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/retroremix.sh
;;
NSMB10 | WinterMoon | "Super Mario: Mushroom Adventure PLUS - Winter Moon" )
source ${PATCHIMAGE_SCRIPT_DIR}/wintermoon.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/wintermoon.sh
;;
NSMB11 | NSMBW3 | "NSMBW3: The Final Levels" )
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw3.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/nsmbw3.sh
;;
NSMB12 | SMV | "Super Mario Vacation" )
source ${PATCHIMAGE_SCRIPT_DIR}/summervacation.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/summervacation.sh
;;
NSMB13 | ASLM | "Awesomer Super Luigi Mini" )
source ${PATCHIMAGE_SCRIPT_DIR}/awesomersuperluigi.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/awesomersuperluigi.sh
;;
NSMB14 | Sykland )
source ${PATCHIMAGE_SCRIPT_DIR}/skyland.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/skyland.sh
;;
NSMB15 | RVLution )
source ${PATCHIMAGE_SCRIPT_DIR}/rvlution.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/rvlution.sh
;;
NSMB16 | Midi )
source ${PATCHIMAGE_SCRIPT_DIR}/midissupermariowii.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/midissupermariowii.sh
;;
NSMB17 | DarkUmbra )
source ${PATCHIMAGE_SCRIPT_DIR}/darkumbrasmb.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/darkumbrasmb.sh
;;
NSMB18 | NewerApocalypse )
source ${PATCHIMAGE_SCRIPT_DIR}/newerapocalypse.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/newerapocalypse.sh
;;
NSMB19 | LuigisSuperYoshiBros )
source ${PATCHIMAGE_SCRIPT_DIR}/luigissuperyoshibros.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/luigissuperyoshibros.sh
;;
NSMB20 | NewerFallingLeaf )
source ${PATCHIMAGE_SCRIPT_DIR}/newerfallingleaf.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/newerfallingleaf.sh
;;
NSMB21 | DevilMarioWinterSpecial )
source ${PATCHIMAGE_SCRIPT_DIR}/devilmariowinterspecial.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/devilmariowinterspecial.sh
;;
NSMB22 | NewSMBWOtherWorld )
source ${PATCHIMAGE_SCRIPT_DIR}/newsmbwotherworld.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/newsmbwotherworld.sh
;;
NSMB23 | TheLegendOfYoshi )
source ${PATCHIMAGE_SCRIPT_DIR}/thelegendofyoshi.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/thelegendofyoshi.sh
;;
NSMB24 | RemixedSuperMarioBrosWii )
source ${PATCHIMAGE_SCRIPT_DIR}/remixedsupermariobroswii.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/remixedsupermariobroswii.sh
;;
NSMB25 | GhostlySuperGhostBoosWii )
source ${PATCHIMAGE_SCRIPT_DIR}/ghostlysuperghostbooswii.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/ghostlysuperghostbooswii.sh
;;
NSMB26 | RevisedSuperMarioBrosWii )
source ${PATCHIMAGE_SCRIPT_DIR}/revisedsupermariobroswii.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/revisedsupermariobroswii.sh
;;
NSMB99 | NSMBWCharacters )
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw_characters.sh
source ${PATCHIMAGE_SCRIPT_DIR}/nsmbw/nsmbw_characters.sh
;;
MKW1 | Wiimmfi )
source ${PATCHIMAGE_SCRIPT_DIR}/wiimmfi.sh
source ${PATCHIMAGE_SCRIPT_DIR}/mkwii/wiimmfi.sh
;;
MKW2 | Wiimmpatch )
@ -156,19 +160,19 @@ case ${GAME} in
;;
MKW3 | Mkwiimm )
source ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm.sh
source ${PATCHIMAGE_SCRIPT_DIR}/mkwii/mkwiimm.sh
;;
MKW4 | MkwiimmItems )
source ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm_items.sh
source ${PATCHIMAGE_SCRIPT_DIR}/mkwii/mkwiimm_items.sh
;;
MKW5 | MkwiimmFonts )
source ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm_fonts.sh
source ${PATCHIMAGE_SCRIPT_DIR}/mkwii/mkwiimm_fonts.sh
;;
MKW6 | MkwiimmKarts )
source ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm_karts.sh
source ${PATCHIMAGE_SCRIPT_DIR}/mkwii/mkwiimm_karts.sh
;;
KAW1 | Kirby )
@ -180,35 +184,35 @@ case ${GAME} in
;;
PKMN1 | NeoX )
source ${PATCHIMAGE_SCRIPT_DIR}/pokemonneox.sh
source ${PATCHIMAGE_SCRIPT_DIR}/pokemon/pokemonneox.sh
;;
PKMN2 | NeoY )
source ${PATCHIMAGE_SCRIPT_DIR}/pokemonneoy.sh
source ${PATCHIMAGE_SCRIPT_DIR}/pokemon/pokemonneoy.sh
;;
PKMN3 | RutileRuby )
source ${PATCHIMAGE_SCRIPT_DIR}/pokemonrutileruby.sh
source ${PATCHIMAGE_SCRIPT_DIR}/pokemon/pokemonrutileruby.sh
;;
PKMN4 | AlphaSapphire )
source ${PATCHIMAGE_SCRIPT_DIR}/pokemonstarsapphire.sh
source ${PATCHIMAGE_SCRIPT_DIR}/pokemon/pokemonstarsapphire.sh
;;
PKMN5 | EternalX )
source ${PATCHIMAGE_SCRIPT_DIR}/pokemoneternalx.sh
source ${PATCHIMAGE_SCRIPT_DIR}/pokemon/pokemoneternalx.sh
;;
PKMN6 | WiltingY )
source ${PATCHIMAGE_SCRIPT_DIR}/pokemonwiltingy.sh
source ${PATCHIMAGE_SCRIPT_DIR}/pokemon/pokemonwiltingy.sh
;;
PKMN7 | RisingRuby )
source ${PATCHIMAGE_SCRIPT_DIR}/pokemonrisingruby.sh
source ${PATCHIMAGE_SCRIPT_DIR}/pokemon/pokemonrisingruby.sh
;;
PKMN8 | SinkingSapphire )
source ${PATCHIMAGE_SCRIPT_DIR}/pokemonsinkingsapphire.sh
source ${PATCHIMAGE_SCRIPT_DIR}/pokemon/pokemonsinkingsapphire.sh
;;
BSECU | BravelySecondUncensored )

View File

@ -321,7 +321,7 @@ show_nsmb_db () {
ID1=${1:0:3}
ID2=${1:4:2}
gawk -F \: "/^${ID1}\*${ID2}/"'{print $2}' \
< "${PATCHIMAGE_SCRIPT_DIR}"/nsmbw.db || echo "** Unknown **"
< "${PATCHIMAGE_DATABASE_DIR}"/nsmbw.db || echo "** Unknown **"
}
@ -329,7 +329,7 @@ show_mkwiimm_db () {
ID=${1:4:2}
[[ ${ID} == [0-9][0-9] ]] && gawk -F \: "/^${ID}/"'{print $2}' \
< "${PATCHIMAGE_SCRIPT_DIR}"/mkwiimm.db || echo "** Unknown **"
< "${PATCHIMAGE_DATABASE_DIR}"/mkwiimm.db || echo "** Unknown **"
}
@ -369,14 +369,14 @@ show_titles_db () {
ID=${1/.*}
gawk -F \: "/^${ID}/"'{print $2}' \
< "${PATCHIMAGE_SCRIPT_DIR}"/titles.db || echo "** Unknown **"
< "${PATCHIMAGE_DATABASE_DIR}"/titles.db || echo "** Unknown **"
}
check_wfc () {
ID=${1/.*}
if [[ $(grep ${ID} "${PATCHIMAGE_SCRIPT_DIR}"/wfc.db) ]]; then
if [[ $(grep ${ID} "${PATCHIMAGE_DATABASE_DIR}"/wfc.db) ]]; then
echo TRUE
else
echo FALSE

View File

@ -30,7 +30,7 @@ download_wiimm () {
echo "Choose a Mario Kart Wiimm Distribution
ALL Build all distributions."
gawk -F \: 'NR>1 {print $1 "\t" $2}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm.db
gawk -F \: 'NR>1 {print $1 "\t" $2}' < ${PATCHIMAGE_DATABASE_DIR}/mkwiimm.db
echo "
type in ALL or an ID (multiple separated by space)"
read ID
@ -119,9 +119,9 @@ PRIV_SAVEGAME=${MKWIIMM_OWN_SAVE}" > ${PWD}/config.def
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)
DIST=$(gawk -F \: "/^${MY_ID}/"'{print $2}' < ${PATCHIMAGE_DATABASE_DIR}/mkwiimm.db)
DOWNLOAD=$(gawk -F \: "/^${MY_ID}/"'{print $3}' < ${PATCHIMAGE_DATABASE_DIR}/mkwiimm.db)
FILENAME=$(gawk -F \: "/^${MY_ID}/"'{split($3, a, "/") ; print a[3]}' < ${PATCHIMAGE_DATABASE_DIR}/mkwiimm.db)
if [[ ${FILENAME} != mkw* ]]; then
echo "wrong ID passed from user-input, exiting."
@ -143,7 +143,7 @@ build_mkwiimm () {
ln -s "${IMAGE}" .
chmod +x *.sh
if [[ ${MKWIIMM_OVERRIDE_SZS} == "TRUE" ]] && cp -r ${PATCHIMAGE_SCRIPT_DIR}/../override/* ${PWD}/bin/
if [[ ${MKWIIMM_OVERRIDE_SZS} == "TRUE" ]] && cp -r ${PATCHIMAGE_OVERRIDE_DIR}/* ${PWD}/bin/
if [[ ${MY_ID} -lt 27 ]]; then
mkwiimm_olddist

View File

@ -40,7 +40,7 @@ download_wiimm () {
orig Original Mario Kart Wii Font"
gawk -F \: '{print $1 "\t\t" $2}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm_fonts.db
gawk -F \: '{print $1 "\t\t" $2}' < ${PATCHIMAGE_DATABASE_DIR}/mkwiimm_fonts.db
echo -e "\ntype ???.szs or orig"
read FONT

View File

@ -76,7 +76,7 @@ ask_items () {
orig Original item"
gawk -F \: "/${slot}/"'{print $1 "\t" $3}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm_items.db
gawk -F \: "/${slot}/"'{print $1 "\t" $3}' < ${PATCHIMAGE_DATABASE_DIR}/mkwiimm_items.db
echo -e "\ntype orig or ???.brres"
read slotid
echo "<<<<<<>>>>>>"

View File

@ -36,12 +36,12 @@ check_input_image_special () {
ask_slot () {
echo -e "\nFirst choose a vehicle to be replaced\n"
gawk -F \: '{print $1 "\t\t" $2}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm_vehicles.db
gawk -F \: '{print $1 "\t\t" $2}' < ${PATCHIMAGE_DATABASE_DIR}/mkwiimm_vehicles.db
echo -e "\ntype in ??_??? as in first column\n"
read VEHICLE
echo -e "\nNow choose a character to be replaced\n"
gawk -F \: '{print $1 "\t\t" $2}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm_characters.db
gawk -F \: '{print $1 "\t\t" $2}' < ${PATCHIMAGE_DATABASE_DIR}/mkwiimm_characters.db
echo -e "\ntype in -?? as in first column\n"
read CHARACTER
@ -64,7 +64,7 @@ download_wiimm () {
if [[ ${choosenkarts[@]} == "" ]]; then
echo -e "Choose a character to add to the game\n"
gawk -F \: '{print $1 "\t\t" $2}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm_karts.db
gawk -F \: '{print $1 "\t\t" $2}' < ${PATCHIMAGE_DATABASE_DIR}/mkwiimm_karts.db
echo -e "\ntype ???.szs (multiple possible, space separated)"
read KART

View File

@ -50,7 +50,7 @@ pi_action () {
if [[ ${choosenplayers[@]} == "" ]]; then
echo -e "Choose a Player to add to the game\n"
gawk -F \: '{print $1 "\t\t" $2 "\t\t" $3}' < ${PATCHIMAGE_SCRIPT_DIR}/nsmbw_characters.db
gawk -F \: '{print $1 "\t\t" $2 "\t\t" $3}' < ${PATCHIMAGE_DATABASE_DIR}/nsmbw_characters.db
echo -e "\ntype ???.arc (only one per slot (second column) possible, space separated)"
read PLAYERS
@ -63,7 +63,7 @@ pi_action () {
&& rm ${PATCHIMAGE_RIIVOLUTION_DIR}/${player} \
&& exit 57)
fi
slot=$(gawk -F \: "/^${player}/"'{print $2}' ${PATCHIMAGE_SCRIPT_DIR}/nsmbw_characters.db)
slot=$(gawk -F \: "/^${player}/"'{print $2}' ${PATCHIMAGE_DATABASE_DIR}/nsmbw_characters.db)
choosenplayers=( ${choosenplayers[@]} ${player}:${slot} )
done