[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: VS2005 configuration/build issues (was Re: Minor issue with VS.NET solution file generation (trunk))

From: Tim Van Holder <tim.van.holder_at_telenet.be>
Date: 2006-01-01 11:32:11 CET

D.J. Heap wrote:
> On 12/31/05, Tim Van Holder <tim.van.holder@telenet.be> wrote:
>
>>Unfortunately, an excess newline snuck into the start of that template,
>>again breaking recognition as a valid 2005 solution file in the shell.
>>(Also, as a minor aside, VS2005 is no longer branded as "Visual
>>Studio.NET", so it would be nice if gen_win.py was adjusted
>>accordingly).
>
> What exactly doesn't work? It's working fine for me --
> double-clicking, right click and open etc. Is it only if you have
> multiple versions of VS installed? The newline is there because that
> is how new solution files look when I create them directly from VS2005
> -- however, I see now that there is some binary stuff on the front of
> it: 0xEFBBBF. I guess that is some sort of encoding marker? Do yours
> have that? As you say, if I just drop the newline then the icon
> changes to the new one with the little 8 which I suppose means the
> shell extension recognizes it correctly. But now I'm wondering if we
> should include the binary marker, too...

Yes, I have VS.NET 2003 and VS2005 both installed, and if there is no
version indication (7/7.1/8) on the icon, double-clicking does nothing.
It's possible that if you only have one version installed, it will
always use that to open every .sln file, regardless of whether it's
recognized or not.
The binary marker is probably to indicate a UTF-8 file, so isn't
required as such (VS supports UTF-8 just fine without that marker).

> The build system is fairly complicated due to all of Subversion's
> dependencies and attempts to work with multiple versions of those
> dependencies -- trying to get everything right in all conditions is
> pretty difficult, but if you have patches feel free to post them and
> we'll try to get them applied as appropriate.

I'll look into it - I'm not very comfortable with Python (yet), but
I'll try :-)

>>One issue is that apr.h already defines _CRT_SECURE_NO_DEPRECATE,
>>causing lots of warnings about a duplicate definition of that macro.
>
> Hmm, you should only get warnings if the definition is different,
> shouldn't you? And the apr I have from Apache 2.0.55 doesn't have
> those set which is why they were added. Are you using a newer apr?

Yes, but it's a warning for every single file that uses apr.h, masking
pretty much anything else it might complain about.
The apr I am using is the HEAD of branches/0.9.x.

Oh, I'm not sure if the built apr and db DLLs are supposed to end up in
the svn build dir or not, but currently they don't. This means that
it will use installed versions instead. For db this isn't an issue,
since the build process expects an installed db anyway.
But with apr, it means that svn will not typically be runnable from
its build tree (although it may pick up the dlls from an installed
svn because they're in the path).
Attached is a patch that adjusts the build process to copy all DLLs
and .exes to a bin directory in the output tree, and tries to avoid
using hardcoded paths in favor of VS macros. It currently uses
post-build events on each of the particular projects, but perhaps it
could be put in the __ALL__ project instead (but that would require
using hardcoded paths).
The iconv modules are not currently copied, because they're makefile
projects which cannot have post-build events. Perhaps an empty
project (libapriconv_and_modules?) could be added for that purpose;
then again, setting APR_ICONV_PATH to the build tree is probably enough
to use the ones from the build.

By the way, the reason i'm building subversion from sources is because
I want to try to build .NET bindings for it, and possibly an SCC
plugin. These are mainly as exercises for myself (to get some Managed
C++ experience), but if I get the .NET bindings in a suitable functional
state, would that be something you're interested in adding to the
subversion/bindings tree?

Index: generator/vc2005_sln.ezt
===================================================================
--- generator/vc2005_sln.ezt (revision 17949)
+++ generator/vc2005_sln.ezt (working copy)
@@ -1,4 +1,3 @@
-
 Microsoft Visual Studio Solution File, Format Version [version]
 # Visual Studio 2005
 [for targets]Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "[targets.name]", "[targets.path]", "[targets.guid]"
Index: generator/vcnet_vcproj.ezt
===================================================================
--- generator/vcnet_vcproj.ezt (revision 17949)
+++ generator/vcnet_vcproj.ezt (working copy)
@@ -10,8 +10,8 @@
         <Configurations>
 [for platforms][for configs] <Configuration
                         Name="[configs.name]|[platforms]"
- OutputDirectory="..\..\..\[configs.name]\[target.output_dir]"
- IntermediateDirectory="..\..\..\[configs.name]\[target.intermediate_dir]"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)\[target.output_dir]"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)\[target.intermediate_dir]"
                         ConfigurationType="[target_type]"[is configs.name "Release"]
                         WholeProgramOptimization="FALSE"[end]>
                         <Tool
@@ -66,7 +66,11 @@
 [end] <Tool
                                 Name="VCMIDLTool"/>
                         <Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCPostBuildEventTool"[is target_type "1"]
+ CommandLine="mkdir &quot;$(SolutionDir)$(ConfigurationName)&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; &gt;NUL&#x0D;&#x0A;"
+ [end][is target_type "2"]
+ CommandLine="mkdir &quot;$(SolutionDir)$(ConfigurationName)&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; &gt;NUL&#x0D;&#x0A;"
+ [end]/>
                         <Tool
                                 Name="VCPreBuildEventTool"/>
                         <Tool
Index: generator/libaprutil.vcproj.ezt
===================================================================
--- generator/libaprutil.vcproj.ezt (revision 17949)
+++ generator/libaprutil.vcproj.ezt (working copy)
@@ -54,7 +54,9 @@
                                 TypeLibraryName=".\Debug/libaprutil.tlb"
                                 HeaderFileName=""/>
                         <Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="mkdir &quot;$(SolutionDir)$(ConfigurationName)&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; &gt;NUL&#x0D;&#x0A;"
+ />
                         <Tool
                                 Name="VCPreBuildEventTool"/>
                         <Tool
@@ -115,7 +117,9 @@
                                 TypeLibraryName=".\Release/libaprutil.tlb"
                                 HeaderFileName=""/>
                         <Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="mkdir &quot;$(SolutionDir)$(ConfigurationName)&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; &gt;NUL&#x0D;&#x0A;"
+ />
                         <Tool
                                 Name="VCPreBuildEventTool"/>
                         <Tool
Index: generator/libapriconv.vcproj.ezt
===================================================================
--- generator/libapriconv.vcproj.ezt (revision 17949)
+++ generator/libapriconv.vcproj.ezt (working copy)
@@ -53,7 +53,9 @@
                                 TypeLibraryName=".\Debug/libapriconv.tlb"
                                 HeaderFileName=""/>
                         <Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="mkdir &quot;$(SolutionDir)$(ConfigurationName)&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; &gt;NUL&#x0D;&#x0A;"
+ />
                         <Tool
                                 Name="VCPreBuildEventTool"/>
                         <Tool
@@ -113,7 +115,9 @@
                                 TypeLibraryName=".\Release/libapriconv.tlb"
                                 HeaderFileName=""/>
                         <Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="mkdir &quot;$(SolutionDir)$(ConfigurationName)&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; &gt;NUL&#x0D;&#x0A;"
+ />
                         <Tool
                                 Name="VCPreBuildEventTool"/>
                         <Tool
Index: generator/libapr.vcproj.ezt
===================================================================
--- generator/libapr.vcproj.ezt (revision 17949)
+++ generator/libapr.vcproj.ezt (working copy)
@@ -54,7 +54,9 @@
                                 TypeLibraryName=".\Debug/libapr.tlb"
                                 HeaderFileName=""/>
                         <Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="mkdir &quot;$(SolutionDir)$(ConfigurationName)&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; &gt;NUL&#x0D;&#x0A;"
+ />
                         <Tool
                                 Name="VCPreBuildEventTool"/>
                         <Tool
@@ -115,7 +117,9 @@
                                 TypeLibraryName=".\Release/libapr.tlb"
                                 HeaderFileName=""/>
                         <Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="mkdir &quot;$(SolutionDir)$(ConfigurationName)&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin&quot; &gt;NUL 2&gt;&amp;1&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; &gt;NUL&#x0D;&#x0A;"
+ />
                         <Tool
                                 Name="VCPreBuildEventTool"/>
                         <Tool

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jan 1 11:35:05 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.