From 76031f191e5ea340f0a1501125891ae0fed76ff7 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Mon, 28 Sep 2009 13:34:20 +0200 Subject: [PATCH] Make generated MSVC solution file open from Windows Explorer In order to be able to open the generated solution file by double- clicking it in Windows Explorer, all project files need to use DOS line-endings and a comment about the Visual Studio version needs to be added to the header of the solution file. This also fixes the icon that is displayed for the solution file in Windows Explorer. Note that opening the solution file from a running instance of Visual Studio already worked before. Signed-off-by: Sebastian Schuberth Acked-by: Marius Storm-Olsen Signed-off-by: Shawn O. Pearce --- contrib/buildsystems/Generators/Vcproj.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/buildsystems/Generators/Vcproj.pm b/contrib/buildsystems/Generators/Vcproj.pm index a21591109e..37f72e53ac 100644 --- a/contrib/buildsystems/Generators/Vcproj.pm +++ b/contrib/buildsystems/Generators/Vcproj.pm @@ -131,6 +131,7 @@ sub createLibProject { $includes =~ s/-I//g; mkdir "$target" || die "Could not create the directory $target for lib project!\n"; open F, ">$target/$target.vcproj" || die "Could not open $target/$target.pro for writing!\n"; + binmode F, ":crlf"; print F << "EOM"; $target/$target.vcproj" || die "Could not open $target/$target.pro for writing!\n"; + binmode F, ":crlf"; print F << "EOM"; git.sln" || die "Could not open git.sln for writing!\n"; + binmode F, ":crlf"; print F "$SLN_HEAD"; foreach (@libs) { my $libname = $_; -- 2.11.4.GIT