diff options
author | Sebastian Schuberth <sschuberth@gmail.com> | 2009-09-28 13:34:20 +0200 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2009-09-29 08:54:37 -0700 |
commit | 76031f191e5ea340f0a1501125891ae0fed76ff7 (patch) | |
tree | 184dffc94dadbbc9c3be19fbf8414b00c1d4e042 /contrib/buildsystems | |
parent | 6f798b9590ca3a26d6c8e9318929eefef9b640f2 (diff) | |
download | git-76031f191e5ea340f0a1501125891ae0fed76ff7.tar.gz git-76031f191e5ea340f0a1501125891ae0fed76ff7.tar.xz |
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 <sschuberth@gmail.com>
Acked-by: Marius Storm-Olsen <mstormo@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'contrib/buildsystems')
-rw-r--r-- | contrib/buildsystems/Generators/Vcproj.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/buildsystems/Generators/Vcproj.pm b/contrib/buildsystems/Generators/Vcproj.pm index a21591109..37f72e53a 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"; <?xml version="1.0" encoding = "Windows-1252"?> <VisualStudioProject @@ -353,6 +354,7 @@ sub createAppProject { $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"; <?xml version="1.0" encoding = "Windows-1252"?> <VisualStudioProject @@ -537,7 +539,7 @@ sub createGlueProject { print "Generate solutions file\n"; $rel_dir = "..\\$rel_dir"; $rel_dir =~ s/\//\\/g; - my $SLN_HEAD = "Microsoft Visual Studio Solution File, Format Version 10.00\n"; + my $SLN_HEAD = "Microsoft Visual Studio Solution File, Format Version 10.00\n# Visual Studio 2008\n"; my $SLN_PRE = "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = "; my $SLN_POST = "\nEndProject\n"; @@ -560,6 +562,7 @@ sub createGlueProject { @apps = @tmp; open F, ">git.sln" || die "Could not open git.sln for writing!\n"; + binmode F, ":crlf"; print F "$SLN_HEAD"; foreach (@libs) { my $libname = $_; |