Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
Add class to use WiimmsIsoTools.
Browse files Browse the repository at this point in the history
  • Loading branch information
orwel.wit committed May 15, 2011
1 parent bdee89c commit d6aa5d9
Show file tree
Hide file tree
Showing 50 changed files with 62,664 additions and 7 deletions.
Binary file added ShowMiiWads/External/wit/bash.exe
Binary file not shown.
Binary file added ShowMiiWads/External/wit/comm.exe
Binary file not shown.
Binary file added ShowMiiWads/External/wit/cp.exe
Binary file not shown.
Binary file added ShowMiiWads/External/wit/cygattr-1.dll
Binary file not shown.
Binary file added ShowMiiWads/External/wit/cygcrypto-0.9.8.dll
Binary file not shown.
Binary file added ShowMiiWads/External/wit/cyggcc_s-1.dll
Binary file not shown.
Binary file added ShowMiiWads/External/wit/cygiconv-2.dll
Binary file not shown.
Binary file added ShowMiiWads/External/wit/cygidn-11.dll
Binary file not shown.
Binary file added ShowMiiWads/External/wit/cygintl-8.dll
Binary file not shown.
Binary file added ShowMiiWads/External/wit/cygncursesw-10.dll
Binary file not shown.
Binary file added ShowMiiWads/External/wit/cygpopt-0.dll
Binary file not shown.
Binary file added ShowMiiWads/External/wit/cygreadline7.dll
Binary file not shown.
Binary file added ShowMiiWads/External/wit/cygssl-0.9.8.dll
Binary file not shown.
Binary file added ShowMiiWads/External/wit/cygwin1.dll
Binary file not shown.
Binary file added ShowMiiWads/External/wit/cygz.dll
Binary file not shown.
3 changes: 3 additions & 0 deletions ShowMiiWads/External/wit/load-titles.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
bash.exe ./load-titles.sh --cygwin
pause
130 changes: 130 additions & 0 deletions ShowMiiWads/External/wit/load-titles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
#!/bin/bash

#####################################################################
## __ __ _ ___________ ##
## \ \ / /| |____ ____| ##
## \ \ / / | | | | ##
## \ \ /\ / / | | | | ##
## \ \/ \/ / | | | | ##
## \ /\ / | | | | ##
## \/ \/ |_| |_| ##
## ##
## Wiimms ISO Tools ##
## http://wit.wiimm.de/ ##
## ##
#####################################################################
## ##
## This file is part of the WIT project. ##
## Visit http://wit.wiimm.de/ for project details and sources. ##
## ##
## Copyright (c) 2009-2011 by Dirk Clemens <wiimm@wiimm.de> ##
## ##
#####################################################################
## ##
## This file loads the title files from WiiTDB.com ##
## ##
#####################################################################


#------------------------------------------------------------------------------

NEEDED="wit wget comm tr"

BASE_PATH="/usr/local"
SHARE_PATH="$BASE_PATH/share/wit"
URI_TITLES=http://wiitdb.com/titles.txt
LANGUAGES="de es fr it ja ko nl pt ru zhcn zhtw"

SHARE_DIR=./share

#------------------------------------------------------------------------------

CYGWIN=0
if [[ $1 = --cygwin ]]
then
shift
CYGWIN=1
SHARE_DIR=.
export PATH=".:$PATH"
fi

#------------------------------------------------------------------------------

MAKE=0
if [[ $1 = --make ]]
then
# it's called from make
shift
MAKE=1
fi

#------------------------------------------------------------------------------

function load_and_store()
{
local URI="$1"
local DEST="$2"
local ADD="$3"

echo "*** load $DEST from $URI"

if wget -q -O- "$URI" | wit titles / - >"$DEST.tmp" && test -s "$DEST.tmp"
then
if [[ $ADD != "" ]]
then
wit titles / "$ADD" "$DEST.tmp" >"$DEST.tmp.2"
mv "$DEST.tmp.2" "$DEST.tmp"
fi

if [[ -s $DEST ]]
then
grep -v ^TITLES "$DEST" >"$DEST.tmp.1"
grep -v ^TITLES "$DEST.tmp" >"$DEST.tmp.2"
if ! diff -q "$DEST.tmp.1" "$DEST.tmp.2" >/dev/null
then
#echo " => content changed!"
mv "$DEST.tmp" "$DEST"
fi
else
mv "$DEST.tmp" "$DEST"
fi
fi
rm -f "$DEST.tmp" "$DEST.tmp.1" "$DEST.tmp.2"
}

#------------------------------------------------------------------------------

errtool=
for tool in $NEEDED
do
((CYGWIN)) && [[ -x $tool.exe ]] && continue
which $tool >/dev/null 2>&1 || errtool="$errtool $tool"
done

if [[ $errtool != "" ]]
then
echo "missing tools in PATH:$errtool" >&2
exit 2
fi

#------------------------------------------------------------------------------

mkdir -p "$SHARE_DIR"

load_and_store "$URI_TITLES" "$SHARE_DIR/titles.txt"

# load language specific title files

for lang in $LANGUAGES
do
LANG="$( echo $lang | tr '[a-z]' '[A-Z]' )"
load_and_store $URI_TITLES?LANG=$LANG "$SHARE_DIR/titles-$lang.txt" "$SHARE_DIR/titles.txt"
done

if (( !MAKE && !CYGWIN ))
then
echo "*** install titles to $SHARE_PATH"
mkdir -p "$SHARE_PATH"
cp -p "$SHARE_DIR/titles*.txt" "$SHARE_PATH"
fi

Binary file added ShowMiiWads/External/wit/mkdir.exe
Binary file not shown.
Binary file added ShowMiiWads/External/wit/realpath.exe
Binary file not shown.
Binary file added ShowMiiWads/External/wit/regtool.exe
Binary file not shown.
Binary file added ShowMiiWads/External/wit/sed.exe
Binary file not shown.
Binary file added ShowMiiWads/External/wit/stat.exe
Binary file not shown.
80 changes: 80 additions & 0 deletions ShowMiiWads/External/wit/system-menu.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@

#####################################################################
## __ __ _ ___________ ##
## \ \ / /| |____ ____| ##
## \ \ / / | | | | ##
## \ \ /\ / / | | | | ##
## \ \/ \/ / | | | | ##
## \ /\ / | | | | ##
## \/ \/ |_| |_| ##
## ##
## Wiimms ISO Tools ##
## http://wit.wiimm.de/ ##
## ##
#####################################################################
## ##
## This file is part of the WIT project. ##
## Visit http://wit.wiimm.de/ for project details and sources. ##
## ##
## Copyright (c) 2009-2011 by Dirk Clemens <wiimm@wiimm.de> ##
## ##
#####################################################################
## ##
## This file is used to translate the version number of the wad ##
## file name into the public system menu version. ##
## ##
## Syntax: wad_version_number = system menu version ##
## ##
#####################################################################

33 = 1.0

97 = 2.0U
128 = 2.0J
130 = 2.0E

162 = 2.1E

192 = 2.2J
193 = 2.2U
194 = 2.2E

224 = 3.0J
225 = 3.0U
226 = 3.0E

256 = 3.1J
257 = 3.1U
258 = 3.1E

288 = 3.2J
289 = 3.2U
290 = 3.2E

352 = 3.3J
353 = 3.3U
354 = 3.3E

384 = 3.4J
385 = 3.4U
386 = 3.4E

416 = 4.0J
417 = 4.0U
418 = 4.0E

448 = 4.1J
449 = 4.1U
450 = 4.1E
454 = 4.1K

480 = 4.2K
481 = 4.2U
482 = 4.2E
486 = 4.2K

512 = 4.3J
513 = 4.3U
514 = 4.3E
518 = 4.3K

Loading

0 comments on commit d6aa5d9

Please sign in to comment.