XQuilla/wintools/s_projects

50 lines
1.3 KiB
Text
Raw Normal View History

2020-02-17 21:12:51 +00:00
#
# This script drives construction of Visual Studio (version 7.1) projects
# files, using an xquery script (genproject.template),an input XML
# document, and a file containing a list of project names.
#
# project name list
PROJECTS=xqilla.projects
# xquery script template
TEMPLATE=genproject.template
# temporary script, post-sed-replacement
TEMP_SCRIPT=genproject.script
# xml document input template
CONFIG_INPUT=xqilla.template.xml
# temporary xml document, post-sed-replacement
CONFIG_OUTPUT=xqilla.xml
# substitute some variables in the XML document template
sed -f lib_paths.sed < $CONFIG_INPUT > $CONFIG_OUTPUT
2020-02-17 21:13:50 +00:00
# for each project/destination, substitute 2 variables in the XQuery script, then run it
for v in VC7.1 VC8
2020-02-17 21:12:51 +00:00
do
2020-02-17 21:13:50 +00:00
PROJECT_OUTPUT_DIR=../Win32Projects/$v
if [ $v = "VC7.1" ]; then
VERSION="7.10"
else
VERSION="8.00"
fi
for i in `cat $PROJECTS`
do
sed -e "s!@PROJECT_NAME@!$i!g" -e "s!@PROJECT_INPUT@!$CONFIG_OUTPUT!g" -e"s!@VISUAL_STUDIO_VERSION@!$VERSION!g" < $TEMPLATE > $TEMP_SCRIPT
TMP=$PROJECT_OUTPUT_DIR/$i.tmp.vcproj
TARG=$PROJECT_OUTPUT_DIR/$i.vcproj
xqilla -o $TMP $TEMP_SCRIPT
rm -f $TEMP_SCRIPT
cmp $TMP $TARG > /dev/null 2>&1 ||
2020-02-17 21:12:51 +00:00
(echo "Building $TARG" && rm -f $TARG &&
cp $TMP $TARG && chmod 664 $TARG)
2020-02-17 21:13:50 +00:00
rm -f $TMP
done
2020-02-17 21:12:51 +00:00
done