fixed makeinnosetup
This commit is contained in:
parent
736fbbda8a
commit
4c78da34b2
@ -1,12 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
VERSION=`make -s version`
|
||||||
|
|
||||||
print_header()
|
print_header()
|
||||||
{
|
{
|
||||||
cat <<- EOF
|
cat <<- EOF
|
||||||
[Setup]
|
[Setup]
|
||||||
AppName=Open Scene Graph
|
AppName=Open Scene Graph
|
||||||
AppVerName=Open Scene Graph `make -s version`
|
AppVerName=Open Scene Graph $VERSION
|
||||||
AppPublisher=OpenSceneGraph
|
AppPublisher=OpenSceneGraph
|
||||||
AppPublisherURL=http://www.openscenegraph.com
|
AppPublisherURL=http://www.openscenegraph.com
|
||||||
AppSupportURL=http://www.openscenegraph.com
|
AppSupportURL=http://www.openscenegraph.com
|
||||||
@ -15,38 +16,70 @@ DefaultDirName={pf}\OpenSceneGraph
|
|||||||
DisableDirPage=yes
|
DisableDirPage=yes
|
||||||
DefaultGroupName=OpenSceneGraph
|
DefaultGroupName=OpenSceneGraph
|
||||||
DisableProgramGroupPage=yes
|
DisableProgramGroupPage=yes
|
||||||
LicenseFile=COPYING.txt
|
LicenseFile=LICENSE.txt
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Usage:
|
# Usage:
|
||||||
# do_dir $DIR
|
# do_dir $DIR
|
||||||
#
|
#
|
||||||
|
|
||||||
|
print_file_entry()
|
||||||
|
{
|
||||||
|
DIR=$1
|
||||||
|
FILE=$2
|
||||||
|
printf "Source: \"%s\\\%s\"; DestDir: \"{app}\\\%s\\\"; Flags: ignoreversion\n"\
|
||||||
|
$DIR $FILE $DIR
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
do_dir()
|
do_dir()
|
||||||
{
|
{
|
||||||
DIR=$1
|
DIR=$1
|
||||||
|
shift;
|
||||||
|
|
||||||
DOS_DIR=`echo $DIR | sed 's/\\//\\\/g'`
|
DOS_DIR=`echo $DIR | sed 's/\\//\\\/g'`
|
||||||
|
|
||||||
for f in `find $DIR -type f -print | grep -v CVS`
|
if [ $# -gt 0 ]
|
||||||
|
then
|
||||||
|
while [ $# -gt 0 ]
|
||||||
do
|
do
|
||||||
FILE=`basename $f`
|
match=$1
|
||||||
printf "Source: \"%s\\\%s\"; DestDir: \"{app}\\\%s\\\"; CopyMode: alwaysoverwrite\n"\
|
shift;
|
||||||
$DOS_DIR $FILE $DOS_DIR
|
for f in `find $DIR -type f | \
|
||||||
|
grep -v CVS | \
|
||||||
|
grep osg |
|
||||||
|
grep "$match"`
|
||||||
|
do
|
||||||
|
print_file_entry $DOS_DIR `basename $f`
|
||||||
done
|
done
|
||||||
|
done
|
||||||
|
else
|
||||||
|
for f in `find $DIR -type f | grep -v CVS | grep osg`
|
||||||
|
do
|
||||||
|
print_file_entry $DOS_DIR `basename $f`
|
||||||
|
done
|
||||||
|
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
print_files()
|
print_files()
|
||||||
{
|
{
|
||||||
echo "[Files]"
|
echo "[Files]"
|
||||||
|
|
||||||
do_dir lib
|
do_dir lib .lib
|
||||||
do_dir bin
|
do_dir bin .exe .dll
|
||||||
for dir in `ls -1 include| grep -v CVS`
|
for dir in `ls -1 include | grep osg | grep -v CVS`
|
||||||
do
|
do
|
||||||
do_dir "include/$dir"
|
do_dir include/"$dir"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print_script()
|
||||||
|
{
|
||||||
|
print_header
|
||||||
|
print_files
|
||||||
|
}
|
||||||
|
|
||||||
BUILD_ISS=1
|
BUILD_ISS=1
|
||||||
BUILD_DISTRIBUTION=1
|
BUILD_DISTRIBUTION=1
|
||||||
@ -61,6 +94,16 @@ do
|
|||||||
CLEAN_UP=1
|
CLEAN_UP=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
-d )
|
||||||
|
BUILD_ISS=0
|
||||||
|
BUILD_DISTRIBUTION=1
|
||||||
|
CLEAN_UP=0
|
||||||
|
;;
|
||||||
|
|
||||||
|
-n )
|
||||||
|
CLEAN_UP=0
|
||||||
|
;;
|
||||||
|
|
||||||
-s )
|
-s )
|
||||||
BUILD_ISS=1
|
BUILD_ISS=1
|
||||||
BUILD_DISTRIBUTION=0
|
BUILD_DISTRIBUTION=0
|
||||||
@ -75,19 +118,20 @@ if [ $BUILD_ISS = 1 ]
|
|||||||
then
|
then
|
||||||
echo Building Inno Setup script ....
|
echo Building Inno Setup script ....
|
||||||
rm -f osg.iss
|
rm -f osg.iss
|
||||||
print_header >> osg.iss
|
|
||||||
print_files >> osg.iss
|
print_script | awk '{ printf "%s\r\n", $0 }' > osg.iss
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $BUILD_DISTRIBUTION = 1 ]
|
if [ $BUILD_DISTRIBUTION = 1 ]
|
||||||
then
|
then
|
||||||
echo Building distribution ...
|
echo Building distribution ...
|
||||||
OS=`uname | cut -b1-6`
|
OS=`uname | cut -b1-6`
|
||||||
if [ "$OS" = "Cygwin" ]
|
|
||||||
|
if [ "$OS" = "CYGWIN" ]
|
||||||
then
|
then
|
||||||
C:/Program\ Files/Inno\ Setup\ 3/iscc.exe osg.iss
|
C:/Program\ Files/Inno\ Setup\ 3/iscc.exe osg.iss
|
||||||
[ -d dist/Win32 ] || mkdir -p dist/Win32
|
[ -d dist/Win32 ] || mkdir -p dist/Win32
|
||||||
mv Output/setup.exe dist/Win32/OpenSceneGraph_setup.exe
|
mv Output/setup.exe dist/Win32/OpenSceneGraph_"$VERSION"_setup.exe
|
||||||
rm -rf Output
|
rm -rf Output
|
||||||
else
|
else
|
||||||
echo " Distribution may only be built under Cygwin with Inno Setup"
|
echo " Distribution may only be built under Cygwin with Inno Setup"
|
||||||
|
Loading…
Reference in New Issue
Block a user