CLANNAD English Localization Mark II is an open source project powered by Assembla

Assembla offers free public and private SVN/Git repositories and project hosting with bug/issue tracking and collaboration tools.

clannad_mk2

Commit 21

User picture
  • Author: polarem
  • 2012-04-29 08:16 (almost 2 years ago)

Use GNU make to manage compilation. Use 1 build script to build both versions of CLANNAD.

No need to recompile every SEEN every time any more!

Files Affected

 
2021
1
#!/bin/bash
1
#!/bin/bash
2
 
2
 
3
export BUILD_DIR='build'
3
# Help message
4
 
4
usage()
5
rm -rf $BUILD_DIR
5
{
6
mkdir $BUILD_DIR
6
    echo "Clannad SEEN.TXT build script"
7
 
7
    echo
8
cp -rf ke/* $BUILD_DIR
8
    echo "Usage:"
9
cp -rf utf/* $BUILD_DIR
9
    echo "    ./build.sh <version>"
10
 
10
    echo "    ./build.sh <version> clean"
11
cd $BUILD_DIR
11
    echo
12
 
12
    echo "Supported versions:"
13
for file in `echo SEEN*.ke`; do
13
    echo "    vp"
14
    echo === Compiling $file ===
14
    echo "    fv"
15
    rlc -v -d . -i ../ke/GAMEEXE.INI -t reallive -e utf-8 -x western $file || exit
15
    echo
16
done
16
}
17
echo = Creating SEEN.TXT archive =
17
 
18
kprl -v -a SEEN.TXT SEEN*.TXT
18
# If user supplied no arguments, or too many arguments...
 
 
19
if [ $# -lt 1 ] || [ $# -gt 2 ]; then
 
 
20
    usage 1>&2
 
 
21
    exit 1;
 
 
22
fi
 
 
23
 
 
 
24
# Argument 1 sets the version
 
 
25
case "$1" in
 
 
26
    vp)
 
 
27
        export VERSION_OPTS="SRC_DIR=ke    OBJ_DIR=build    VER_REALLV=1.3.9.5 VER_COMPIL=10002 "
 
 
28
        ;;
 
 
29
    fv)
 
 
30
        export VERSION_OPTS="SRC_DIR=ke_FV OBJ_DIR=build_FV VER_REALLV=1.5.0.4 VER_COMPIL=110002"
 
 
31
        ;;
 
 
32
    *)
 
 
33
        usage 1>&2
 
 
34
        exit 1;
 
 
35
        ;;
 
 
36
esac
 
 
37
 
 
 
38
# If there's no 2nd argument, start compiling
 
 
39
if [ $# -lt 2 ]; then
 
 
40
    make $VERSION_OPTS
 
 
41
    exit $?
 
 
42
 
 
 
43
# Argument 2 sets the special instructions
 
 
44
else
 
 
45
    case "$2" in
 
 
46
        clean)
 
 
47
            make $VERSION_OPTS clean
 
 
48
            exit $?
 
 
49
            ;;
 
 
50
        *)
 
 
51
            usage 1>&2
 
 
52
            exit 1;
 
 
53
            ;;
 
 
54
    esac
 
 
55
fi
 
 
56
 
Show contents