Skip to content
Snippets Groups Projects
Commit 1c38b1da authored by dg's avatar dg
Browse files

Increased game loading speed tenfolds by packaging the engine, boot module and...

Increased game loading speed tenfolds by packaging the engine, boot module and tome module into a single file format


git-svn-id: http://svn.net-core.org/repos/t-engine4@4187 51575b47-30f0-44d4-a5cc-537603b46e54
parent 16ec42fe
No related branches found
No related tags found
No related merge requests found
......@@ -37,10 +37,17 @@ find . -name '*~' -or -name '.svn' | xargs rm -rf
# create teae/teams
cd game/engines
te4_pack_engine.sh default/ te4-"$ever"
mv -f te4-*.teae boot-te4-*.team /var/www/te4.org/htdocs/dl/engines
te4_pack_engine.sh default/ te4-"$ever" 1
\cp -f te4-*.teae boot-te4-*.team /var/www/te4.org/htdocs/dl/engines
mv boot*team ../modules
rm -rf default
cd ../modules
te4_pack_module.sh tome "$tver"
mv -f tome*.team /var/www/te4.org/htdocs/dl/modules/tome/
te4_pack_module.sh tome "$tver" 1
\cp -f tome*.team /var/www/te4.org/htdocs/dl/modules/tome/
rm -f tome*nomusic.team
rm -f boot*nomusic.team
rm -rf tome
cd ../../
cd ..
......@@ -49,22 +56,16 @@ tar cvjf t-engine4-src-"$ver".tar.bz2 t-engine4-src-"$ver"
# windows
echo "******************** Windows"
cd t-engine4-windows-"$ver"
cp -a ../../bootstrap/ ../../game/ ../../C* ../../dlls/* .
cp -a ../../bootstrap/ ../t-engine4-src-"$ver"/game/ ../../C* ../../dlls/* .
find . -name '*~' -or -name '.svn' | xargs rm -rf
rm -rf game/modules/angband
rm -rf game/modules/rogue
rm -rf game/modules/gruesome
cd ..
zip -r -9 t-engine4-windows-"$ver".zip t-engine4-windows-"$ver"
# linux 32
echo "******************** linux32"
cd t-engine4-linux32-"$ver"
cp -a ../../bootstrap/ ../../game/ ../../C* ../../linux-bin/* .
cp -a ../../bootstrap/ ../t-engine4-src-"$ver"/game/ ../../C* ../../linux-bin/* .
find . -name '*~' -or -name '.svn' | xargs rm -rf
rm -rf game/modules/angband
rm -rf game/modules/rogue
rm -rf game/modules/gruesome
cd ..
tar -cvjf t-engine4-linux32-"$ver".tar.bz2 t-engine4-linux32-"$ver"
......@@ -74,12 +75,9 @@ cd t-engine4-osx-"$ver"
mkdir T-Engine.app/
cp -a ../../mac/base_app/* T-Engine.app/
cp -a ../../bootstrap/ T-Engine.app/Contents/MacOS/
cp -a ../../game/ T-Engine.app/Contents/Resources/
cp -a ../t-engine4-src-"$ver"/game/ T-Engine.app/Contents/Resources/
cp -a ../../C* .
find . -name '*~' -or -name '.svn' | xargs rm -rf
rm -rf T-Engine.app/Contents/Resources/game/modules/angband
rm -rf T-Engine.app/Contents/Resources/game/modules/rogue
rm -rf T-Engine.app/Contents/Resources/game/modules/gruesome
cd ..
size=`du -hsc t-engine4-osx-"$ver"|grep total|cut -dM -f1`
sudo makedmg t-engine4-osx-"$ver".dmg "Tales of Maj'Eyal" `expr $size + 10` t-engine4-osx-"$ver"
......@@ -88,32 +86,44 @@ gzip t-engine4-osx-"$ver".dmg
#### Music less
# src
echo "******************** Src"
echo "******************** Src n/m"
cd t-engine4-src-"$ver"
IFS=$'\n'; for i in `find game/ -name '*.ogg'`; do
echo "$i"|grep '/music/' -q
if test $? -eq 0; then rm "$i"; fi
done
rm game/modules/tome*team
rm game/modules/boot*team
cp /var/www/te4.org/htdocs/dl/modules/tome/tome-"$tver"-nomusic.team game/modules/
cp /var/www/te4.org/htdocs/dl/engines/boot-te4-"$ever"-nomusic.team game/modules/
cd ..
tar cvjf t-engine4-src-"$ver"-nomusic.tar.bz2 t-engine4-src-"$ver"
# windows
echo "******************** Windows"
echo "******************** Windows n/m"
cd t-engine4-windows-"$ver"
IFS=$'\n'; for i in `find game/ -name '*.ogg'`; do
echo "$i"|grep '/music/' -q
if test $? -eq 0; then rm "$i"; fi
done
rm game/modules/tome*team
rm game/modules/boot*team
cp /var/www/te4.org/htdocs/dl/modules/tome/tome-"$tver"-nomusic.team game/modules/
cp /var/www/te4.org/htdocs/dl/engines/boot-te4-"$ever"-nomusic.team game/modules/
cd ..
zip -r -9 t-engine4-windows-"$ver"-nomusic.zip t-engine4-windows-"$ver"
# linux 32
echo "******************** linux32"
echo "******************** linux32 n/m"
cd t-engine4-linux32-"$ver"
IFS=$'\n'; for i in `find game/ -name '*.ogg'`; do
echo "$i"|grep '/music/' -q
if test $? -eq 0; then rm "$i"; fi
done
rm game/modules/tome*team
rm game/modules/boot*team
cp /var/www/te4.org/htdocs/dl/modules/tome/tome-"$tver"-nomusic.team game/modules/
cp /var/www/te4.org/htdocs/dl/engines/boot-te4-"$ever"-nomusic.team game/modules/
cd ..
tar -cvjf t-engine4-linux32-"$ver"-nomusic.tar.bz2 t-engine4-linux32-"$ver"
......
......@@ -7,6 +7,7 @@ fi
version="$2"
dir="$1"
exclude_ogg="$3"
cp -a "$dir" tmp
find tmp -name .svn -or -name '*~' | xargs rm -rf
......@@ -14,8 +15,8 @@ find tmp -name .svn -or -name '*~' | xargs rm -rf
cd tmp
cd modules
te4_pack_module.sh boot "$version"
mv boot-"$version".team ../../
te4_pack_module.sh boot "$version" "$exclude_ogg"
mv boot-"$version"*.team ../../
cd ..
rm -rf modules
......
#!/bin/bash
if test $# -lt 2 ; then
echo "Usage: te4_pack_module.sh [tome] [3.9.14]"
echo "Usage: te4_pack_module.sh [tome] [3.9.14] [exclude-ogg]"
exit
fi
mod="$1"
version="$2"
exclude_ogg="$3"
cp -a "$mod" tmp
find tmp -name .svn -or -name '*~' | xargs rm -rf
cd tmp
if test "$exclude_ogg" -eq 1; then
IFS=$'\n'; for i in `find -name '*.ogg'`; do
echo "$i"|grep '/music/' -q
if test $? -eq 0; then rm "$i"; fi
done
fi
mkdir mod
mv * mod
mv mod/data .
zip -r -0 ../"$mod"-"$version".team *
if test "$exclude_ogg" -eq 1; then
zip -r -0 ../"$mod"-"$version-nomusic".team *
else
zip -r -0 ../"$mod"-"$version".team *
fi
cd -
rm -rf tmp
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment