build self-extracting archive, by Bernd Machenschalk

svn path=/trunk/boinc/; revision=4995
This commit is contained in:
Bruce Allen 2005-01-05 13:20:37 +00:00
parent 05cb2b383e
commit 35336574c8
5 changed files with 77 additions and 1 deletions

View File

@ -17,7 +17,7 @@ if ENABLE_CLIENT
endif
if BUILD_CLIENTGUI
CLIENTGUI_SUBDIRS = clientgui
CLIENTGUI_SUBDIRS = clientgui sea
endif
# ORDER MATTERS below. One must build dependencies FIRST, then things

View File

@ -22075,3 +22075,18 @@ David 3 Jan 2005
reduce.C (removed)
reduce_lib.C (new)
reduce_main.C (new)
Bruce 5 Jan 2005
- added new directory which builds a self-extracting tar
archive (executable shell script) for installation on
unix platforms. This will only be made when building
the client GUI and installs both the boinc client and
client GUI. Written and tested by Bernd Machenschalk.
Makefile.am
sea/ [New Directory]
make-sea.sh
Makefile
BOINC/
binstall.sh

4
sea/BOINC/binstall.sh Normal file
View File

@ -0,0 +1,4 @@
cd BOINC &&
echo "cd \"`pwd`\" && ./boinc_client" > run_client &&
chmod +x run_client
echo now run `pwd`/run_client to run the client and `pwd`/boinc_gui to run the GUI

16
sea/Makefile Normal file
View File

@ -0,0 +1,16 @@
all: boinc_sea.sh
boinc_sea.sh: make-sea.sh sea.tar
./make-sea.sh sea.tar boinc_sea.sh BOINC/binstall.sh
sea.tar: BOINC/boinc_client BOINC/boinc_gui BOINC/binstall.sh
tar chf $@ $^
BOINC/boinc_client: ../client/boinc_client
ln -s ../$< $@
BOINC/boinc_gui: ../clientgui/boinc_gui
ln -s ../$< $@
clean:
rm -f BOINC/boinc_* sea.tar boinc_sea.sh

41
sea/make-sea.sh Executable file
View File

@ -0,0 +1,41 @@
#!/bin/sh
if [ $# -lt 1 ] || [ $# -gt 3 ]; then
echo 'usage: make-sea.sh <archive.tar> [<filename>.sh] [<install-script>.sh]'
exit
fi
# parse optional arguments
if [ -z "$2" ]; then
filename="`uname`_sea.sh"
else
filename="$2"
fi
if [ -z "$3" ]; then
install=install.sh
else
install="$3"
fi
# peek into archive for the install skript
if tar tf "$1" | grep "$install" >/dev/null; then
:
else
echo "the archive \"$1\" doesn't contain the specified install skript \"$install\""
exit
fi
# find out about compression to use
# Linux usually doesn't even have compress, otherwise its standard
if [ `uname` = "Linux" ]; then
compress=gzip
expand=gunzip
else
compress=compress
expand=uncompress
fi
echo '#!/bin/sh
tail +4 < "$0" | '$expand' | tar xf - && /bin/sh '"$install $*"'
exit' > "$filename" &&
$compress < "$1" >> "$filename" &&
chmod +x "$filename"