www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - Need help for Visual D solution generation with dub

reply Xavier Bigand <flamaros.xavier gmail.com> writes:
Hi,

As it bother me to need to regenerate my VSD solutions with dub command 
line each time I want to switch the build mode (debug, release, 
unittest), I am patching dub.

There is a little thing that don't works, in the Configuration 
Properties of the Solution only the last mode (unittest) as the build 
checkboxes activated.

If I check them manually for the other mode (debug and release), the 
build goes fine, but I can't figure out what is wrong in the generated 
files, and I not able to save the solution after my manual modifications 
(so no diff possible).

Here is the solution that I generate :
 Microsoft Visual Studio Solution File, Format Version 11.00
 # Visual Studio 2010
 Project("{2A9FFAE2-A8B7-42C6-9A3C-A411BC39214B}") = "prototype",
".dub/prototype.visualdproj", "{A89D23D5-2941-4945-AE33-D442EF89E13D}"
 	ProjectSection(ProjectDependencies) = postProject
 		{E43C0E8E-273F-423B-B4BA-62AC97D5AA8B} =
{E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}
 		{A56E4FDD-0358-41C6-83C0-0B70032E53CE} =
{A56E4FDD-0358-41C6-83C0-0B70032E53CE}
 		{D29C50E0-2F95-4F9E-A009-C7F3D5D01424} =
{D29C50E0-2F95-4F9E-A009-C7F3D5D01424}
 		{1440C124-7D17-4900-9C54-790646B76329} =
{1440C124-7D17-4900-9C54-790646B76329}
 	EndProjectSection
 EndProject
 Project("{2A9FFAE2-A8B7-42C6-9A3C-A411BC39214B}") = "derelict-gl3",
".dub/derelict-gl3.visualdproj", "{E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}"
 EndProject
 Project("{2A9FFAE2-A8B7-42C6-9A3C-A411BC39214B}") = "derelict-util",
".dub/derelict-util.visualdproj", "{D29C50E0-2F95-4F9E-A009-C7F3D5D01424}"
 EndProject
 Project("{2A9FFAE2-A8B7-42C6-9A3C-A411BC39214B}") = "derelict-glfw3",
".dub/derelict-glfw3.visualdproj", "{A56E4FDD-0358-41C6-83C0-0B70032E53CE}"
 EndProject
 Project("{2A9FFAE2-A8B7-42C6-9A3C-A411BC39214B}") = "gl3n",
".dub/gl3n.visualdproj", "{1440C124-7D17-4900-9C54-790646B76329}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		debug|Win32 = debug|Win32
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{A89D23D5-2941-4945-AE33-D442EF89E13D}.debug|Win32.ActiveCfg = debug|Win32
 		{A89D23D5-2941-4945-AE33-D442EF89E13D}.debug|Win32.Build.0 = debug|Win32
 		{D29C50E0-2F95-4F9E-A009-C7F3D5D01424}.debug|Win32.ActiveCfg = debug|Win32
 		{D29C50E0-2F95-4F9E-A009-C7F3D5D01424}.debug|Win32.Build.0 = debug|Win32
 		{1440C124-7D17-4900-9C54-790646B76329}.debug|Win32.ActiveCfg = debug|Win32
 		{1440C124-7D17-4900-9C54-790646B76329}.debug|Win32.Build.0 = debug|Win32
 		{E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}.debug|Win32.ActiveCfg = debug|Win32
 		{E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}.debug|Win32.Build.0 = debug|Win32
 		{A56E4FDD-0358-41C6-83C0-0B70032E53CE}.debug|Win32.ActiveCfg = debug|Win32
 		{A56E4FDD-0358-41C6-83C0-0B70032E53CE}.debug|Win32.Build.0 = debug|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
 EndGlobal
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		release|Win32 = release|Win32
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{A89D23D5-2941-4945-AE33-D442EF89E13D}.release|Win32.ActiveCfg =
release|Win32
 		{A89D23D5-2941-4945-AE33-D442EF89E13D}.release|Win32.Build.0 = release|Win32
 		{D29C50E0-2F95-4F9E-A009-C7F3D5D01424}.release|Win32.ActiveCfg =
release|Win32
 		{D29C50E0-2F95-4F9E-A009-C7F3D5D01424}.release|Win32.Build.0 = release|Win32
 		{1440C124-7D17-4900-9C54-790646B76329}.release|Win32.ActiveCfg =
release|Win32
 		{1440C124-7D17-4900-9C54-790646B76329}.release|Win32.Build.0 = release|Win32
 		{E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}.release|Win32.ActiveCfg =
release|Win32
 		{E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}.release|Win32.Build.0 = release|Win32
 		{A56E4FDD-0358-41C6-83C0-0B70032E53CE}.release|Win32.ActiveCfg =
release|Win32
 		{A56E4FDD-0358-41C6-83C0-0B70032E53CE}.release|Win32.Build.0 = release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
 EndGlobal
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		unittest|Win32 = unittest|Win32
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{A89D23D5-2941-4945-AE33-D442EF89E13D}.unittest|Win32.ActiveCfg =
unittest|Win32
 		{A89D23D5-2941-4945-AE33-D442EF89E13D}.unittest|Win32.Build.0 =
unittest|Win32
 		{D29C50E0-2F95-4F9E-A009-C7F3D5D01424}.unittest|Win32.ActiveCfg =
unittest|Win32
 		{D29C50E0-2F95-4F9E-A009-C7F3D5D01424}.unittest|Win32.Build.0 =
unittest|Win32
 		{1440C124-7D17-4900-9C54-790646B76329}.unittest|Win32.ActiveCfg =
unittest|Win32
 		{1440C124-7D17-4900-9C54-790646B76329}.unittest|Win32.Build.0 =
unittest|Win32
 		{E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}.unittest|Win32.ActiveCfg =
unittest|Win32
 		{E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}.unittest|Win32.Build.0 =
unittest|Win32
 		{A56E4FDD-0358-41C6-83C0-0B70032E53CE}.unittest|Win32.ActiveCfg =
unittest|Win32
 		{A56E4FDD-0358-41C6-83C0-0B70032E53CE}.unittest|Win32.Build.0 =
unittest|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
 EndGlobal
Jan 23
parent Xavier Bigand <flamaros.xavier gmail.com> writes:
Le 24/01/2017 à 00:45, Xavier Bigand a écrit :
 Hi,

 As it bother me to need to regenerate my VSD solutions with dub command
 line each time I want to switch the build mode (debug, release,
 unittest), I am patching dub.

 There is a little thing that don't works, in the Configuration
 Properties of the Solution only the last mode (unittest) as the build
 checkboxes activated.

 If I check them manually for the other mode (debug and release), the
 build goes fine, but I can't figure out what is wrong in the generated
 files, and I not able to save the solution after my manual modifications
 (so no diff possible).

 Here is the solution that I generate :
 Microsoft Visual Studio Solution File, Format Version 11.00
 # Visual Studio 2010
 Project("{2A9FFAE2-A8B7-42C6-9A3C-A411BC39214B}") = "prototype",
 ".dub/prototype.visualdproj", "{A89D23D5-2941-4945-AE33-D442EF89E13D}"
     ProjectSection(ProjectDependencies) = postProject
         {E43C0E8E-273F-423B-B4BA-62AC97D5AA8B} =
 {E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}
         {A56E4FDD-0358-41C6-83C0-0B70032E53CE} =
 {A56E4FDD-0358-41C6-83C0-0B70032E53CE}
         {D29C50E0-2F95-4F9E-A009-C7F3D5D01424} =
 {D29C50E0-2F95-4F9E-A009-C7F3D5D01424}
         {1440C124-7D17-4900-9C54-790646B76329} =
 {1440C124-7D17-4900-9C54-790646B76329}
     EndProjectSection
 EndProject
 Project("{2A9FFAE2-A8B7-42C6-9A3C-A411BC39214B}") = "derelict-gl3",
 ".dub/derelict-gl3.visualdproj", "{E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}"
 EndProject
 Project("{2A9FFAE2-A8B7-42C6-9A3C-A411BC39214B}") = "derelict-util",
 ".dub/derelict-util.visualdproj",
 "{D29C50E0-2F95-4F9E-A009-C7F3D5D01424}"
 EndProject
 Project("{2A9FFAE2-A8B7-42C6-9A3C-A411BC39214B}") = "derelict-glfw3",
 ".dub/derelict-glfw3.visualdproj",
 "{A56E4FDD-0358-41C6-83C0-0B70032E53CE}"
 EndProject
 Project("{2A9FFAE2-A8B7-42C6-9A3C-A411BC39214B}") = "gl3n",
 ".dub/gl3n.visualdproj", "{1440C124-7D17-4900-9C54-790646B76329}"
 EndProject
 Global
     GlobalSection(SolutionConfigurationPlatforms) = preSolution
         debug|Win32 = debug|Win32
     EndGlobalSection
     GlobalSection(ProjectConfigurationPlatforms) = postSolution
         {A89D23D5-2941-4945-AE33-D442EF89E13D}.debug|Win32.ActiveCfg =
 debug|Win32
         {A89D23D5-2941-4945-AE33-D442EF89E13D}.debug|Win32.Build.0 =
 debug|Win32
         {D29C50E0-2F95-4F9E-A009-C7F3D5D01424}.debug|Win32.ActiveCfg =
 debug|Win32
         {D29C50E0-2F95-4F9E-A009-C7F3D5D01424}.debug|Win32.Build.0 =
 debug|Win32
         {1440C124-7D17-4900-9C54-790646B76329}.debug|Win32.ActiveCfg =
 debug|Win32
         {1440C124-7D17-4900-9C54-790646B76329}.debug|Win32.Build.0 =
 debug|Win32
         {E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}.debug|Win32.ActiveCfg =
 debug|Win32
         {E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}.debug|Win32.Build.0 =
 debug|Win32
         {A56E4FDD-0358-41C6-83C0-0B70032E53CE}.debug|Win32.ActiveCfg =
 debug|Win32
         {A56E4FDD-0358-41C6-83C0-0B70032E53CE}.debug|Win32.Build.0 =
 debug|Win32
     EndGlobalSection
     GlobalSection(SolutionProperties) = preSolution
         HideSolutionNode = FALSE
     EndGlobalSection
 EndGlobal
 Global
     GlobalSection(SolutionConfigurationPlatforms) = preSolution
         release|Win32 = release|Win32
     EndGlobalSection
     GlobalSection(ProjectConfigurationPlatforms) = postSolution
         {A89D23D5-2941-4945-AE33-D442EF89E13D}.release|Win32.ActiveCfg
 = release|Win32
         {A89D23D5-2941-4945-AE33-D442EF89E13D}.release|Win32.Build.0 =
 release|Win32
         {D29C50E0-2F95-4F9E-A009-C7F3D5D01424}.release|Win32.ActiveCfg
 = release|Win32
         {D29C50E0-2F95-4F9E-A009-C7F3D5D01424}.release|Win32.Build.0 =
 release|Win32
         {1440C124-7D17-4900-9C54-790646B76329}.release|Win32.ActiveCfg
 = release|Win32
         {1440C124-7D17-4900-9C54-790646B76329}.release|Win32.Build.0 =
 release|Win32
         {E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}.release|Win32.ActiveCfg
 = release|Win32
         {E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}.release|Win32.Build.0 =
 release|Win32
         {A56E4FDD-0358-41C6-83C0-0B70032E53CE}.release|Win32.ActiveCfg
 = release|Win32
         {A56E4FDD-0358-41C6-83C0-0B70032E53CE}.release|Win32.Build.0 =
 release|Win32
     EndGlobalSection
     GlobalSection(SolutionProperties) = preSolution
         HideSolutionNode = FALSE
     EndGlobalSection
 EndGlobal
 Global
     GlobalSection(SolutionConfigurationPlatforms) = preSolution
         unittest|Win32 = unittest|Win32
     EndGlobalSection
     GlobalSection(ProjectConfigurationPlatforms) = postSolution

 {A89D23D5-2941-4945-AE33-D442EF89E13D}.unittest|Win32.ActiveCfg =
 unittest|Win32
         {A89D23D5-2941-4945-AE33-D442EF89E13D}.unittest|Win32.Build.0
 = unittest|Win32

 {D29C50E0-2F95-4F9E-A009-C7F3D5D01424}.unittest|Win32.ActiveCfg =
 unittest|Win32
         {D29C50E0-2F95-4F9E-A009-C7F3D5D01424}.unittest|Win32.Build.0
 = unittest|Win32

 {1440C124-7D17-4900-9C54-790646B76329}.unittest|Win32.ActiveCfg =
 unittest|Win32
         {1440C124-7D17-4900-9C54-790646B76329}.unittest|Win32.Build.0
 = unittest|Win32

 {E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}.unittest|Win32.ActiveCfg =
 unittest|Win32
         {E43C0E8E-273F-423B-B4BA-62AC97D5AA8B}.unittest|Win32.Build.0
 = unittest|Win32

 {A56E4FDD-0358-41C6-83C0-0B70032E53CE}.unittest|Win32.ActiveCfg =
 unittest|Win32
         {A56E4FDD-0358-41C6-83C0-0B70032E53CE}.unittest|Win32.Build.0
 = unittest|Win32
     EndGlobalSection
     GlobalSection(SolutionProperties) = preSolution
         HideSolutionNode = FALSE
     EndGlobalSection
 EndGlobal
I just tried to put all builds in the same sections and it works ;-) Have a good night
Jan 23