XQuilla/wintools/s_projects

44 lines
1.4 KiB
Text
Raw Normal View History

2020-02-17 21:12:51 +00:00
#
2020-02-17 21:24:47 +00:00
# This script drives construction of Visual Studio projects
2020-02-17 21:12:51 +00:00
# files, using an xquery script (genproject.template),an input XML
# document, and a file containing a list of project names.
#
# 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:17:06 +00:00
# find the xqilla command line tool
XQILLA=`which xqilla`
if [ ! -x "$XQILLA" ]; then
XQILLA="../xqilla"
fi
if [ ! -x "$XQILLA" ]; then
XQILLA="../build/xqilla"
fi
if [ ! -x "$XQILLA" ]; then
echo "XQilla executable not found. Maybe you need to add it to the path?"
exit 1
fi
echo XQILLA = $XQILLA
2020-02-17 21:24:47 +00:00
# generate the VC project files
2020-02-17 21:22:42 +00:00
$XQILLA -u xqilla.vs2010.xq -v projectFile "$CONFIG_OUTPUT" -v outputPath "../Win32Projects"
$XQILLA -u xqilla.vs2010_filter.xq -v projectFile "$CONFIG_OUTPUT" -v outputPath "../Win32Projects"
2020-02-17 21:17:06 +00:00
2020-02-17 21:24:47 +00:00
for file in `ls ../Win32Projects/VC10/*.vcxproj ../Win32Projects/VC10/*.vcxproj.filters ../Win32Projects/VC11/*.vcxproj ../Win32Projects/VC11/*.vcxproj.filters ../Win32Projects/VC14/*.vcxproj ../Win32Projects/VC14/*.vcxproj.filters`
2020-02-17 21:22:42 +00:00
do
sed '2,$s/xmlns="http:\/\/schemas.microsoft.com\/developer\/msbuild\/2003"//' $file > temp
sed '1 i\
<?xml version="1.0" encoding="utf-8" ?>
' temp > temp2
rm -f temp
mv temp2 $file
done