mirror of https://github.com/CGAL/cgal
C2vcproj script generate solution files again
This commit is contained in:
parent
31417fba53
commit
ac0cfcb83d
|
|
@ -2789,6 +2789,8 @@ wininst/developer_scripts/examples/master_71_proj_line.sln eol=crlf
|
|||
wininst/developer_scripts/examples/master_80.vcproj -text
|
||||
wininst/developer_scripts/examples/master_80_head.sln eol=crlf
|
||||
wininst/developer_scripts/examples/master_80_proj_line.sln eol=crlf
|
||||
wininst/developer_scripts/examples/master_head.sln -text
|
||||
wininst/developer_scripts/examples/master_proj_line.sln -text
|
||||
wininst/developer_scripts/script_cgal_3_3.nsh -text
|
||||
wininst/developer_scripts/zirkel.bmp -text svneol=unset#image/bmp
|
||||
wininst/src/CGAL/cgallib_71.vcproj -text
|
||||
|
|
|
|||
|
|
@ -1,19 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Creating VC71 solution & project files..."
|
||||
if [[ $C2VCPROJ_SCRIPT_DIR = "" ]] ; then
|
||||
C2VCPROJ_SCRIPT_DIR="../../developer_scripts/examples"
|
||||
echo "Setting C2VCPROJ_SCRIPT_DIR to $C2VCPROJ_SCRIPT_DIR"
|
||||
else
|
||||
echo "C2VCPROJ_SCRIPT_DIR already defined as $C2VCPROJ_SCRIPT_DIR"
|
||||
fi
|
||||
|
||||
# NOTE: This is hard-coded
|
||||
SCRIPTDIR="../../developer_scripts/examples"
|
||||
echo "Creating VC7.1 solution & project files..."
|
||||
|
||||
|
||||
# Creates a VC71 .vcproj file corresponding to a source file
|
||||
# Creates a VC7.1 .vcproj file corresponding to a source file
|
||||
# $1 is the source file
|
||||
# $2 is the extension of the source file
|
||||
# $3 is the parent solution file
|
||||
#
|
||||
create_project_file()
|
||||
{
|
||||
srcfile=${1};
|
||||
ext=${2};
|
||||
slnfile=${3};
|
||||
|
||||
# $srcname is a string of the form "source" were "source.some_extension" is the of the source file
|
||||
srcname=`echo $srcfile|sed -e "s/\.$ext//"`;
|
||||
|
|
@ -22,24 +27,46 @@ create_project_file()
|
|||
projfile=`echo $srcfile|sed -e "s/\.$ext/\.vcproj/"`;
|
||||
|
||||
# Creates a vcroj IFF it doesn't exist
|
||||
if [[ ! -e $projfile ]]; then
|
||||
if [[ ! -e ./VC/$projfile ]]; then
|
||||
|
||||
GUID=`printf "%012d" $RANDOM`
|
||||
|
||||
echo "Creating $projfile with GUID={00000000-0000-0000-0000-$GUID}"
|
||||
echo "Creating $projfile under VC7.1 folder with GUID={00000000-0000-0000-0000-$GUID}"
|
||||
|
||||
outdir='$(ConfigurationName)_'$srcname
|
||||
|
||||
#
|
||||
# Takes a master .vcproj file, replaces the keywords
|
||||
# SOURCE for $srcname
|
||||
# EXT for $ext
|
||||
# OUTDIR for $outdir
|
||||
# And moves the generated project file into the final folder
|
||||
#
|
||||
sed -e"s/SOURCE/$srcname/g" $SCRIPTDIR/master.vcproj > ./src2sln_/temp.txt;
|
||||
sed -e"s/EXT/$ext/g" ./src2sln_/temp.txt > ./src2sln_/temp2.txt;
|
||||
sed -e"s/ZZZZZZZZZZZZ/$GUID/g" ./src2sln_/temp2.txt > $projfile
|
||||
sed -e"s/SOURCE/$srcname/g" $C2VCPROJ_SCRIPT_DIR/master.vcproj > ./src2sln_/temp.txt;
|
||||
sed -e"s/EXT/$ext/g" ./src2sln_/temp.txt > ./src2sln_/temp2.txt;
|
||||
sed -e"s/ZZZZZZZZZZZZ/$GUID/g" ./src2sln_/temp2.txt > ./src2sln_/temp3.txt;
|
||||
sed -e"s/OUTDIR/$outdir/g" ./src2sln_/temp3.txt > ./src2sln_/$projfile;
|
||||
mv ./src2sln_/$projfile ./VC;
|
||||
|
||||
|
||||
#
|
||||
# Takes a master .sln entry line, replaces the keywords
|
||||
# TARGET for $srcname
|
||||
# PROJECT for $projfile
|
||||
# And adds the line to parent solution file
|
||||
#
|
||||
echo "Adding $projfile to $slnfile"
|
||||
sed -e"s/TARGET/$srcname/g" $C2VCPROJ_SCRIPT_DIR/master_proj_line.sln > ./src2sln_/temp.txt;
|
||||
sed -e"s/ZZZZZZZZZZZZ/$GUID/g" ./src2sln_/temp.txt > ./src2sln_/temp2.txt;
|
||||
sed -e"s,PROJECT,VC/$projfile,g" ./src2sln_/temp2.txt > ./src2sln_/temp3.txt;
|
||||
|
||||
mv ./src2sln_/$slnfile ./src2sln_/$slnfile.tmp
|
||||
cat ./src2sln_/$slnfile.tmp ./src2sln_/temp3.txt > ./src2sln_/$slnfile
|
||||
rm ./src2sln_/$slnfile.tmp
|
||||
|
||||
rm -rf ./src2sln_/temp.txt
|
||||
rm -rf ./src2sln_/temp2.txt
|
||||
rm -rf ./src2sln_/temp3.txt
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
@ -57,11 +84,23 @@ if [[ -d $h ]]; then
|
|||
|
||||
pkg=`basename $h`
|
||||
|
||||
# Create a VC subdirectory IFF it doesn't already exists
|
||||
if [[ ! -e "VC" ]]; then
|
||||
mkdir VC
|
||||
fi
|
||||
|
||||
# ALWAYS create temporary subdirectory "src2sln_"
|
||||
if [[ -e src2sln_ ]]; then
|
||||
rm -r src2sln_;
|
||||
fi
|
||||
mkdir src2sln_;
|
||||
|
||||
# $sp is the filename of the solution for for VC71
|
||||
sp=$pkg".sln"
|
||||
|
||||
|
||||
echo "Creating $sp"
|
||||
cat $C2VCPROJ_SCRIPT_DIR/master_head.sln > ./src2sln_/$sp
|
||||
|
||||
# For each .C and .cpp file file
|
||||
for ext in C cpp ; do
|
||||
|
|
@ -71,13 +110,15 @@ if [[ -d $h ]]; then
|
|||
zgrep main $i >/dev/null 2>&1
|
||||
if [[ $? == 0 ]]; then
|
||||
|
||||
create_project_file $i $ext
|
||||
create_project_file $i $ext $sp
|
||||
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
mv ./src2sln_/$sp ./$sp;
|
||||
|
||||
# Remove temporary subdirectory "src2sln_"
|
||||
rm -r src2sln_
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="${ConfigurationName}"
|
||||
IntermediateDirectory="${ConfigurationName}"
|
||||
OutputDirectory="OUTDIR"
|
||||
IntermediateDirectory="OUTDIR"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
ManagedExtensions="FALSE">
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
AdditionalOptions="/Zm900"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="$(CGALROOT)\include\CGAL\config\msvc;$(CGALROOT)\include;$(CGALROOT)\auxiliary\gmp\include;$(BOOSTROOT)"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_SECURE_SCL=0;_CRT_SECURE_NO_DEPRECATE;CGAL_USE_GMP"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_SECURE_SCL=0;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;CGAL_USE_GMP"
|
||||
MinimalRebuild="FALSE"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
|
|
@ -61,8 +61,8 @@
|
|||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="${ConfigurationName}"
|
||||
IntermediateDirectory="${ConfigurationName}"
|
||||
OutputDirectory="OUTDIR"
|
||||
IntermediateDirectory="OUTDIR"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
ManagedExtensions="FALSE">
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="$(CGALROOT)\include\CGAL\config\msvc;$(CGALROOT)\include;$(CGALROOT)\auxiliary\gmp\include;$(BOOSTROOT)"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_SECURE_SCL=0;_CRT_SECURE_NO_DEPRECATE;CGAL_USE_GMP"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_SECURE_SCL=0;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;CGAL_USE_GMP"
|
||||
MinimalRebuild="FALSE"
|
||||
RuntimeLibrary="2"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
# Visual Studio 2003
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TARGET", "PROJECT", "{00000000-0000-0000-0000-ZZZZZZZZZZZZ}"
|
||||
EndProject
|
||||
Loading…
Reference in New Issue