git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] Make just opening the generated MSVC solution file not modify it
@ 2009-09-24 14:42 Sebastian Schuberth
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Schuberth @ 2009-09-24 14:42 UTC (permalink / raw)
  To: git; +Cc: mstormo

 From 9a0d743e227872189b17afb0b5c69b15422a0eef Mon Sep 17 00:00:00 2001
From: Sebastian Schuberth <sschuberth@gmail.com>
Date: Thu, 24 Sep 2009 16:26:59 +0200
Subject: [PATCH 2/2] 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>
---
  contrib/buildsystems/Generators/Vcproj.pm |   42 +++++++---------------------
  1 files changed, 11 insertions(+), 31 deletions(-)

diff --git a/contrib/buildsystems/Generators/Vcproj.pm b/contrib/buildsystems/Generators/Vcproj.pm
index 50daa03..d53ff2c 100644
--- a/contrib/buildsystems/Generators/Vcproj.pm
+++ b/contrib/buildsystems/Generators/Vcproj.pm
@@ -571,45 +571,29 @@ sub createGlueProject {
          print F "\"${libname}\", \"${libname}\\${libname}.vcproj\", \"${uuid}\"";
          print F "$SLN_POST";
      }
+    my $uuid_libgit = $build_structure{"LIBS_libgit_GUID"};
+    my $uuid_xdiff_lib = $build_structure{"LIBS_xdiff_lib_GUID"};
      foreach (@apps) {
          my $appname = $_;
          my $uuid = $build_structure{"APPS_${appname}_GUID"};
          print F "$SLN_PRE";
-        print F "\"${appname}\", \"${appname}\\${appname}.vcproj\", \"${uuid}\"";
+        print F "\"${appname}\", \"${appname}\\${appname}.vcproj\", \"${uuid}\"\n";
+        print F "	ProjectSection(ProjectDependencies) = postProject\n";
+        print F "		${uuid_libgit} = ${uuid_libgit}\n";
+        print F "		${uuid_xdiff_lib} = ${uuid_xdiff_lib}\n";
+        print F "	EndProjectSection";
          print F "$SLN_POST";
      }
  
      print F << "EOM";
  Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		ConfigName.0 = Debug|Win32
-		ConfigName.1 = Release|Win32
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
  	EndGlobalSection
-	GlobalSection(ProjectDependencies) = postSolution
  EOM
-    foreach (@{$build_structure{"APPS"}}) {
-        my $appname = $_;
-        my $appname_clean = $_;
-        $appname_clean =~ s/\//_/g;
-        $appname_clean =~ s/\.exe//;
-
-        my $uuid = $build_structure{"APPS_${appname_clean}_GUID"};
-        my $dep_index = 0;
-        foreach(@{$build_structure{"APPS_${appname}_LIBS"}}) {
-            my $libname = $_;
-            $libname =~ s/\//_/g;
-            $libname =~ s/\.(a|lib)//;
-            my $libuuid = $build_structure{"LIBS_${libname}_GUID"};
-            if (defined $libuuid) {
-                print F "\t\t${uuid}.${dep_index} = ${libuuid}\n";
-                $dep_index += 1;
-            }
-        }
-    }
-
      print F << "EOM";
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
  EOM
      foreach (@libs) {
          my $libname = $_;
@@ -630,10 +614,6 @@ EOM
  
      print F << "EOM";
  	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
  EndGlobal
  EOM
      close F;
-- 
1.6.4.msysgit.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH 0/2] MSVC generator fixups
  2009-09-24 14:40 ` [PATCH 1/2] Make generated MSVC solution file open from Windows Explorer Sebastian Schuberth
@ 2009-09-28 11:34 Marius Storm-Olsen
  2009-09-24 14:40 ` [PATCH 1/2] Make generated MSVC solution file open from Windows Explorer Sebastian Schuberth
  0 siblings, 1 reply; 3+ messages in thread
From: Marius Storm-Olsen @ 2009-09-28 11:34 UTC (permalink / raw)
  To: git, spearce, sschuberth; +Cc: msysgit, Marius Storm-Olsen

The generated solution file was valid, but not exactly in the way the
2008 IDE wanted them, so the IDE would query to save the solution file
even though the user never touched the solution/projects.
These two patches ensures that the solution file is in the way the IDE
wants them, so we avoid the naging.

The two patches didn't apply for me in the way they were sent. I
manually applied them ontop of master, and added an Acked-by.

Thanks!

Sebastian Schuberth (2):
  Make generated MSVC solution file open from Windows Explorer
  Make just opening the generated MSVC solution file not modify it

 contrib/buildsystems/Generators/Vcproj.pm |   47 +++++++++-------------------
 1 files changed, 15 insertions(+), 32 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH 2/2] Make just opening the generated MSVC solution file not modify it
@ 2009-09-24 14:42 Sebastian Schuberth
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Schuberth @ 2009-09-24 14:42 UTC (permalink / raw)
  To: git; +Cc: mstormo

 From 9a0d743e227872189b17afb0b5c69b15422a0eef Mon Sep 17 00:00:00 2001
From: Sebastian Schuberth <sschuberth@gmail.com>
Date: Thu, 24 Sep 2009 16:26:59 +0200
Subject: [PATCH 2/2] 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>
---
  contrib/buildsystems/Generators/Vcproj.pm |   42 +++++++---------------------
  1 files changed, 11 insertions(+), 31 deletions(-)

diff --git a/contrib/buildsystems/Generators/Vcproj.pm b/contrib/buildsystems/Generators/Vcproj.pm
index 50daa03..d53ff2c 100644
--- a/contrib/buildsystems/Generators/Vcproj.pm
+++ b/contrib/buildsystems/Generators/Vcproj.pm
@@ -571,45 +571,29 @@ sub createGlueProject {
          print F "\"${libname}\", \"${libname}\\${libname}.vcproj\", \"${uuid}\"";
          print F "$SLN_POST";
      }
+    my $uuid_libgit = $build_structure{"LIBS_libgit_GUID"};
+    my $uuid_xdiff_lib = $build_structure{"LIBS_xdiff_lib_GUID"};
      foreach (@apps) {
          my $appname = $_;
          my $uuid = $build_structure{"APPS_${appname}_GUID"};
          print F "$SLN_PRE";
-        print F "\"${appname}\", \"${appname}\\${appname}.vcproj\", \"${uuid}\"";
+        print F "\"${appname}\", \"${appname}\\${appname}.vcproj\", \"${uuid}\"\n";
+        print F "	ProjectSection(ProjectDependencies) = postProject\n";
+        print F "		${uuid_libgit} = ${uuid_libgit}\n";
+        print F "		${uuid_xdiff_lib} = ${uuid_xdiff_lib}\n";
+        print F "	EndProjectSection";
          print F "$SLN_POST";
      }
  
      print F << "EOM";
  Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		ConfigName.0 = Debug|Win32
-		ConfigName.1 = Release|Win32
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
  	EndGlobalSection
-	GlobalSection(ProjectDependencies) = postSolution
  EOM
-    foreach (@{$build_structure{"APPS"}}) {
-        my $appname = $_;
-        my $appname_clean = $_;
-        $appname_clean =~ s/\//_/g;
-        $appname_clean =~ s/\.exe//;
-
-        my $uuid = $build_structure{"APPS_${appname_clean}_GUID"};
-        my $dep_index = 0;
-        foreach(@{$build_structure{"APPS_${appname}_LIBS"}}) {
-            my $libname = $_;
-            $libname =~ s/\//_/g;
-            $libname =~ s/\.(a|lib)//;
-            my $libuuid = $build_structure{"LIBS_${libname}_GUID"};
-            if (defined $libuuid) {
-                print F "\t\t${uuid}.${dep_index} = ${libuuid}\n";
-                $dep_index += 1;
-            }
-        }
-    }
-
      print F << "EOM";
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
  EOM
      foreach (@libs) {
          my $libname = $_;
@@ -630,10 +614,6 @@ EOM
  
      print F << "EOM";
  	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
  EndGlobal
  EOM
      close F;
-- 
1.6.4.msysgit.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-09-28 11:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-24 14:42 [PATCH 2/2] Make just opening the generated MSVC solution file not modify it Sebastian Schuberth
  -- strict thread matches above, loose matches on Subject: below --
2009-09-28 11:34 [PATCH 0/2] MSVC generator fixups Marius Storm-Olsen
2009-09-24 14:40 ` [PATCH 1/2] Make generated MSVC solution file open from Windows Explorer Sebastian Schuberth
2009-09-28 11:34   ` [PATCH 2/2] Make just opening the generated MSVC solution file not modify it Marius Storm-Olsen
2009-09-24 14:42 Sebastian Schuberth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).