Added first cut wxWindows Configuration Tool
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
37
utils/configtool/scripts/buildapp
Normal file
37
utils/configtool/scripts/buildapp
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
# Build application and make a tarball.
|
||||
|
||||
cd ~/wxconfigtool-build
|
||||
|
||||
echo Building wxWindows...
|
||||
makeapp release wx
|
||||
|
||||
rm -f wxconfigtool-build-release/wxconfigtool
|
||||
|
||||
if [ "$1" = "clean" ]; then
|
||||
rm -f wxconfigtool-build-release/*
|
||||
fi
|
||||
|
||||
echo Building Application...
|
||||
makeapp release all
|
||||
|
||||
if [ ! -f wxconfigtool-build-release/wxconfigtool ]; then
|
||||
echo *** Sorry, wxconfigtool was not built correctly.
|
||||
exit
|
||||
fi
|
||||
|
||||
echo Making tarball...
|
||||
makeapp release release
|
||||
|
||||
# appver will have been written by the 'release' target.
|
||||
APPVER=`/tmp/appver`
|
||||
|
||||
cd /tmp/wxconfigtool-deliver
|
||||
APPARCHIVE=wxconfigtool-$APPVER-i386.tar.gz
|
||||
|
||||
# echo Copying tarball $APPARCHIVE to ftp site...
|
||||
# You can use a script to copy this to an ftp site,
|
||||
# using for example, the 'curl' utility.
|
||||
# curl ftp://www.mysite.com/$APPARCHIVE --user "myname:mypassword" --upload-file $APPARCHIVE
|
||||
|
||||
echo Done building and archiving wxconfigtool.
|
37
utils/configtool/scripts/innobott.txt
Normal file
37
utils/configtool/scripts/innobott.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
; For debug beta only
|
||||
; Source: c:\winnt\system32\msvcrtd.dll; DestDir: {sys}\; DestName: msvcrtd.dll; CopyMode: onlyifdoesntexist; Flags: uninsneveruninstall
|
||||
|
||||
[Tasks]
|
||||
Name: desktopicon; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"
|
||||
|
||||
[Icons]
|
||||
Name: {group}\%APPTITLE% %VERSION%; Filename: {app}\%APPNAME%.exe; WorkingDir: {app}; IconFilename: {app}\%APPNAME%.exe; IconIndex: 0
|
||||
Name: {group}\%APPTITLE% Help; Filename: {app}\%HELPFILE%; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
|
||||
Name: {group}\wxWindows Reference; Filename: {app}\wx.chm; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
|
||||
Name: {group}\%APPTITLE% ReadMe; Filename: {app}\readme.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
|
||||
Name: {group}\%APPTITLE% Licence; Filename: {app}\license.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
|
||||
Name: {userdesktop}\%APPTITLE% %VERSION%; Filename: {app}\%APPNAME%.exe; WorkingDir: {app}; IconFilename: {app}\%APPNAME%.exe; IconIndex: 0; Tasks: desktopicon
|
||||
|
||||
[Registry]
|
||||
|
||||
; Uncomment the following lines if you'd like to register a data file extension.
|
||||
; You may need to replace some of the %APPTITLE% occurrences below with a hard-wired
|
||||
; name if your title contains spaces.
|
||||
|
||||
Root: HKCR; SubKey: .%APPEXTENSION%; ValueType: STRING; ValueData: wxConfigToolFile; Flags: uninsdeletevalue
|
||||
Root: HKCR; SubKey: wxConfigToolFile; ValueType: STRING; ValueData: "%APPTITLE% Document File"; Flags: uninsdeletevalue
|
||||
Root: HKCR; SubKey: wxConfigToolFile\Shell; ValueType: NONE; Flags: uninsdeletevalue
|
||||
Root: HKCR; SubKey: wxConfigToolFile\Shell\Open; ValueType: NONE; Flags: uninsdeletevalue
|
||||
Root: HKCR; SubKey: wxConfigToolFile\Shell\Open\Command; ValueType: STRING; ValueData: "{app}\%APPNAME%.exe ""%1"""; Flags: uninsdeletevalue
|
||||
Root: HKCR; SubKey: wxConfigToolFile\DefaultIcon; ValueType: STRING; ValueData: {app}\%APPNAME%.exe,0; Flags: uninsdeletevalue
|
||||
|
||||
[UninstallDelete]
|
||||
|
||||
[InstallDelete]
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\%APPNAME%.exe"; Description: "Launch %APPTITLE%"; Flags: postinstall nowait skipifsilent
|
||||
|
||||
[UninstallRun]
|
||||
|
||||
|
45
utils/configtool/scripts/innotop.txt
Normal file
45
utils/configtool/scripts/innotop.txt
Normal file
@@ -0,0 +1,45 @@
|
||||
; Inno Setup Script
|
||||
; Created with ScriptMaker Version 1.3.22
|
||||
; 14 February 2001 at 10:38
|
||||
|
||||
[Setup]
|
||||
MinVersion=4.0,4.0
|
||||
AppName=%APPTITLE% %VERSION%
|
||||
AppId=%APPTITLE%
|
||||
CreateUninstallRegKey=1
|
||||
UsePreviousAppDir=1
|
||||
UsePreviousGroup=1
|
||||
AppVersion=%VERSION%
|
||||
AppVerName=%APPTITLE% %VERSION%
|
||||
AppCopyright=Copyright <20> %COPYRIGHTHOLDER%
|
||||
BackColor=$800000
|
||||
BackColor2=$C71F1F
|
||||
BackColorDirection=toptobottom
|
||||
WindowShowCaption=1
|
||||
WindowStartMaximized=1
|
||||
WindowVisible=1
|
||||
WindowResizable=1
|
||||
UninstallLogMode=Append
|
||||
DirExistsWarning=auto
|
||||
UninstallFilesDir={app}
|
||||
DisableDirPage=0
|
||||
DisableStartupPrompt=1
|
||||
CreateAppDir=1
|
||||
DisableProgramGroupPage=0
|
||||
AlwaysCreateUninstallIcon=1
|
||||
Uninstallable=1
|
||||
UninstallIconName=Uninstall %APPTITLE% %VERSION%
|
||||
UninstallDisplayName=%APPTITLE% %VERSION%
|
||||
DefaultDirName={pf}\%APPTITLE%
|
||||
DefaultGroupName=%APPTITLE% %VERSION%
|
||||
MessagesFile=compiler:default.isl
|
||||
DiskSpanning=0
|
||||
DiskSize=1457664
|
||||
DiskClusterSize=512
|
||||
ReserveBytes=0
|
||||
UseSetupLdr=1
|
||||
LicenseFile=%LICENSEFILE%
|
||||
InfoAfterFile=%READMEAFTERFILE%
|
||||
SourceDir=%SOURCEDIR%
|
||||
OutputDir=%OUTPUTDIR%
|
||||
|
26
utils/configtool/scripts/makeapp
Normal file
26
utils/configtool/scripts/makeapp
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
# Build application
|
||||
|
||||
# The first argument is debug or release
|
||||
LEVEL=$1
|
||||
|
||||
# Then you can supply one or more makefile targets
|
||||
TARGET="$2 $3 $4 $5 $6 $6 $7 $8 $9"
|
||||
|
||||
if [ "$1" = "" ] || [ "$2" = "" ]; then
|
||||
echo Usage: makeapp debug/release full/wx/genericapp/cleanall
|
||||
exit
|
||||
fi
|
||||
|
||||
export APPDIR=$WXWIN/utils/configtool
|
||||
export WXDIR=$WXWIN
|
||||
export WXBUILDDIR=wxwin-build-$LEVEL
|
||||
|
||||
# If there's no wxwin-build-... directory yet, the makefile
|
||||
# must include a dummy makeprog.env
|
||||
export USEDUMMYMAKEPROG="0"
|
||||
if [ ! -f $WXBUILDDIR/src/makeprog.env ]; then
|
||||
USEDUMMYMAKEPROG="1"
|
||||
fi
|
||||
|
||||
make -f ${APPDIR}/src/Makefile WXDIR=$WXDIR USEDUMMYMAKEPROG=$USEDUMMYMAKEPROG APPDIR=$APPDIR WXBUILDDIR=$WXBUILDDIR LEVEL=$LEVEL $TARGET
|
132
utils/configtool/scripts/makeinno.sh
Normal file
132
utils/configtool/scripts/makeinno.sh
Normal file
@@ -0,0 +1,132 @@
|
||||
#! /bin/sh
|
||||
# Make an Inno Setup distribution list, where files and dirs are represented by
|
||||
# sections like this:
|
||||
# [Dirs]
|
||||
# Name: {app}\backgrounds
|
||||
#
|
||||
# [Files]
|
||||
# Source: C:\program\setup\about.htm; DestDir: {app}\; DestName: about.htm
|
||||
#
|
||||
#
|
||||
# Usage: makeinno.sh sourcedir inno-topfile inno-bottomfile destfile
|
||||
# For example: makeinno.sh c:/project/allfiles c:/project/innotop.txt c:/project/innobott.txt c:/project/project.iss
|
||||
#
|
||||
|
||||
PROGNAME=$0
|
||||
SOURCEDIR=$1
|
||||
TOPFILE=$2
|
||||
BOTTOMFILE=$3
|
||||
INNOFILE=$4
|
||||
TEMPDIR=/tmp
|
||||
|
||||
dochecks()
|
||||
{
|
||||
if [ "$SOURCEDIR" = "" ] || [ "$TOPFILE" = "" ] || [ "$BOTTOMFILE" = "" ] || [ "$INNOFILE" = "" ] ; then
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ ! -d $SOURCEDIR ]; then
|
||||
echo "Sorry, the source directory $SOURCEDIR does not exist."
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ ! -f $TOPFILE ]; then
|
||||
echo "Sorry, the Inno Setup header $TOPFILE does not exist."
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ ! -f $BOTTOMFILE ]; then
|
||||
echo "Sorry, the Inno Setup header $BOTTOMFILE does not exist."
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ ! -d $TEMPDIR ]; then
|
||||
mkdir $TEMPDIR
|
||||
fi
|
||||
}
|
||||
|
||||
doreplace()
|
||||
{
|
||||
thefile=$1
|
||||
theexpr=$2
|
||||
|
||||
if [ -f $thefile ]; then
|
||||
sed -e "$theexpr" < $thefile > $thefile.tmp
|
||||
mv $thefile.tmp $thefile
|
||||
else
|
||||
echo "*** $thefile not found."
|
||||
fi
|
||||
}
|
||||
|
||||
generateinno()
|
||||
{
|
||||
# SRCDIR=`cygpath -u $SRCDIR`
|
||||
# DESTDIR=`cygpath -u $DESTDIR`
|
||||
# TEMPDIR=`cygpath -u $TEMP`
|
||||
|
||||
|
||||
# Generate a list of all files in the distribution.
|
||||
# We pass the output through sed in order to remove the preceding "./"
|
||||
cd $SOURCEDIR
|
||||
find . -print | sed -e "s/\.\\///g" > $TEMPDIR/files1.tmp
|
||||
|
||||
echo "[Dirs]" > $TEMPDIR/files2.tmp
|
||||
|
||||
for line in `cat $TEMPDIR/files1.tmp` ; do
|
||||
|
||||
# If a directory, add to file
|
||||
if [ -d $line ] ; then
|
||||
# The relative path
|
||||
# TODO: make into DOS filename form
|
||||
#line2=`cygpath -w $line`
|
||||
line2=$line
|
||||
|
||||
echo " Name: {app}\\"$line2 >> $TEMPDIR/files2.tmp
|
||||
fi
|
||||
done
|
||||
|
||||
echo "" >> $TEMPDIR/files2.tmp
|
||||
echo "[Files]" >> $TEMPDIR/files2.tmp
|
||||
|
||||
for line in `cat $TEMPDIR/files1.tmp` ; do
|
||||
|
||||
# If not a directory, add to file
|
||||
if [ ! -d $line ] ; then
|
||||
# The relative path
|
||||
# TODO: make into DOS filename form
|
||||
#line2=`cygpath -w $line`
|
||||
line2=$line
|
||||
|
||||
# The absolute path
|
||||
# TODO: make into DOS filename form
|
||||
#line1=`cygpath -w $SOURCEDIR`"\\"$line2
|
||||
line1=$SOURCEDIR"\\"$line2
|
||||
#pathonly=`find $line -printf "%h"`
|
||||
pathonly=`dirname $line`
|
||||
|
||||
echo " Source: "$line1"; DestDir: {app}\\"$pathonly >> $TEMPDIR/files2.tmp
|
||||
fi
|
||||
done
|
||||
|
||||
echo "" >> $TEMPDIR/files2.tmp
|
||||
|
||||
doreplace $TEMPDIR/files2.tmp "s/\//\\\/g"
|
||||
|
||||
# Concatenate the 3 sections
|
||||
cat $TOPFILE $TEMPDIR/files2.tmp $BOTTOMFILE > $INNOFILE
|
||||
|
||||
rm -f $TEMPDIR/files1.tmp
|
||||
}
|
||||
|
||||
usage()
|
||||
{
|
||||
echo Usage: $PROGNAME sourcedir inno-topfile inno-bottomfile destfile
|
||||
echo For example: $PROGNAME c:/project/allfiles c:/project/innotop.txt c:/project/innobott.txt c:/project/project.iss
|
||||
echo Remember to use paths of the form c:/thing rather than /c/thing.
|
||||
exit 1
|
||||
}
|
||||
|
||||
dochecks
|
||||
generateinno
|
||||
|
||||
|
267
utils/configtool/scripts/makesetup.sh
Normal file
267
utils/configtool/scripts/makesetup.sh
Normal file
@@ -0,0 +1,267 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Make a distribution of an application.
|
||||
|
||||
# If your zip accepts Cygwin-style paths, then
|
||||
# use cygpath, else substitute echo
|
||||
CYGPATHPROG=cygpath
|
||||
#CYGPATHPROG=echo
|
||||
|
||||
PROGNAME=$0
|
||||
SCRIPTDIR=`pwd`
|
||||
|
||||
. $SCRIPTDIR/setup.var
|
||||
|
||||
# Set this to the required version
|
||||
VERSION=
|
||||
|
||||
doreplace()
|
||||
{
|
||||
thefile=$1
|
||||
theexpr=$2
|
||||
|
||||
if [ -f $thefile ]; then
|
||||
sed -e "$theexpr" < $thefile > $thefile.tmp
|
||||
mv $thefile.tmp $thefile
|
||||
else
|
||||
echo "*** $thefile not found."
|
||||
fi
|
||||
}
|
||||
|
||||
unix2dosname()
|
||||
{
|
||||
echo $1 | sed -e "s/\//\\\\\\\/g" > /tmp/filename.tmp
|
||||
RETVALUE=`cat /tmp/filename.tmp`
|
||||
rm -f /tmp/filename.tmp
|
||||
}
|
||||
|
||||
unix2dosname2()
|
||||
{
|
||||
echo $1 | sed -e "s/\//\\\\/g" > /tmp/filename.tmp
|
||||
RETVALUE=`cat /tmp/filename.tmp`
|
||||
rm -f /tmp/filename.tmp
|
||||
}
|
||||
|
||||
findversion()
|
||||
{
|
||||
echo "#include <stdio.h>" > /tmp/appver.c
|
||||
echo "#include \"$VERSIONSYMBOLFILE\"" >> /tmp/appver.c
|
||||
echo "int main() { printf(\"%.2f\", $VERSIONSYMBOL); }" >> /tmp/appver.c
|
||||
gcc /tmp/appver.c -I$APPDIR -o /tmp/appver
|
||||
VERSION=`/tmp/appver`
|
||||
rm -f /tmp/appver /tmp/appver.c
|
||||
}
|
||||
|
||||
makesetup()
|
||||
{
|
||||
if [ -d $SETUPIMAGEDIR ]; then
|
||||
echo Removing existing $SETUPIMAGEDIR
|
||||
rm -f -r $SETUPIMAGEDIR
|
||||
fi
|
||||
|
||||
echo Making the $SETUPIMAGEDIR for preparing the setup
|
||||
mkdir -p $SETUPIMAGEDIR
|
||||
|
||||
if [ -f $READMEFILE ]; then
|
||||
echo Copying readme.txt
|
||||
cp $READMEFILE $SETUPIMAGEDIR
|
||||
else
|
||||
echo "*** Warning - $READMEFILE not found"
|
||||
fi
|
||||
|
||||
if [ -f $LICENSEFILE ]; then
|
||||
echo Copying licence.txt
|
||||
cp $LICENSEFILE $SETUPIMAGEDIR
|
||||
else
|
||||
echo "*** Warning - $LICENSEFILE not found"
|
||||
fi
|
||||
|
||||
cp $APPDIR/docs/gpl.txt $SETUPIMAGEDIR
|
||||
cp $APPDIR/docs/lgpl.txt $SETUPIMAGEDIR
|
||||
cp $APPDIR/docs/licendoc.txt $SETUPIMAGEDIR
|
||||
|
||||
echo Copying sample configuration settings file...
|
||||
cp $APPDIR/configs/wxwin250.wxs $SETUPIMAGEDIR
|
||||
|
||||
if [ "$RESOURCESFILE" != "" ] && [ "$RESOURCESDIR" != "" ]; then
|
||||
if [ -d $RESOURCESDIR ]; then
|
||||
cd $RESOURCESDIR
|
||||
echo Compiling resource file $RESOURCESFILE
|
||||
zip $SETUPIMAGEDIR/$RESOURCESFILE *
|
||||
else
|
||||
echo "*** Warning - $RESOURCESDIR directory not found"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$MAKEMANUAL" != "0" ]; then
|
||||
if [ -d $MANUALDIR ]; then
|
||||
cd $MANUALDIR
|
||||
make
|
||||
|
||||
for EACHFILE in $MANUALFILES ; do
|
||||
if [ -f $EACHFILE ]; then
|
||||
echo Copying $EACHFILE
|
||||
cp $EACHFILE $SETUPIMAGEDIR
|
||||
else
|
||||
echo "*** Warning - $EACHFILE not found"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "*** Warning - $MANUALDIR not found"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f $WXMANUALCHM ]; then
|
||||
echo Copying wxWindows manual $WXMANUALCHM
|
||||
cp $WXMANUALCHM $SETUPIMAGEDIR
|
||||
else
|
||||
echo "*** Warning - $WXMANUALCHM not found"
|
||||
fi
|
||||
|
||||
if [ -f $APPBINARY ]; then
|
||||
echo Copying binary $APPBINARY
|
||||
cp $APPBINARY $SETUPIMAGEDIR
|
||||
else
|
||||
echo "*** Error - $APPBINARY not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$UPX" != "0" ]; then
|
||||
echo Compressing binary
|
||||
upx $SETUPIMAGEDIR/`basename $APPBINARY`
|
||||
fi
|
||||
|
||||
# Time to regenerate the Inno Install script
|
||||
if [ "$INNO" != "0" ]; then
|
||||
echo Generating $SETUPSCRIPTNAME
|
||||
rm -f $SETUPSCRIPTNAME
|
||||
|
||||
sh $SCRIPTDIR/makeinno.sh $SETUPIMAGEDIR $INNOTOP $INNOBOTTOM $SETUPSCRIPTNAME
|
||||
|
||||
if [ ! -f $SETUPSCRIPTNAME ]; then
|
||||
echo "*** Error - something went wrong with the script file generation."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Now replace %VERSION% with the real application version, and other
|
||||
# variables
|
||||
echo Replacing variables in the setup script
|
||||
doreplace $SETUPSCRIPTNAME "s/%VERSION%/$VERSION/g"
|
||||
doreplace $SETUPSCRIPTNAME "s/%COPYRIGHTHOLDER%/$AUTHOR/g"
|
||||
doreplace $SETUPSCRIPTNAME "s/%VENDOR%/$VENDOR/g"
|
||||
|
||||
unix2dosname $READMEFILE
|
||||
doreplace $SETUPSCRIPTNAME "s;%READMEFILE%;$RETVALUE;g"
|
||||
|
||||
unix2dosname $READMEAFTERFILE
|
||||
doreplace $SETUPSCRIPTNAME "s;%READMEAFTERFILE%;$RETVALUE;g"
|
||||
|
||||
unix2dosname $LICENSEFILE
|
||||
doreplace $SETUPSCRIPTNAME "s;%LICENSEFILE%;$RETVALUE;g"
|
||||
|
||||
doreplace $SETUPSCRIPTNAME "s/%APPNAME%/$APPNAME/g"
|
||||
doreplace $SETUPSCRIPTNAME "s/%APPTITLE%/$APPTITLE/g"
|
||||
|
||||
unix2dosname $SETUPIMAGEDIR
|
||||
doreplace $SETUPSCRIPTNAME "s;%SOURCEDIR%;$RETVALUE;g"
|
||||
|
||||
unix2dosname $DESTDIR
|
||||
doreplace $SETUPSCRIPTNAME "s;%OUTPUTDIR%;$RETVALUE;g"
|
||||
|
||||
doreplace $SETUPSCRIPTNAME "s/%APPEXTENSION%/$APPEXTENSION/g"
|
||||
|
||||
# FIXME: how do we get the first name in the list?
|
||||
if [ "$MANUALFILES" != "" ]; then
|
||||
HELPFILE=`basename $MANUALFILES`
|
||||
unix2dosname $HELPFILE
|
||||
doreplace $SETUPSCRIPTNAME "s;%HELPFILE%;$RETVALUE;g"
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f $DESTDIR/setup*.*
|
||||
|
||||
# Inno Setup complains if this step is not done
|
||||
unix2dos --unix2dos $SETUPSCRIPTNAME
|
||||
|
||||
# Now invoke INNO compiler on the new ISS file
|
||||
# First, make a DOS filename or Inno Setup will get confused.
|
||||
|
||||
unix2dosname2 $SETUPSCRIPTNAME
|
||||
DOSFILENAME=$RETVALUE
|
||||
|
||||
# Note: the double slash is Mingw32/MSYS convention for
|
||||
# denoting a switch, that must not be converted into
|
||||
# a path (otherwise /c = c:/)
|
||||
|
||||
cd `dirname $SETUPSCRIPTNAME`
|
||||
BASESCRIPTNAME=`basename $SETUPSCRIPTNAME`
|
||||
echo Invoking Inno Setup compiler on $BASESCRIPTNAME
|
||||
|
||||
"$SETUPCOMPILER" //cc $BASESCRIPTNAME
|
||||
|
||||
if [ ! -f $DESTDIR/setup.exe ]; then
|
||||
echo "*** Error - the setup.exe was not generated."
|
||||
exit
|
||||
fi
|
||||
|
||||
cd $DESTDIR
|
||||
mv setup.exe $APPNAME-$VERSION-setup.exe
|
||||
|
||||
echo If you saw no warnings or errors, $APPTITLE was successfully spun.
|
||||
echo
|
||||
}
|
||||
|
||||
# We can't use e.g. this:
|
||||
# ls `cat $SRC/distrib/msw/makefile.rsp` zip -@ -u $DEST/wxWindows-$VERSION-gen.zip
|
||||
# because there's not enough space on the command line, plus we need to ignore the
|
||||
# blank lines.
|
||||
# So if we need to (not in this script so far) we do something like this instead:
|
||||
# expandlines $SRC/setup/files.rsp temp.txt
|
||||
# zip -@ `$CYGPATHPROG -w $DEST/archive.zip` < temp.txt
|
||||
|
||||
expandlines()
|
||||
{
|
||||
toexpand=$1
|
||||
outputfile=$2
|
||||
|
||||
rm -f $outputfile
|
||||
touch $outputfile
|
||||
for line in `cat $toexpand` ; do
|
||||
if [ $line != "" ]; then
|
||||
ls $line >> $outputfile
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Usage: $PROGNAME [ options ]" 1>&2
|
||||
echo Options:
|
||||
echo " --help Display this help message"
|
||||
echo " --upx Compress executable with UPX"
|
||||
echo " --no-upx Do not compress executable with UPX"
|
||||
echo " --inno Build the setup.exe"
|
||||
echo " --no-inno Do not build the setup.exe"
|
||||
echo.
|
||||
echo Note that options only override settings in $SCRIPTDIR/setup.var.
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Process command line options.
|
||||
|
||||
for i in "$@"; do
|
||||
case "$i" in
|
||||
--inno) INNO=1 ;;
|
||||
--no-inno) INNO=0 ;;
|
||||
--upx) UPX=1 ;;
|
||||
--no-upx) UPX=0 ;;
|
||||
*)
|
||||
usage
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
findversion
|
||||
makesetup
|
||||
|
135
utils/configtool/scripts/maketarball.sh
Normal file
135
utils/configtool/scripts/maketarball.sh
Normal file
@@ -0,0 +1,135 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Make a distribution of ConfigTool for Linux
|
||||
# Usage: maketarball.sh wxconfigtool-dir bin-dir deliver-dir version [ options ]
|
||||
# For example: maketarball.sh ~/wxconfigtool /tmp/build-wxconfigtool /tmp/wxconfigtool-deliver 1.40
|
||||
|
||||
APPDIR=$1
|
||||
SRC=$APPDIR/src
|
||||
BINARYSRC=$2
|
||||
DEST=$3
|
||||
BUILD=0
|
||||
UPX=0
|
||||
PROGNAME=$0
|
||||
|
||||
# Set this to the required version
|
||||
VERSION=$4
|
||||
|
||||
dotar()
|
||||
{
|
||||
rm -f -r $DEST/wxconfigtool*
|
||||
rm -f $DEST/wxconfigtool-*.*
|
||||
|
||||
mkdir -p $DEST/wxconfigtool-$VERSION
|
||||
mkdir -p $DEST/wxconfigtool-$VERSION/resources
|
||||
mkdir -p $DEST/wxconfigtool-$VERSION/Sample
|
||||
cd $DEST/wxconfigtool-$VERSION
|
||||
|
||||
# Copy readme files
|
||||
cp $APPDIR/docs/readme.txt readme.txt
|
||||
cp $APPDIR/docs/license.txt .
|
||||
|
||||
# Copy the application binary
|
||||
cp $BINARYSRC/wxconfigtool .
|
||||
|
||||
# Copy the wxHTML Help manual file
|
||||
cp $APPDIR/manual/configtool.htb .
|
||||
|
||||
# Copy the sample
|
||||
cp -r $APPDIR/sample Sample
|
||||
cp $APPDIR/resources/* resources
|
||||
|
||||
echo Removing junk from the samples folder...
|
||||
rm -f -r Sample/CVS
|
||||
|
||||
# Copy the resources file
|
||||
rm -f configtool.bin
|
||||
zip configtool.bin -j resources/*
|
||||
|
||||
rm -f -r resources
|
||||
|
||||
# Remove any debug info from wxconfigtool
|
||||
strip wxconfigtool
|
||||
|
||||
# Maybe compress the binary
|
||||
if [ "$UPX" != "0" ]; then
|
||||
upx wxconfigtool
|
||||
fi
|
||||
|
||||
cd ..
|
||||
|
||||
# Make .tar.gz and .tar.bz2 archives
|
||||
tar cvf $DEST/wxconfigtool-$VERSION-i386.tar wxconfigtool-$VERSION/*
|
||||
gzip -c $DEST/wxconfigtool-$VERSION-i386.tar > $DEST/wxconfigtool-$VERSION-i386.tar.gz
|
||||
bzip2 -c $DEST/wxconfigtool-$VERSION-i386.tar > $DEST/wxconfigtool-$VERSION-i386.tar.bz2
|
||||
}
|
||||
|
||||
dobuild()
|
||||
{
|
||||
makeapp release full
|
||||
}
|
||||
|
||||
usage()
|
||||
{
|
||||
echo Usage: $PROGNAME "cvs-dir bin-dir deliver-dir version-number [ options ]"
|
||||
echo Options:
|
||||
echo " --help Display this help message"
|
||||
echo " --upx Compress executable with UPX"
|
||||
echo " --build Invoke 'maketarball.sh release full' first"
|
||||
echo For example: maketarball.sh ~/wxconfigtool /tmp/build-app /tmp/wxconfigtool-deliver 1.20
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Process command line options.
|
||||
shift 4
|
||||
for i in "$@"; do
|
||||
case "$i" in
|
||||
--build) BUILD=1 ;;
|
||||
--upx) UPX=1 ;;
|
||||
*)
|
||||
usage
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! -d "$DEST" ]; then
|
||||
mkdir -p $DEST
|
||||
fi
|
||||
|
||||
if [ ! -d "$SRC" ]; then
|
||||
echo Source directory $SRC not found.
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$BINARYSRC" ]; then
|
||||
echo Location of wxconfigtool binary $BINARYSRC not found.
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$VERSION" = "" ]; then
|
||||
echo Pass the version number as the fourth argument.
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Creating Version $VERSION distribution in $DEST, using source directory $SRC and wxconfigtool binary in $BINARYSRC.
|
||||
#echo Press return to continue.
|
||||
#read dummy
|
||||
|
||||
# Remove all existing files
|
||||
if [ ! -d "$DEST/wxconfigtool" ]; then
|
||||
rm -f -r $DEST/wxconfigtool
|
||||
fi
|
||||
|
||||
# Skip INNO setup if INNO is 0.
|
||||
if [ "$BUILD" = "1" ]; then
|
||||
dobuild
|
||||
fi
|
||||
|
||||
dotar
|
||||
|
||||
echo ConfigTool archived.
|
||||
|
144
utils/configtool/scripts/setup.var
Normal file
144
utils/configtool/scripts/setup.var
Normal file
@@ -0,0 +1,144 @@
|
||||
### List of variables for the purposes of generating an application's
|
||||
### setup.exe
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The application name
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
APPNAME=wxconfigtool
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The application title
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
APPTITLE="wxWindows Configuration Tool"
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The application author (copyright holder)
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
AUTHOR="Julian Smart"
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The application vendor (organisation)
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
VENDOR="Anthemion Software"
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The application data file extension
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
APPEXTENSION=wxs
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The symbol to use when querying for the version number
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
VERSIONSYMBOL=ctVERSION_NUMBER
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The top-level directory of the application source tree
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
APPDIR=c:/wx2dev/wxWindows/utils/configtool
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The destination directory of the setup
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
DESTDIR=$APPDIR/deliver
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The temporary image directory to use when preparing the setup
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
SETUPIMAGEDIR=$APPDIR/deliver/image
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The name of the file with $VERSIONSYMBOL in it
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
VERSIONSYMBOLFILE=$APPDIR/src/symbols.h
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The locations of the project's Inno Setup header and footer files
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
INNOTOP=$APPDIR/scripts/innotop.txt
|
||||
INNOBOTTOM=$APPDIR/scripts/innobott.txt
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The location of the generated setup script
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
SETUPSCRIPTNAME=$DESTDIR/$APPNAME.iss
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The locations of the readme and license files
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
READMEFILE=$APPDIR/docs/readme.txt
|
||||
READMEAFTERFILE=$APPDIR/docs/readme-after.txt
|
||||
LICENSEFILE=$APPDIR/docs/licence.txt
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The binary to include in the setup
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
APPBINARY=$APPDIR/src/ReleaseStable/$APPNAME.exe
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The location of the setup compiler
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
SETUPCOMPILER="c:/Program Files/Inno Setup 2/compil32.exe"
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Whether we will compress the binary (0 or 1).
|
||||
# Use --upx or --no-upx to override this default value.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
UPX=0
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Whether we will make a manual (0 or 1)
|
||||
# Use --make-manual or --no-make-manual to override this default value.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
MAKEMANUAL=1
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The manual filename(s)
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
MANUALFILES="$APPDIR/docs/manual/configtool.chm $APPDIR/docs/manual/configtool.htb"
|
||||
WXMANUALCHM="$APPDIR/../../docs/htmlhelp/wx.chm"
|
||||
WXMANUALHTB="$APPDIR/../../docs/htb/wx.htb"
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The directory containing the manual source. We assume
|
||||
# that there is a Makefile in this directory for making the
|
||||
# manual.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
MANUALDIR=$APPDIR/docs/manual
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The resources file to compile, if any (e.g. myapp.bin).
|
||||
# This is just a zip containing files to be used by the
|
||||
# application, usually stored in src/resources.
|
||||
#
|
||||
# If this is left empty, no resources will be compiled.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
#RESOURCESFILE=${APPNAME}.bin
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# The directory containing the resources.
|
||||
#
|
||||
# If this is left empty, no resources will be compiled.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
RESOURCESDIR=$APPDIR/src/resources
|
||||
|
Reference in New Issue
Block a user