mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 13:11:30 +00:00
Extend the installer to offer more options
This commit is contained in:
parent
cec7660885
commit
c34c94294d
2 changed files with 107 additions and 44 deletions
|
@ -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}
|
||||
|
@ -11,14 +11,6 @@ set -x
|
|||
|
||||
arch=`uname -m`
|
||||
|
||||
# $§&%!!
|
||||
setup_arch=$arch
|
||||
links=
|
||||
case "$arch" in
|
||||
i?86) arch=i386; setup_arch=x86; links="amd64 x86_64" ;;
|
||||
x86_64) links=amd64
|
||||
esac
|
||||
|
||||
rm -rf image
|
||||
mkdir image
|
||||
|
||||
|
@ -32,36 +24,59 @@ rm -f image/quake3.png
|
|||
cp ../quake3.png image/quake3.png
|
||||
|
||||
### binaries
|
||||
src="../../../../../build"
|
||||
|
||||
mkdir image/tmp
|
||||
pushd image/tmp
|
||||
mkdir baseq3 demoq3 missionpack
|
||||
src="../../../../../build/release-linux-$arch/"
|
||||
install -m 755 $src/ioquake3.$arch ioquake3.$arch
|
||||
install -m 755 $src/ioq3ded.$arch ioq3ded.$arch
|
||||
install -m 644 $src/baseq3/*.so baseq3
|
||||
install -m 644 $src/missionpack/*.so 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
|
||||
|
||||
tar --owner=root --group=root -C image/tmp -cf image/ioquake3.tar .
|
||||
tar --owner=root --group=root -C ./image/tmp -cf ./image/ioquake3.i386.tar .
|
||||
rm -rf ./image/tmp
|
||||
|
||||
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
|
||||
|
||||
tar --owner=root --group=root -C ./image/tmp -cf ./image/ioquake3.x86_64.tar .
|
||||
rm -rf image/tmp
|
||||
|
||||
# patch pk3 files
|
||||
install -m 644 ./idpatchpk3s.tar image/idpatchpk3s.tar
|
||||
|
||||
### setup.xml
|
||||
sed 's/@VERSION@/'$VERSION'/g' < setup.xml > image/setup.data/setup.xml
|
||||
|
||||
### start script
|
||||
mkdir -p image/bin/Linux/$setup_arch
|
||||
for i in $links; do
|
||||
ln -s $setup_arch image/bin/Linux/$i
|
||||
done
|
||||
install -m 755 ioquake3.sh image/bin/Linux/$setup_arch/ioquake3
|
||||
install -m 755 ioq3demo.sh image/bin/Linux/$setup_arch/ioq3demo
|
||||
mkdir -p image/bin/Linux/x86
|
||||
mkdir -p image/bin/Linux/x86_64
|
||||
|
||||
### README and COPYING
|
||||
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
|
||||
|
||||
### 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
|
||||
|
||||
### makeself installer
|
||||
$MAKESELF/makeself.sh image ioquake3-$VERSION-$RELEASE.$arch.run "ioquake3 $VERSION" ./setup.sh
|
||||
|
|
|
@ -3,34 +3,82 @@
|
|||
desc="ioquake3"
|
||||
version="@VERSION@"
|
||||
update_url="http://www.icculus.org/quake3/updates.txt"
|
||||
promptbinaries="yes">
|
||||
promptbinaries="yes"
|
||||
reinstall="yes"
|
||||
nopromptoverwrite="yes">
|
||||
<readme>
|
||||
README
|
||||
</readme>
|
||||
<!--
|
||||
<eula>
|
||||
COPYING
|
||||
id_patch_pk3s_Q3A_EULA.txt
|
||||
</eula>
|
||||
-->
|
||||
<component name="Default" version="@VERSION@" default="yes">
|
||||
<option install="true" required="true">
|
||||
Quake 3
|
||||
|
||||
<binary arch="any" libc="any" symlink="ioquake3" icon="quake3.png" play="yes"
|
||||
name="ioquake3">
|
||||
ioquake3
|
||||
</binary>
|
||||
<files>
|
||||
ioquake3.tar
|
||||
quake3.png
|
||||
</files>
|
||||
<component name="Quake3 Arena gamedata" version="@VERSION@" showname="no" default="yes">
|
||||
<option install="true" size="457M">
|
||||
<help>
|
||||
If you don't select this, you must make sure to copy pak0.pk3 to the
|
||||
baseq3 directory manually.
|
||||
</help>
|
||||
Quake3 Arena gamedata
|
||||
<files cdromid="CD 1" path="baseq3" size="457M">
|
||||
Quake3/baseq3/pak0.pk3
|
||||
</files>
|
||||
</option>
|
||||
<option install="false" required="false">
|
||||
Quake 3 Demo start script
|
||||
<binary arch="any" libc="any" symlink="ioq3demo" icon="quake3.png" play="no"
|
||||
name="ioquake3 (Demo)">
|
||||
ioq3demo
|
||||
</binary>
|
||||
<option required="true" install="true" show="false">
|
||||
<files path="baseq3">
|
||||
idpatchpk3s.tar
|
||||
</files>
|
||||
<files path="">
|
||||
COPYING
|
||||
</files>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
<component name="Quake3 Team Arena gamedata" version="@VERSION@" showname="no" default="yes">
|
||||
<option install="true" 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>
|
||||
Quake3 Team Arena gamedata
|
||||
<files cdromid="CD 2" path="missionpack" size="457M">
|
||||
Setup/missionpack/pak0.pk3
|
||||
</files>
|
||||
</option>
|
||||
</component>
|
||||
<component arch="x86_64" name="x86_64" version="@VERSION@" showname="no">
|
||||
<option arch="x86_64" install="true">
|
||||
64 bit binaries
|
||||
<binary arch="any" 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@" showname="no">
|
||||
<option arch="x86_64" install="true">
|
||||
32 bit binaries
|
||||
<binary arch="any" libc="any" symlink="ioquake3" icon="quake3.png"
|
||||
menu="." name="ioquake3">
|
||||
ioquake3
|
||||
</binary>
|
||||
<files>
|
||||
ioquake3.i386.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>
|
||||
|
|
Loading…
Reference in a new issue