{"thread":{"id":"21042","subject":"[PATCH 1/2] Make generated MSVC solution file open from Windows Explorer","startedAt":"2009-09-24T14:40:52Z","lastAt":"2009-09-24T14:40:52Z","messageCount":1,"participants":["Sebastian Schuberth"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"123734","messageId":"4ABB84F4.7080403__37911.5969794386$1253803684$gmane$org@gmail.com","threadId":"21042","inReplyTo":null,"subject":"[PATCH 1/2] Make generated MSVC solution file open from Windows Explorer","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2009-09-24T14:40:52Z","receivedAt":"2009-09-24T14:40:52Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":" From c6d29a2d243647bb2877eb2114938ae20c8e56e5 Mon Sep 17 00:00:00 2001\nFrom: Sebastian Schuberth <sschuberth@gmail.com>\nDate: Thu, 24 Sep 2009 15:52:25 +0200\nSubject: [PATCH 1/2] Make generated MSVC solution file open from Windows Explorer\n\nIn order to be able to open the generated solution file by double-clicking it\nin Windows Explorer, all project files need to use DOS line-endings and a\ncomment about the Visual Studio version needs to be added to the header of the\nsolution file. This also fixes the icon that is displayed for the solution file\nin Windows Explorer.\nNote that opening the solution file from a running instance of Visual Studio\nalready worked before.\n\nSigned-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n---\n  contrib/buildsystems/Generators/Vcproj.pm |    5 ++++-\n  1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/buildsystems/Generators/Vcproj.pm b/contrib/buildsystems/Generators/Vcproj.pm\nindex 00ec0c1..50daa03 100644\n--- a/contrib/buildsystems/Generators/Vcproj.pm\n+++ b/contrib/buildsystems/Generators/Vcproj.pm\n@@ -131,6 +131,7 @@ sub createLibProject {\n      $includes =~ s/-I//g;\n      mkdir \"$target\" || die \"Could not create the directory $target for lib project!\\n\";\n      open F, \">$target/$target.vcproj\" || die \"Could not open $target/$target.pro for writing!\\n\";\n+    binmode F, \":crlf\";\n      print F << \"EOM\";\n  <?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n  <VisualStudioProject\n@@ -353,6 +354,7 @@ sub createAppProject {\n      $includes =~ s/-I//g;\n      mkdir \"$target\" || die \"Could not create the directory $target for lib project!\\n\";\n      open F, \">$target/$target.vcproj\" || die \"Could not open $target/$target.pro for writing!\\n\";\n+    binmode F, \":crlf\";\n      print F << \"EOM\";\n  <?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n  <VisualStudioProject\n@@ -537,7 +539,7 @@ sub createGlueProject {\n      print \"Generate solutions file\\n\";\n      $rel_dir = \"..\\\\$rel_dir\";\n      $rel_dir =~ s/\\//\\\\/g;\n-    my $SLN_HEAD = \"Microsoft Visual Studio Solution File, Format Version 10.00\\n\";\n+    my $SLN_HEAD = \"Microsoft Visual Studio Solution File, Format Version 10.00\\n# Visual Studio 2008\\n\";\n      my $SLN_PRE  = \"Project(\\\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\\\") = \";\n      my $SLN_POST = \"\\nEndProject\\n\";\n  \n@@ -560,6 +562,7 @@ sub createGlueProject {\n      @apps = @tmp;\n  \n      open F, \">git.sln\" || die \"Could not open git.sln for writing!\\n\";\n+    binmode F, \":crlf\";\n      print F \"$SLN_HEAD\";\n      foreach (@libs) {\n          my $libname = $_;\n-- \n1.6.4.msysgit.0\n"}]}