mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
rework script to create loki installer
the script now automatically picks up the architectures present in the build directory. Also builds installer without data files if no data files are present. Wrt loki metadata the installer now installs ioq3 as default component instead of the data files. After all baseq3 is just a mod (almost) like any other.
This commit is contained in:
parent
0d8d161eaf
commit
62363cdf93
4 changed files with 185 additions and 172 deletions
141
misc/setup/doit
141
misc/setup/doit
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
: ${MAKESELF:=/usr/share/loki_setup/makeself}
|
||||
: ${SETUPIMAGE:=/usr/share/loki_setup/image}
|
||||
: ${MAKESELF:=/usr/share/loki-setup/makeself}
|
||||
: ${SETUPIMAGE:=/usr/share/loki-setup/image}
|
||||
|
||||
: ${VERSION:=0.0_`date +%Y%m%d%H%M`}
|
||||
: ${RELEASE:=0}
|
||||
|
@ -9,7 +9,7 @@
|
|||
set -e
|
||||
set -x
|
||||
|
||||
arch=`uname -m`
|
||||
shopt -s nullglob
|
||||
|
||||
rm -rf image
|
||||
mkdir image
|
||||
|
@ -24,82 +24,89 @@ rm -f image/quake3.png
|
|||
cp ../quake3.png image/quake3.png
|
||||
|
||||
### binaries
|
||||
src="../../../../../build"
|
||||
topdir="../.."
|
||||
|
||||
mkdir image/tmp
|
||||
pushd image/tmp
|
||||
mkdir baseq3 demoq3 missionpack
|
||||
# 32 bit binaries
|
||||
install -m 755 $src/release-linux-i386/ioquake3.i386 ioquake3.i386
|
||||
install -m 755 $src/release-linux-i386/ioq3ded.i386 ioq3ded.i386
|
||||
install -m 644 $src/release-linux-i386/baseq3/*.so baseq3
|
||||
install -m 644 $src/release-linux-i386/missionpack/*.so missionpack
|
||||
pushd demoq3
|
||||
ln -s ../baseq3/*.so .
|
||||
popd
|
||||
popd
|
||||
echo "changequote(\`[', \`]')dnl" > defines.m4
|
||||
echo "define(VERSION,$VERSION)dnl" >> defines.m4
|
||||
|
||||
tar --owner=root --group=root -C ./image/tmp -cf ./image/ioquake3.i386.tar .
|
||||
rm -rf ./image/tmp
|
||||
copystartscript()
|
||||
{
|
||||
local arch="$1"
|
||||
mkdir -p image/bin/Linux/$arch
|
||||
if [ "$arch" = x86_64 ]; then
|
||||
ln -s x86_64 image/bin/Linux/amd64
|
||||
fi
|
||||
install -m 755 ioquake3.sh image/bin/Linux/$arch/ioquake3
|
||||
install -m 755 ioq3demo.sh image/bin/Linux/$arch/ioq3demo
|
||||
}
|
||||
|
||||
mkdir image/tmp
|
||||
pushd image/tmp
|
||||
mkdir baseq3 demoq3 missionpack
|
||||
# 64 bit binaries
|
||||
install -m 755 $src/release-linux-x86_64/ioquake3.x86_64 ioquake3.x86_64
|
||||
install -m 755 $src/release-linux-x86_64/ioq3ded.x86_64 ioq3ded.x86_64
|
||||
install -m 644 $src/release-linux-x86_64/baseq3/*.so baseq3
|
||||
install -m 644 $src/release-linux-x86_64/missionpack/*.so missionpack
|
||||
pushd demoq3
|
||||
ln -s ../baseq3/*.so .
|
||||
popd
|
||||
popd
|
||||
archs=()
|
||||
for arch in $topdir/build/release-*; do
|
||||
arch=${arch##*-}
|
||||
case "$arch" in
|
||||
i386) echo "define(HAVE_I386,yes)dnl" >> defines.m4
|
||||
copystartscript x86
|
||||
;;
|
||||
x86_64) echo "define(HAVE_X86_64,yes)dnl" >> defines.m4
|
||||
copystartscript $arch
|
||||
;;
|
||||
ppc) echo "define(HAVE_PPC,yes)dnl" >> defines.m4
|
||||
copystartscript $arch
|
||||
;;
|
||||
*)
|
||||
echo "architecture $arch unsupported"
|
||||
continue;
|
||||
;;
|
||||
esac
|
||||
archs[${#archs[@]}]=$arch
|
||||
done
|
||||
|
||||
tar --owner=root --group=root -C ./image/tmp -cf ./image/ioquake3.x86_64.tar .
|
||||
rm -rf image/tmp
|
||||
for arch in "${archs[@]}"; do
|
||||
dst=image/tmp
|
||||
mkdir $dst
|
||||
mkdir $dst/baseq3 $dst/demoq3 $dst/missionpack
|
||||
install -m 755 $topdir/build/release-linux-$arch/ioquake3.$arch $dst/ioquake3.$arch
|
||||
install -m 755 $topdir/build/release-linux-$arch/ioq3ded.$arch $dst/ioq3ded.$arch
|
||||
install -m 644 $topdir/build/release-linux-$arch/baseq3/*.so $dst/baseq3
|
||||
install -m 644 $topdir/build/release-linux-$arch/missionpack/*.so $dst/missionpack
|
||||
for i in cgame qagame ui; do
|
||||
ln -s ../baseq3/$i$arch.so $dst/demoq3
|
||||
done
|
||||
|
||||
mkdir image/tmp
|
||||
pushd image/tmp
|
||||
mkdir baseq3 demoq3 missionpack
|
||||
# ppc binaries
|
||||
install -m 755 $src/release-linux-ppc/ioquake3.ppc ioquake3.ppc
|
||||
install -m 755 $src/release-linux-ppc/ioq3ded.ppc ioq3ded.ppc
|
||||
install -m 644 $src/release-linux-ppc/baseq3/*.so baseq3
|
||||
install -m 644 $src/release-linux-ppc/missionpack/*.so missionpack
|
||||
pushd demoq3
|
||||
ln -s ../baseq3/*.so .
|
||||
popd
|
||||
popd
|
||||
|
||||
tar --owner=root --group=root -C ./image/tmp -cf ./image/ioquake3.ppc.tar .
|
||||
rm -rf image/tmp
|
||||
tar --owner=root --group=root -C $dst -cf ./image/ioquake3.$arch.tar .
|
||||
rm -rf ./image/tmp
|
||||
done
|
||||
|
||||
# patch pk3 files
|
||||
install -m 644 ./idpatchpk3s.tar image/idpatchpk3s.tar
|
||||
install -m 644 ./idtapatchpk3s.tar image/idtapatchpk3s.tar
|
||||
|
||||
### setup.xml
|
||||
sed 's/@VERSION@/'$VERSION'/g' < setup.xml > image/setup.data/setup.xml
|
||||
if [ -e ./idpatchpk3s.tar -a -e ./idtapatchpk3s.tar ]; then
|
||||
install -m 644 ./idpatchpk3s.tar image/idpatchpk3s.tar
|
||||
install -m 644 ./idtapatchpk3s.tar image/idtapatchpk3s.tar
|
||||
install -m 644 ./id_patch_pk3s_Q3A_EULA.txt image/id_patch_pk3s_Q3A_EULA.txt
|
||||
echo "define(HAVE_PATCHPK3,yes)dnl" >> defines.m4
|
||||
elif [ -e quake3-latest-pk3s.zip ]; then
|
||||
unzip quake3-latest-pk3s.zip
|
||||
chmod 644 quake3-latest-pk3s/*/*.pk3
|
||||
tar -C quake3-latest-pk3s/baseq3 -cf image/idpatchpk3s.tar .
|
||||
tar -C quake3-latest-pk3s/missionpack -cf image/idtapatchpk3s.tar .
|
||||
rm -r quake3-latest-pk3s
|
||||
install -m 644 id_patch_pk3s_Q3A_EULA.txt image/id_patch_pk3s_Q3A_EULA.txt
|
||||
echo "define(HAVE_PATCHPK3,yes)dnl" >> defines.m4
|
||||
fi
|
||||
|
||||
### uninstall script
|
||||
install -m 755 ./preuninstall.sh image/preuninstall.sh
|
||||
|
||||
### start script
|
||||
mkdir -p image/bin/Linux/x86
|
||||
mkdir -p image/bin/Linux/x86_64
|
||||
mkdir -p image/bin/Linux/ppc
|
||||
|
||||
install -m 755 ioquake3.sh image/bin/Linux/x86/ioquake3
|
||||
install -m 755 ioq3demo.sh image/bin/Linux/x86/ioq3demo
|
||||
install -m 755 ioquake3.sh image/bin/Linux/x86_64/ioquake3
|
||||
install -m 755 ioq3demo.sh image/bin/Linux/x86_64/ioq3demo
|
||||
install -m 755 ioquake3.sh image/bin/Linux/ppc/ioquake3
|
||||
install -m 755 ioq3demo.sh image/bin/Linux/ppc/ioq3demo
|
||||
|
||||
### README, COPYING and EULA
|
||||
install -m 644 ../../../README image/README
|
||||
install -m 644 ../../../COPYING.txt image/COPYING
|
||||
install -m 644 ./id_patch_pk3s_Q3A_EULA.txt image/id_patch_pk3s_Q3A_EULA.txt
|
||||
install -m 644 $topdir/README image/README
|
||||
install -m 644 $topdir/COPYING.txt image/COPYING
|
||||
|
||||
# create setup.xml
|
||||
m4 defines.m4 setup.xml.in > image/setup.data/setup.xml
|
||||
|
||||
### makeself installer
|
||||
$MAKESELF/makeself.sh image ioquake3-$VERSION-$RELEASE.run "ioquake3 $VERSION-$RELEASE" ./setup.sh
|
||||
ARCH=
|
||||
if [ "${#archs[@]}" -eq 1 ]; then
|
||||
ARCH=.$arch
|
||||
fi
|
||||
$MAKESELF/makeself.sh image ioquake3-$VERSION-$RELEASE$ARCH.run "ioquake3 $VERSION-$RELEASE" ./setup.sh
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
#!/bin/sh
|
||||
rm -f COPYING
|
||||
rmdir --ignore-fail-on-non-empty demoq3 missionpack >& /dev/null
|
||||
|
|
|
@ -1,104 +0,0 @@
|
|||
<?xml version="1.0" standalone="yes"?>
|
||||
<install product="ioquake3"
|
||||
desc="ioquake3"
|
||||
version="@VERSION@"
|
||||
update_url="http://www.ioquake3.org/updates.txt"
|
||||
promptbinaries="yes"
|
||||
reinstall="yes"
|
||||
nopromptoverwrite="yes"
|
||||
preuninstall="preuninstall.sh">
|
||||
<readme>
|
||||
README
|
||||
</readme>
|
||||
<eula>
|
||||
id_patch_pk3s_Q3A_EULA.txt
|
||||
</eula>
|
||||
|
||||
<component name="Quake3 Arena gamedata" version="@VERSION@" default="yes">
|
||||
<option size="457M">
|
||||
<help>
|
||||
If you don't select this, you must make sure to copy pak0.pk3 to the baseq3 directory manually.
|
||||
</help>
|
||||
Copy Quake3 Arena CD data
|
||||
<files cdromid="CD 1" path="baseq3" size="457M">
|
||||
Quake3/baseq3/pak0.pk3
|
||||
</files>
|
||||
</option>
|
||||
<option required="true" install="true" show="false">
|
||||
This needs to be fixed properly.
|
||||
<files path="baseq3">
|
||||
idpatchpk3s.tar
|
||||
</files>
|
||||
<files path="">
|
||||
COPYING
|
||||
</files>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
<component name="Quake3 Team Arena gamedata" version="@VERSION@">
|
||||
<option>
|
||||
Install Team Arena components
|
||||
<files path="missionpack">
|
||||
idtapatchpk3s.tar
|
||||
</files>
|
||||
<option size="457M">
|
||||
<help>
|
||||
If you don't select this, you must make sure to copy the TA pak0.pk3 to the missionpack directory manually.
|
||||
</help>
|
||||
Copy Quake3 Team Arena CD data
|
||||
<files cdromid="CD 2" path="missionpack" size="457M">
|
||||
Setup/missionpack/pak0.pk3
|
||||
</files>
|
||||
</option>
|
||||
</option>
|
||||
</component>
|
||||
<component arch="x86_64" name="x86_64" version="@VERSION@">
|
||||
<option install="true">
|
||||
x86_64 binaries
|
||||
<binary libc="any" symlink="ioquake3" icon="quake3.png"
|
||||
menu="." name="ioquake3">
|
||||
ioquake3
|
||||
</binary>
|
||||
<files>
|
||||
ioquake3.x86_64.tar
|
||||
quake3.png
|
||||
</files>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
<component if="|(x86,x86_64)" name="i386" version="@VERSION@">
|
||||
<option install="true">
|
||||
x86 (32 bit) binaries
|
||||
<binary libc="any" symlink="ioquake3" icon="quake3.png"
|
||||
menu="." name="ioquake3">
|
||||
ioquake3
|
||||
</binary>
|
||||
<files>
|
||||
ioquake3.i386.tar
|
||||
quake3.png
|
||||
</files>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
<component arch="ppc" name="ppc" version="@VERSION@">
|
||||
<option install="true">
|
||||
ppc 32 bit binaries
|
||||
<binary libc="any" symlink="ioquake3" icon="quake3.png"
|
||||
menu="." name="ioquake3">
|
||||
ioquake3
|
||||
</binary>
|
||||
<files>
|
||||
ioquake3.ppc.tar
|
||||
quake3.png
|
||||
</files>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
<cdrom id="CD 1" name="Quake 3 Arena installation CD">
|
||||
Setup/BaseEF/pak0.pk3
|
||||
</cdrom>
|
||||
<cdrom id="CD 2" name="Quake 3 Team Arena installation CD">
|
||||
Setup/missionpack/pak0.pk3
|
||||
</cdrom>
|
||||
|
||||
</install>
|
111
misc/setup/setup.xml.in
Normal file
111
misc/setup/setup.xml.in
Normal file
|
@ -0,0 +1,111 @@
|
|||
<?xml version="1.0" standalone="yes"?>
|
||||
<install product="ioquake3"
|
||||
desc="ioquake3"
|
||||
version="VERSION"
|
||||
update_url="http://www.ioquake3.org/updates.txt"
|
||||
promptbinaries="yes"
|
||||
reinstall="yes"
|
||||
nopromptoverwrite="yes"
|
||||
preuninstall="preuninstall.sh">
|
||||
<readme>
|
||||
README
|
||||
</readme>
|
||||
|
||||
<component name="Default" version="VERSION" default="yes">
|
||||
ifelse(HAVE_X86_64,yes,dnl
|
||||
<option install="true" arch="x86_64">
|
||||
ioq3 x86_64 binaries
|
||||
<binary libc="any" symlink="ioquake3" icon="quake3.png" name="ioquake3">ioquake3</binary>
|
||||
<files>
|
||||
ioquake3.x86_64.tar
|
||||
</files>
|
||||
<help>you need the binaries to play the game</help>
|
||||
</option>
|
||||
)dnl
|
||||
ifelse(HAVE_I386,yes,dnl
|
||||
<option install="true" if="|(x86,x86_64)">
|
||||
ioq3 x86 (32 bit) binaries
|
||||
<binary libc="any" symlink="ioquake3" icon="quake3.png" name="ioquake3">ioquake3</binary>
|
||||
<files>
|
||||
ioquake3.i386.tar
|
||||
</files>
|
||||
<help>you need the binaries to play the game</help>
|
||||
</option>
|
||||
)dnl
|
||||
ifelse(HAVE_PPC,yes,dnl
|
||||
<option install="true">
|
||||
<binary libc="any" symlink="ioquake3" icon="quake3.png" name="ioquake3">ioquake3</binary>
|
||||
ioq3 ppc binaries
|
||||
<files>
|
||||
ioquake3.ppc.tar
|
||||
</files>
|
||||
<help>you need the binaries to play the game</help>
|
||||
</option>
|
||||
)dnl
|
||||
<option install="true" show="false">
|
||||
shared data
|
||||
<files>
|
||||
quake3.png
|
||||
COPYING
|
||||
</files>
|
||||
</option>
|
||||
</component>
|
||||
ifelse(HAVE_PATCHPK3,yes,dnl
|
||||
|
||||
<component name="Quake III Arena" version="VERSION">
|
||||
<eula>
|
||||
id_patch_pk3s_Q3A_EULA.txt
|
||||
</eula>
|
||||
|
||||
<option install="true">
|
||||
Quake III Arena Point Release 1.32 data files
|
||||
<files path="baseq3">
|
||||
idpatchpk3s.tar
|
||||
</files>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<help>
|
||||
If you don't select this you need to copy pak0.pk3 to the baseq3 directory manually.
|
||||
</help>
|
||||
Quake III Arena CDROM data
|
||||
<files cdromid="CD 1" path="baseq3"
|
||||
md5sum="1197ca3df1e65f3c380f8abc10ca43bf"
|
||||
size="458M" mode="0664">
|
||||
Quake3/baseq3/pak0.pk3
|
||||
</files>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
<component name="Quake III Team Arena" version="VERSION">
|
||||
<eula>
|
||||
id_patch_pk3s_Q3A_EULA.txt
|
||||
</eula>
|
||||
|
||||
<option install="true">
|
||||
Quake III Team Arena Point Release 1.32 data files
|
||||
<files path="missionpack">
|
||||
idtapatchpk3s.tar
|
||||
</files>
|
||||
</option>
|
||||
<option>
|
||||
<help>
|
||||
If you don't select this you need to copy the TA pak0.pk3 to the missionpack directory manually.
|
||||
</help>
|
||||
Quake III Team Arena CDROM data
|
||||
<files cdromid="CD 2" path="missionpack" size="336M"
|
||||
md5sum="e8ba9e3bf06210930bc0e7fdbcdd01c2" mode="0644">
|
||||
Setup/missionpack/pak0.pk3
|
||||
</files>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
<cdrom id="CD 1" name="Quake 3 Arena installation CD">
|
||||
Quake3/baseq3/pak0.pk3
|
||||
</cdrom>
|
||||
<cdrom id="CD 2" name="Quake 3 Team Arena installation CD">
|
||||
Setup/missionpack/pak0.pk3
|
||||
</cdrom>
|
||||
)dnl
|
||||
|
||||
</install>
|
Loading…
Reference in a new issue