mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-14 00:40:39 +00:00
files to create a loki-setup based installer. run "make installer"
This commit is contained in:
parent
64025e68f0
commit
be42cb3201
7 changed files with 196 additions and 2 deletions
4
Makefile
4
Makefile
|
@ -1,6 +1,6 @@
|
||||||
VERSION=1.33_SVN$(shell LANG=C svnversion .)
|
VERSION=1.33_SVN$(shell LANG=C svnversion .)
|
||||||
|
|
||||||
release debug clean distclean copyfiles:
|
release debug clean distclean copyfiles installer:
|
||||||
$(MAKE) -C code/unix $@
|
$(MAKE) -C code/unix $@
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
|
@ -10,4 +10,4 @@ dist:
|
||||||
tar --force-local -cjf quake3-$(VERSION).tar.bz2 quake3-$(VERSION)
|
tar --force-local -cjf quake3-$(VERSION).tar.bz2 quake3-$(VERSION)
|
||||||
rm -rf quake3-$(VERSION)
|
rm -rf quake3-$(VERSION)
|
||||||
|
|
||||||
.PHONY: release debug clean distclean
|
.PHONY: release debug clean distclean copyfiles installer
|
||||||
|
|
|
@ -1762,6 +1762,7 @@ copyfiles: build_release
|
||||||
$(COPYDIR)/missionpack/.
|
$(COPYDIR)/missionpack/.
|
||||||
|
|
||||||
clean:clean-debug clean-release
|
clean:clean-debug clean-release
|
||||||
|
$(MAKE) -C setup clean
|
||||||
|
|
||||||
clean2:
|
clean2:
|
||||||
if [ -d $(B) ];then (find $(B) -name '*.d' -exec rm {} \;)fi
|
if [ -d $(B) ];then (find $(B) -name '*.d' -exec rm {} \;)fi
|
||||||
|
@ -1780,6 +1781,9 @@ distclean: clean
|
||||||
$(MAKE) -C ../tools/asm clean uninstall
|
$(MAKE) -C ../tools/asm clean uninstall
|
||||||
$(MAKE) -C ../tools/lcc clean uninstall
|
$(MAKE) -C ../tools/lcc clean uninstall
|
||||||
|
|
||||||
|
installer: build_release
|
||||||
|
$(MAKE) VERSION=$(VERSION) -C setup
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# DEPENDENCIES
|
# DEPENDENCIES
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
15
code/unix/setup/Makefile
Normal file
15
code/unix/setup/Makefile
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
VERSION=FIXME
|
||||||
|
RELEASE=1
|
||||||
|
|
||||||
|
all:
|
||||||
|
VERSION=$(VERSION) RELEASE=$(RELEASE) ./doit
|
||||||
|
|
||||||
|
sign:
|
||||||
|
for i in *.run; do \
|
||||||
|
gpg -bao $$i.asc $$i; \
|
||||||
|
done
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf *.run image
|
||||||
|
|
||||||
|
.PHONY: all sign clean
|
57
code/unix/setup/doit
Executable file
57
code/unix/setup/doit
Executable file
|
@ -0,0 +1,57 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
: ${MAKESELF:=/usr/share/loki-setup/makeself}
|
||||||
|
: ${SETUPIMAGE:=/usr/share/loki-setup/image}
|
||||||
|
|
||||||
|
: ${VERSION:=0.0_`date +%Y%m%d%H%M`}
|
||||||
|
: ${RELEASE:=0}
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
arch=`uname -m`
|
||||||
|
case "$arch" in
|
||||||
|
i?86) arch=i386 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
rm -rf image
|
||||||
|
mkdir image
|
||||||
|
|
||||||
|
### loki-setup files
|
||||||
|
cp -a $SETUPIMAGE/{setup.data,setup.sh} image/
|
||||||
|
|
||||||
|
### splash
|
||||||
|
convert ../../../web/images/quake3.jpg image/setup.data/splash.xpm
|
||||||
|
|
||||||
|
### binaries
|
||||||
|
mkdir image/tmp
|
||||||
|
pushd image/tmp
|
||||||
|
mkdir baseq3 demoq3 missionpack
|
||||||
|
src="../../../release$arch-glibc/"
|
||||||
|
install -m 755 $src/linuxquake3 ioquake3.$arch
|
||||||
|
install -m 755 $src/linuxq3ded ioq3ded.$arch
|
||||||
|
install -m 644 $src/baseq3/*.so baseq3
|
||||||
|
install -m 644 $src/missionpack/*.so missionpack
|
||||||
|
pushd demoq3
|
||||||
|
ln -s ../baseq3/*.so .
|
||||||
|
popd
|
||||||
|
popd
|
||||||
|
|
||||||
|
tar --owner=root --group=root -C image/tmp -cf image/ioquake3.tar .
|
||||||
|
rm -rf image/tmp
|
||||||
|
|
||||||
|
### setup.xml
|
||||||
|
sed 's/@VERSION@/'$VERSION'/g' < setup.xml > image/setup.data/setup.xml
|
||||||
|
|
||||||
|
### start script
|
||||||
|
mkdir -p image/bin/Linux/$arch
|
||||||
|
ln -s x86_64 image/bin/Linux/amd64 # $§&%!!
|
||||||
|
install -m 755 ioquake3.sh image/bin/Linux/$arch/ioquake3
|
||||||
|
install -m 755 ioq3demo.sh image/bin/Linux/$arch/ioq3demo
|
||||||
|
|
||||||
|
### README and COPYING
|
||||||
|
install -m 644 ../../../README image/README
|
||||||
|
install -m 644 ../../../COPYING.txt image/COPYING
|
||||||
|
|
||||||
|
### makeself installer
|
||||||
|
$MAKESELF/makeself.sh image ioquake3-$VERSION-$RELEASE.$arch.run "icculus.org/quake3 $VERSION" ./setup.sh
|
44
code/unix/setup/ioq3demo.sh
Normal file
44
code/unix/setup/ioq3demo.sh
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
readlink() {
|
||||||
|
local path=$1 ll
|
||||||
|
|
||||||
|
if [ -L "$path" ]; then
|
||||||
|
ll="$(LC_ALL=C ls -l "$path" 2> /dev/null)" &&
|
||||||
|
echo "${ll/* -> }"
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
script=$0
|
||||||
|
count=0
|
||||||
|
while [ -L "$script" ]
|
||||||
|
do
|
||||||
|
script=$(readlink "$script")
|
||||||
|
count=`expr $count + 1`
|
||||||
|
if [ $count -gt 100 ]
|
||||||
|
then
|
||||||
|
echo "Too many symbolic links"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
cd "`dirname $script`"
|
||||||
|
|
||||||
|
|
||||||
|
lib=lib
|
||||||
|
test -e lib64 && lib=lib64
|
||||||
|
|
||||||
|
if test "x$LD_LIBRARY_PATH" = x; then
|
||||||
|
LD_LIBRARY_PATH="`pwd`/$lib"
|
||||||
|
else
|
||||||
|
LD_LIBRARY_PATH="`pwd`/$lib:$LD_LIBRARY_PATH"
|
||||||
|
fi
|
||||||
|
export LD_LIBRARY_PATH
|
||||||
|
|
||||||
|
arch=`uname -m`
|
||||||
|
case "$arch" in
|
||||||
|
i?86) arch=i386 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exec ./ioquake3.$arch +set sv_pure 0 +set vm_cgame 0 +set vm_game 0 +set vm_ui 0 +set fs_game demoq3 "$@"
|
44
code/unix/setup/ioquake3.sh
Normal file
44
code/unix/setup/ioquake3.sh
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
readlink() {
|
||||||
|
local path=$1 ll
|
||||||
|
|
||||||
|
if [ -L "$path" ]; then
|
||||||
|
ll="$(LC_ALL=C ls -l "$path" 2> /dev/null)" &&
|
||||||
|
echo "${ll/* -> }"
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
script=$0
|
||||||
|
count=0
|
||||||
|
while [ -L "$script" ]
|
||||||
|
do
|
||||||
|
script=$(readlink "$script")
|
||||||
|
count=`expr $count + 1`
|
||||||
|
if [ $count -gt 100 ]
|
||||||
|
then
|
||||||
|
echo "Too many symbolic links"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
cd "`dirname $script`"
|
||||||
|
|
||||||
|
|
||||||
|
lib=lib
|
||||||
|
test -e lib64 && lib=lib64
|
||||||
|
|
||||||
|
if test "x$LD_LIBRARY_PATH" = x; then
|
||||||
|
LD_LIBRARY_PATH="`pwd`/$lib"
|
||||||
|
else
|
||||||
|
LD_LIBRARY_PATH="`pwd`/$lib:$LD_LIBRARY_PATH"
|
||||||
|
fi
|
||||||
|
export LD_LIBRARY_PATH
|
||||||
|
|
||||||
|
arch=`uname -m`
|
||||||
|
case "$arch" in
|
||||||
|
i?86) arch=i386 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exec ./ioquake3.$arch "$@"
|
30
code/unix/setup/setup.xml
Normal file
30
code/unix/setup/setup.xml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" standalone="yes"?>
|
||||||
|
<install product="ioquake3"
|
||||||
|
desc="icculus.org/quake3"
|
||||||
|
version="@VERSION@"
|
||||||
|
promptbinaries="yes">
|
||||||
|
<readme>
|
||||||
|
README
|
||||||
|
</readme>
|
||||||
|
<eula>
|
||||||
|
COPYING
|
||||||
|
</eula>
|
||||||
|
<component name="Default" version="@VERSION@" default="yes">
|
||||||
|
<option install="true" required="true">
|
||||||
|
Quake 3
|
||||||
|
|
||||||
|
<binary arch="any" libc="any" symlink="ioquake3" icon="icon.xpm" play="yes"
|
||||||
|
name="icculus.org/quake3">
|
||||||
|
ioquake3
|
||||||
|
</binary>
|
||||||
|
<binary arch="any" libc="any" symlink="ioq3demo" icon="icon.xpm" play="no"
|
||||||
|
name="icculus.org/quake3 (Demo)">
|
||||||
|
ioq3demo
|
||||||
|
</binary>
|
||||||
|
<files>
|
||||||
|
ioquake3.tar
|
||||||
|
icon.xpm
|
||||||
|
</files>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</install>
|
Loading…
Reference in a new issue