mirror of https://github.com/CGAL/cgal
C2vcproj script fixed to better handle multiproject solutions
This commit is contained in:
parent
284081de7d
commit
0775cf4567
|
|
@ -1,3 +1,7 @@
|
||||||
|
28 March 2007 Fernando Cacciola
|
||||||
|
- C2vcproj modified to produce <package>_VC71.sln and <package>_VC80.sln in the package folder,
|
||||||
|
then subfolders VC71 and VC80 each containing one .vcproj per main program.
|
||||||
|
|
||||||
12 March 2007 Andreas Fabri
|
12 March 2007 Andreas Fabri
|
||||||
- Removed cgal_confog.bat
|
- Removed cgal_confog.bat
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,22 +26,25 @@ create_project_file()
|
||||||
projfile=`echo $srcfile|sed -e "s/\.$ext/\.vcproj/"`;
|
projfile=`echo $srcfile|sed -e "s/\.$ext/\.vcproj/"`;
|
||||||
|
|
||||||
# Creates a vcroj IFF it doesn't exist
|
# Creates a vcroj IFF it doesn't exist
|
||||||
if [ ! -e $projfile ]; then
|
if [[ ! -e $projfile ]]; then
|
||||||
|
|
||||||
GUID=`printf "%012d" $RANDOM`
|
GUID=`printf "%012d" $RANDOM`
|
||||||
|
|
||||||
|
|
||||||
echo "Creating $projfile under VC$ver folder with GUID={00000000-0000-0000-0000-$GUID}"
|
echo "Creating $projfile under VC$ver folder with GUID={00000000-0000-0000-0000-$GUID}"
|
||||||
|
|
||||||
|
outdir='$(ConfigurationName)_'$srcname
|
||||||
|
|
||||||
#
|
#
|
||||||
# Takes a master .vcproj file, replaces the keywords
|
# Takes a master .vcproj file, replaces the keywords
|
||||||
# SOURCE for $srcname
|
# SOURCE for $srcname
|
||||||
# EXT for $ext
|
# EXT for $ext
|
||||||
|
# OUTDIR for $outdir
|
||||||
# And moves the generated project file into the final folder
|
# And moves the generated project file into the final folder
|
||||||
#
|
#
|
||||||
sed -e"s/SOURCE/$srcname/g" $SCRIPTDIR/master_${ver}.vcproj > ./src2sln_/temp.txt;
|
sed -e"s/SOURCE/$srcname/g" $SCRIPTDIR/master_${ver}.vcproj > ./src2sln_/temp.txt;
|
||||||
sed -e"s/EXT/$ext/g" ./src2sln_/temp.txt > ./src2sln_/temp2.txt;
|
sed -e"s/EXT/$ext/g" ./src2sln_/temp.txt > ./src2sln_/temp2.txt;
|
||||||
sed -e"s/ZZZZZZZZZZZZ/$GUID/g" ./src2sln_/temp2.txt > ./src2sln_/$projfile;
|
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$ver;
|
mv ./src2sln_/$projfile ./VC$ver;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -74,24 +77,24 @@ create_project_file()
|
||||||
|
|
||||||
# For each folder in parameters list
|
# For each folder in parameters list
|
||||||
for h in $@ ; do
|
for h in $@ ; do
|
||||||
if [ -d $h ]; then
|
if [[ -d $h ]]; then
|
||||||
cd $h;
|
cd $h;
|
||||||
echo "In " $h;
|
echo "In " $h;
|
||||||
|
|
||||||
pkg=`basename $h`
|
pkg=`basename $h`
|
||||||
|
|
||||||
# Create a VC71 subdirectory IFF it doesn't already exists
|
# Create a VC71 subdirectory IFF it doesn't already exists
|
||||||
if [ ! -e "VC71" ]; then
|
if [[ ! -e "VC71" ]]; then
|
||||||
mkdir VC71
|
mkdir VC71
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create a VC80 subdirectory IFF it doesn't already exists
|
# Create a VC80 subdirectory IFF it doesn't already exists
|
||||||
if [ ! -e "VC80" ]; then
|
if [[ ! -e "VC80" ]]; then
|
||||||
mkdir VC80
|
mkdir VC80
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ALWAYS create temporary subdirectory "src2sln_"
|
# ALWAYS create temporary subdirectory "src2sln_"
|
||||||
if [ -e src2sln_ ]; then
|
if [[ -e src2sln_ ]]; then
|
||||||
rm -r src2sln_;
|
rm -r src2sln_;
|
||||||
fi
|
fi
|
||||||
mkdir src2sln_;
|
mkdir src2sln_;
|
||||||
|
|
@ -110,10 +113,10 @@ if [ -d $h ]; then
|
||||||
# For each .C and .cpp file file
|
# For each .C and .cpp file file
|
||||||
for ext in C cpp ; do
|
for ext in C cpp ; do
|
||||||
for i in *.$ext ; do
|
for i in *.$ext ; do
|
||||||
if [ ! $i = "*.$ext" ]; then
|
if [[ ! $i = "*.$ext" ]]; then
|
||||||
# if $i contains a function "main()"
|
# if $i contains a function "main()"
|
||||||
zgrep main $i >/dev/null 2>&1
|
zgrep main $i >/dev/null 2>&1
|
||||||
if [ $? == 0 ]; then
|
if [[ $? == 0 ]]; then
|
||||||
|
|
||||||
create_project_file $i $ext "71" $sp71
|
create_project_file $i $ext "71" $sp71
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@
|
||||||
<Configurations>
|
<Configurations>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory="Debug"
|
OutputDirectory="OUTDIR"
|
||||||
IntermediateDirectory="Debug"
|
IntermediateDirectory="OUTDIR"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
ManagedExtensions="FALSE">
|
ManagedExtensions="FALSE">
|
||||||
|
|
@ -61,8 +61,8 @@
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="Release"
|
OutputDirectory="OUTDIR"
|
||||||
IntermediateDirectory="Release"
|
IntermediateDirectory="OUTDIR"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
ManagedExtensions="FALSE">
|
ManagedExtensions="FALSE">
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
<Configurations>
|
<Configurations>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory="Debug"
|
OutputDirectory="OUTDIR"
|
||||||
IntermediateDirectory="Debug"
|
IntermediateDirectory="OUTDIR"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
|
|
@ -95,8 +95,8 @@
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="Release"
|
OutputDirectory="OUTDIR"
|
||||||
IntermediateDirectory="Release"
|
IntermediateDirectory="OUTDIR"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue