From b838a4a9185c0418f0d898948dfbce6bcf46fd29 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Fri, 9 Apr 2004 21:33:15 +0000 Subject: Added new games_umod_unpack function to unpack umod/ut2mod/ut4mod files. --- eclass/games.eclass | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'eclass') diff --git a/eclass/games.eclass b/eclass/games.eclass index d83f6c9619f7..a528fd6333cc 100644 --- a/eclass/games.eclass +++ b/eclass/games.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.62 2004/04/02 02:56:07 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.63 2004/04/09 21:33:15 wolf31o2 Exp $ # # devlist: {vapier,wolf31o2,mr_bones_}@gentoo.org # @@ -155,6 +155,21 @@ games_ut_unpack() { fi } +# Unpacks .umod/.ut2mod/.ut4mod files for UT/UT2003/UT2004 +# Usage: games_umod_unpack $1 +games_umod_unpack() { + local umod="$1" + mkdir -p ${Ddir}/System ${Ddir}/Maps ${Ddir}/StaticMeshes ${Ddir}/Textures \ + ${Ddir}/Music ${Ddir}/Help ${Ddir}/Animations ${Ddir}/Sounds \ + ${Ddir}/KarmaData + cp ${dir}/System/{ucc-bin,{Manifest,Def{ault,User}}.ini,{Engine,Core,zlib,ogg,vorbis}.so,{Engine,Core}.int} ${Ddir}/System + export UT_DATA_PATH="${Ddir}/System" + cd "${UT_DATA_PATH}" + ./ucc-bin umodunpack -x ${S}/${umod} -nohomedir >/dev/null 2>&1 \ + || die "uncompressing file ${umod}" + rm -f ${Ddir}/System/{ucc-bin,{Manifest,Def{ault,User}}.ini,{Engine,Core,zlib,ogg,vorbis}.so,{Engine,Core}.int} >/dev/null 2>&1 || die "Removing temporary files" +} + # make a wrapper script ... games_make_wrapper() { local wrapper=$1 ; shift -- cgit v1.2.3-65-gdbad