git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 14/17] Vcproj.pm: list git.exe first to be startup project

From
Philip Oakley <philipoakley@iee.org>
Date
Jun 25, 2015, 00:03 UTC
Message-ID
<1435190633-2208-15-git-send-email-philipoakley@iee.org>
In-Reply-To
<1435190633-2208-1-git-send-email-philipoakley@iee.org>

Visual Studio take the first listed application/library as the default startup project [1]. Parse the application list for git.exe, then list the libraries, then the other git dashed forms in the git.sln file.

Detect the 'git' project and place it the head of the apps list, rather than the tail.

Export the apps list before libs list for both the projects and global structures of the .sln file.

[1] http://stackoverflow.com/questions/1238553/
vs2008-where-is-the-startup-project-setting-stored-for-a-solution
    "In the solution file, there are a list of pseudo-XML "Project"
    entries. It turns out that whatever is the first one ends up as
    the Startup Project, unless it’s overridden in the suo file. Argh.
    I just rearranged the order in the file and it’s good."
    "just moving the pseudo-xml isn't enough. You also have to move the
    group of entries in the "GlobalSection(ProjectConfigurationPlatforms)
    = postSolution" group that has the GUID of the project you moved to
    the top. So there are two places to move lines."
Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 contrib/buildsystems/Generators/Vcproj.pm | 33 ++++++++++++++++++-------------
 1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/contrib/buildsystems/Generators/Vcproj.pm b/contrib/buildsystems/Generators/Vcproj.pm
index 1b01d58..cc2fa21 100644
--- a/contrib/buildsystems/Generators/Vcproj.pm
+++ b/contrib/buildsystems/Generators/Vcproj.pm
@@ -560,20 +560,18 @@ sub createGlueProject {
     foreach (@apps) {
         $_ =~ s/\//_/g;
         $_ =~ s/\.exe//;
-        push(@tmp, $_);
+        if ($_ eq "git" ) {
+            unshift(@tmp, $_);
+        } else {
+            push(@tmp, $_);
+        }
     }
     @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 = $_;
-        my $uuid = $build_structure{"LIBS_${libname}_GUID"};
-        print F "$SLN_PRE";
-        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) {
@@ -587,6 +585,13 @@ sub createGlueProject {
         print F "	EndProjectSection";
         print F "$SLN_POST";
     }
+    foreach (@libs) {
+        my $libname = $_;
+        my $uuid = $build_structure{"LIBS_${libname}_GUID"};
+        print F "$SLN_PRE";
+        print F "\"${libname}\", \"${libname}\\${libname}.vcproj\", \"${uuid}\"";
+        print F "$SLN_POST";
+    }
 
     print F << "EOM";
 Global
@@ -598,17 +603,17 @@ EOM
     print F << "EOM";
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 EOM
-    foreach (@libs) {
-        my $libname = $_;
-        my $uuid = $build_structure{"LIBS_${libname}_GUID"};
+    foreach (@apps) {
+        my $appname = $_;
+        my $uuid = $build_structure{"APPS_${appname}_GUID"};
         print F "\t\t${uuid}.Debug|Win32.ActiveCfg = Debug|Win32\n";
         print F "\t\t${uuid}.Debug|Win32.Build.0 = Debug|Win32\n";
         print F "\t\t${uuid}.Release|Win32.ActiveCfg = Release|Win32\n";
         print F "\t\t${uuid}.Release|Win32.Build.0 = Release|Win32\n";
     }
-    foreach (@apps) {
-        my $appname = $_;
-        my $uuid = $build_structure{"APPS_${appname}_GUID"};
+    foreach (@libs) {
+        my $libname = $_;
+        my $uuid = $build_structure{"LIBS_${libname}_GUID"};
         print F "\t\t${uuid}.Debug|Win32.ActiveCfg = Debug|Win32\n";
         print F "\t\t${uuid}.Debug|Win32.Build.0 = Debug|Win32\n";
         print F "\t\t${uuid}.Release|Win32.ActiveCfg = Release|Win32\n";
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Previous: Sebastian SchuberthNext: Philip Oakley
Message 29 of 34 in “Make the msvc-build scripts work again”
  1. 00/17 Make the msvc-build scripts work againPhilip Oakley, Jun 25, 2015
  2. 01/17 .gitignore: improve MSVC ignore patternsPhilip Oakley, Jun 25, 2015
  3. Junio C HamanoJun 25, 2015
  4. Philip OakleyJun 25, 2015
  5. Junio C HamanoJun 25, 2015
  6. 02/17 .gitignore: ignore library directories created by MSVC VS2008 buildsystemPhilip Oakley, Jun 25, 2015
  7. 03/17 (msvc-build) Vcproj.pm: remove duplicate GUIDPhilip Oakley, Jun 25, 2015
  8. Eric SunshineJun 28, 2015
  9. Philip OakleyJun 28, 2015
  10. 04/17 Makefile: a dry-run can error out if no perl. Document the issuePhilip Oakley, Jun 25, 2015
  11. Junio C HamanoJun 25, 2015
  12. Philip OakleyJun 25, 2015
  13. Junio C HamanoJun 25, 2015
  14. Philip OakleyJun 25, 2015
  15. Philip OakleyJul 14, 2015
  16. 05/17 engine.pl: fix error message (lib->link)Philip Oakley, Jun 25, 2015
  17. 06/17 engine.pl: Avoid complications with perl supportPhilip Oakley, Jun 25, 2015
  18. 07/17 engine.pl: Properly accept quoted spaces in filenamesPhilip Oakley, Jun 25, 2015
  19. 08/17 engine.pl: Fix i18n -o option in msvc buildsystem generatorPhilip Oakley, Jun 25, 2015
  20. 09/17 engine.pl: ignore invalidcontinue.obj which is known to MSVCPhilip Oakley, Jun 25, 2015
  21. 10/17 engine.pl: name the msvc buildsystem's makedry error filePhilip Oakley, Jun 25, 2015
  22. 11/17 engine.pl: delete the captured stderr file if emptyPhilip Oakley, Jun 25, 2015
  23. 12/17 engine.pl: add debug line to capture the dry-runPhilip Oakley, Jun 25, 2015
  24. 13/17 engine.pl: provide more debug print statementsPhilip Oakley, Jun 25, 2015
  25. Sebastian SchuberthJun 29, 2015
  26. Philip OakleyJul 7, 2015
  27. Sebastian SchuberthJun 29, 2015
  28. Sebastian SchuberthJun 29, 2015
  29. 14/17 Vcproj.pm: list git.exe first to be startup projectPhilip Oakley, Jun 25, 2015
  30. 15/17 vcbuild/readme: Improve layout and reference msvc-build scriptPhilip Oakley, Jun 25, 2015
  31. 16/17 msvc-build: add complete Microsoft Visual C compilation scriptPhilip Oakley, Jun 25, 2015
  32. 17/17 config.mak.uname: add MSVC No_SafeExeceptionHandler optionPhilip Oakley, Jun 25, 2015
  33. Junio C HamanoJun 25, 2015
  34. Philip OakleyJun 25, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.