All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marius Storm-Olsen <mstormo@gmail.com>
To: git@vger.kernel.org, spearce@spearce.org, sschuberth@gmail.com
Cc: msysgit@googlegroups.com
Subject: [PATCH 2/2] Make just opening the generated MSVC solution file not modify it
Date: Mon, 28 Sep 2009 13:34:21 +0200	[thread overview]
Message-ID: <f8aa063d3a2be33146b3626c4908ce1f64d9c7ac.1254137149.git.mstormo@gmail.com> (raw)
In-Reply-To: <cover.1254137149.git.mstormo@gmail.com>
In-Reply-To: <cover.1254137149.git.mstormo@gmail.com>


From: Sebastian Schuberth <sschuberth@gmail.com>

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>
---
 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.5.rc2.177.ga9dd6

  parent reply	other threads:[~2009-09-28 11:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 14:40 [PATCH 1/2] Make generated MSVC solution file open from Windows Explorer Sebastian Schuberth
2009-09-25 22:05 ` Shawn O. Pearce
2009-09-25 22:11   ` Alex Riesen
2009-09-25 22:45     ` Sebastian Schuberth
2009-09-25 22:41   ` Sebastian Schuberth
2009-09-25 22:59     ` Shawn O. Pearce
2009-09-25 23:58       ` Sebastian Schuberth
2009-09-26  0:05         ` Shawn O. Pearce
2009-09-26  9:45           ` Sebastian Schuberth
2009-09-26 20:05             ` Shawn O. Pearce
2009-09-28 10:36             ` Baz
2009-09-28 13:40               ` Sebastian Schuberth
2009-09-28 11:34 ` [PATCH 0/2] MSVC generator fixups Marius Storm-Olsen
2009-09-28 13:01   ` Sebastian Schuberth
2009-09-28 11:34 ` [PATCH 1/2] Make generated MSVC solution file open from Windows Explorer Marius Storm-Olsen
2009-09-28 11:34 ` Marius Storm-Olsen [this message]
2009-09-24 14:42 [PATCH 2/2] Make just opening the generated MSVC solution file not modify it Sebastian Schuberth
2009-09-24 14:42 Sebastian Schuberth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f8aa063d3a2be33146b3626c4908ce1f64d9c7ac.1254137149.git.mstormo@gmail.com \
    --to=mstormo@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=msysgit@googlegroups.com \
    --cc=spearce@spearce.org \
    --cc=sschuberth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.