Make just opening the generated MSVC solution file not modify it
The format of the generated MSVC solution file is fixed in a way that just opening it in Visual Studio and immediately closing it again without performing any modifications does not trigger a prompt to save the solution file. This behavior was caused by several minor incompatibilities between the generated file and what Visual Studio 2008 expected, so Visual Studio transparently fixed the file format, marking it internally as modified. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Acked-by: Marius Storm-Olsen <mstormo@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Sebastian Schuberth committed
Sep 28, 2009 at 13:34 UTC
e0ab002b5093e87f06871d7e25ac03e26841d355
1 file changed
+11
-31
contrib/buildsystems/Generators/Vcproj.pm
+11
-31
@@ -571,45 +571,29 @@ sub createGlueProject {
571
print F "\"${libname}\", \"${libname}\\${libname}.vcproj\", \"${uuid}\"";
572
print F "$SLN_POST";
573
}
574
+ my $uuid_libgit = $build_structure{"LIBS_libgit_GUID"};
575
+ my $uuid_xdiff_lib = $build_structure{"LIBS_xdiff_lib_GUID"};
576
foreach (@apps) {
577
my $appname = $_;
578
my $uuid = $build_structure{"APPS_${appname}_GUID"};
579
print F "$SLN_PRE";
578
- print F "\"${appname}\", \"${appname}\\${appname}.vcproj\", \"${uuid}\"";
580
+ print F "\"${appname}\", \"${appname}\\${appname}.vcproj\", \"${uuid}\"\n";
581
+ print F " ProjectSection(ProjectDependencies) = postProject\n";
582
+ print F " ${uuid_libgit} = ${uuid_libgit}\n";
583
+ print F " ${uuid_xdiff_lib} = ${uuid_xdiff_lib}\n";
584
+ print F " EndProjectSection";
585
print F "$SLN_POST";
586
}
587
588
print F << "EOM";
589
Global
584
- GlobalSection(SolutionConfiguration) = preSolution
585
- ConfigName.0 = Debug|Win32
586
- ConfigName.1 = Release|Win32
590
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
591
+ Debug|Win32 = Debug|Win32
592
+ Release|Win32 = Release|Win32
593
EndGlobalSection
588
- GlobalSection(ProjectDependencies) = postSolution
594
EOM
590
- foreach (@{$build_structure{"APPS"}}) {
591
- my $appname = $_;
592
- my $appname_clean = $_;
593
- $appname_clean =~ s/\//_/g;
594
- $appname_clean =~ s/\.exe//;
595
-
596
- my $uuid = $build_structure{"APPS_${appname_clean}_GUID"};
597
- my $dep_index = 0;
598
- foreach(@{$build_structure{"APPS_${appname}_LIBS"}}) {
599
- my $libname = $_;
600
- $libname =~ s/\//_/g;
601
- $libname =~ s/\.(a|lib)//;
602
- my $libuuid = $build_structure{"LIBS_${libname}_GUID"};
603
- if (defined $libuuid) {
604
- print F "\t\t${uuid}.${dep_index} = ${libuuid}\n";
605
- $dep_index += 1;
606
- }
607
- }
608
- }
609
-
595
print F << "EOM";
611
- EndGlobalSection
612
- GlobalSection(ProjectConfiguration) = postSolution
596
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
597
EOM
598
foreach (@libs) {
599
my $libname = $_;
@@ -630,10 +614,6 @@ EOM
614
615
print F << "EOM";
616
EndGlobalSection
633
- GlobalSection(ExtensibilityGlobals) = postSolution
634
- EndGlobalSection
635
- GlobalSection(ExtensibilityAddIns) = postSolution
636
- EndGlobalSection
617
EndGlobal
618
EOM
619
close F;