2011-02-26 23:01:21 +00:00
|
|
|
#!/bin/bash
|
2005-10-29 14:45:31 +00:00
|
|
|
# $Id$
|
2005-11-06 14:05:27 +00:00
|
|
|
# Create a archive 'gpd*.zip' (gpdYMMDD.zip) with DOS/DPMI (DJGPP) build
|
2005-10-29 14:44:10 +00:00
|
|
|
# of the Golded+.
|
|
|
|
|
2011-04-09 08:10:21 +00:00
|
|
|
# To build, download following files:
|
|
|
|
#
|
|
|
|
# http://www.delorie.com/pub/djgpp/beta/v2/djdev204.zip
|
|
|
|
# http://www.delorie.com/pub/djgpp/beta/v2/djtzn204.zip
|
|
|
|
#
|
|
|
|
# http://www.delorie.com/pub/djgpp/beta/v2gnu/bnu219a.zip
|
|
|
|
# http://www.delorie.com/pub/djgpp/beta/v2gnu/bnu219b.zip
|
|
|
|
# http://www.delorie.com/pub/djgpp/beta/v2gnu/bsh205bbr3.zip
|
|
|
|
# http://www.delorie.com/pub/djgpp/beta/v2gnu/fil41b.zip
|
|
|
|
# http://www.delorie.com/pub/djgpp/beta/v2gnu/gcc442b.zip
|
|
|
|
# http://www.delorie.com/pub/djgpp/beta/v2gnu/gpp442b.zip
|
|
|
|
# http://www.delorie.com/pub/djgpp/beta/v2gnu/gro116b.zip
|
|
|
|
# http://www.delorie.com/pub/djgpp/beta/v2gnu/grp251ab.zip
|
|
|
|
# http://www.delorie.com/pub/djgpp/beta/v2gnu/licv192b.zip
|
|
|
|
# http://www.delorie.com/pub/djgpp/beta/v2gnu/mak381b.zip
|
|
|
|
# http://www.delorie.com/pub/djgpp/beta/v2gnu/sed421b.zip
|
|
|
|
# http://www.delorie.com/pub/djgpp/beta/v2gnu/shl2011b.zip
|
|
|
|
#
|
|
|
|
# http://www.delorie.com/pub/djgpp/current/v2misc/wmemu21b.zip
|
|
|
|
# http://www.delorie.com/pub/djgpp/current/v2tk/llocl02b.zip
|
|
|
|
#
|
2010-03-18 23:01:24 +00:00
|
|
|
# Next extract all these files into one directory (for example, C:\DJGPP\)
|
|
|
|
# Next set enviroment variable DJGPP to C:\DJGPP\DJGPP.ENV
|
|
|
|
# Last add the directory "C:\DJGPP\" into PATH enviroment variable.
|
|
|
|
# After this, run bash dist-gpd.sh, edir golded3/mygolded.h and run dist-gpd.sh second time.
|
|
|
|
#
|
|
|
|
|
2005-10-29 14:44:10 +00:00
|
|
|
if [ ! "$OSTYPE" = "msdosdjgpp" ]
|
|
|
|
then
|
|
|
|
echo "This is not DJGPP enviroment, exit."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2011-02-26 23:01:21 +00:00
|
|
|
srcdatefile=srcdate.h
|
|
|
|
build=`sed -n 's/.*"\([[:digit:]]\{8\}\)".*/\1/p' $srcdatefile`
|
|
|
|
date="$build"
|
|
|
|
#shortdate=`echo ${date} | sed s/^...//`
|
|
|
|
shortdate=${date/???/}
|
|
|
|
platform="djg"
|
|
|
|
binsuffix="${platform}.exe"
|
|
|
|
binesdir="bin"
|
|
|
|
dizfile="$binesdir/file_id.diz"
|
2005-10-29 14:44:10 +00:00
|
|
|
name=../gpd${shortdate}.zip
|
|
|
|
dosname=..\\gpd${shortdate}.zip
|
|
|
|
|
2006-02-18 14:08:47 +00:00
|
|
|
echo Build a Golded+/DPMI binary package: ${name} and ${shortname}
|
|
|
|
|
2006-02-18 15:23:03 +00:00
|
|
|
if [ ! -f golded3/mygolded.h ]; then
|
|
|
|
cp golded3/mygolded.__h golded3/mygolded.h
|
2006-02-20 08:42:13 +00:00
|
|
|
echo "golded3/mygolded.h is created now. Please edit this file"
|
|
|
|
exit 1
|
2006-02-18 15:23:03 +00:00
|
|
|
fi
|
2005-10-29 14:44:10 +00:00
|
|
|
|
2011-02-26 23:01:21 +00:00
|
|
|
bines="${binesdir}/ged${binsuffix} ${binesdir}/gn${binsuffix} ${binesdir}/rddt${binsuffix}"
|
2006-02-20 08:39:04 +00:00
|
|
|
files="${bines} docs/copying docs/copying.lib golded.bat"
|
2005-10-29 14:44:10 +00:00
|
|
|
files="${files} docs/golded.html docs/golded.txt docs/goldnode.html"
|
|
|
|
files="${files} docs/goldnode.txt docs/license.txt docs/notework.txt"
|
2011-02-19 22:36:34 +00:00
|
|
|
files="${files} docs/rddt.html docs/rddt.txt docs/readme.txt docs/notework.rus"
|
2005-10-29 14:44:10 +00:00
|
|
|
files="${files} docs/rusfaq.txt docs/tips.txt docs/todowork.txt"
|
2011-02-26 23:01:21 +00:00
|
|
|
files="${files} docs/tokencfg.txt docs/tokentpl.txt ${dizfile}"
|
2005-10-29 14:44:10 +00:00
|
|
|
|
2011-02-26 23:01:21 +00:00
|
|
|
compilerver=`gcc -v 2>&1 | sed -n -e '/^gcc version/{s/gcc version \([[:digit:].]\{2,\}\)\s\((\([[:alnum:]]\{2,\}\)\sspecial\).*/\1 \3/p;q}'`
|
|
|
|
printf 'GoldED+1.1.5 beta at %8.8s\r\n' $build >${dizfile}
|
|
|
|
printf 'DOS32-DPMI binaries compiled\r\n' >>${dizfile}
|
|
|
|
printf 'using DJGPP GNU C/C++ %-7.7s\r\n' "$compilerver" >>${dizfile}
|
|
|
|
printf 'This is unstable release and\r\n' >>${dizfile}
|
|
|
|
printf 'it should be used for testing\r\n' >>${dizfile}
|
|
|
|
printf -- '-----------------------------\r\n' >>${dizfile}
|
|
|
|
printf ' *http://golded-plus.sf.net* \r\n' >>${dizfile}
|
2005-10-29 14:44:10 +00:00
|
|
|
|
2011-02-26 23:01:21 +00:00
|
|
|
for f in ${bines}; do rm $f; done
|
2006-01-18 21:36:01 +00:00
|
|
|
|
2011-03-04 19:10:13 +00:00
|
|
|
make PLATFORM=${platform} clean all strip docs || (echo "Error $?" ; exit)
|
2006-02-20 08:39:04 +00:00
|
|
|
|
|
|
|
for i in ${bines} ; do
|
2006-02-20 16:56:28 +00:00
|
|
|
if [ ! -f ${i} ] ; then echo "File ${i} not exists, stop!"; exit 1 ; fi
|
2006-02-20 08:39:04 +00:00
|
|
|
done
|
|
|
|
|
2011-02-26 23:01:21 +00:00
|
|
|
#zip -9DXj ${name} $files
|
|
|
|
#7za a -tzip ${name} $files
|
2005-10-29 14:44:10 +00:00
|
|
|
|
|
|
|
echo ${files} | sed "s/ /\n/g" >files.lst
|
|
|
|
pkzip ${dosname} @files.lst
|
2007-05-03 09:52:20 +00:00
|
|
|
rm files.lst
|