This is where I got to with the vcproj generator -- I've rebuilt it to
patch against r5928.
You can probably tell I'm fairly clueless with Python (most of the code
changes I stole from the dsp generator, and it's probably a naive way to
do things), but these changes allow me to build the libraries and
compile the exe's -- the exe's still don't link unless apr.lib,
aprutil.lib, apriconv.lib and libneon.lib are manually added, although I
have linked several of them by doing just that.
Obviously, I haven't done anything with the external projects that need
to be added to the solution (and appropriate dependencies changed). I'm
not sure what to do, really...see my earlier post under the Building on
Windows thread.
DJ
Index: build/generator/gen_vcnet_vcproj.py
===================================================================
--- build/generator/gen_vcnet_vcproj.py (revision 5928)
+++ build/generator/gen_vcnet_vcproj.py (working copy)
@@ -50,15 +50,15 @@
libs=self.get_win_libs(target, cfg),
))
+
sources = [ ]
for src, reldir in self.get_win_sources(target):
- rsrc = string.replace(string.replace(src, target.path + os.sep, ''),
- os.sep, '\\')
- sources.append(rsrc)
-
- # sort for output stability, to watch for regressions
- sources.sort()
-
+ rsrc = string.replace(os.path.join(rootpath, src), os.sep, '\\')
+ if '-' in rsrc:
+ rsrc = '%s' % rsrc
+ sources.append(_item(path=rsrc, reldir=reldir))
+ sources.sort(lambda x, y: cmp(x.path, y.path))
+
data = {
'target' : target,
'target_type' : config_type,
@@ -71,11 +71,11 @@
# 'default_platform' : self.platforms[0],
# 'default_config' : configs[0].name,
'is_exe' : ezt.boolean(isinstance(target, gen_base.TargetExe)),
-# 'is_external' : ezt.boolean(isinstance(target,
-# gen_base.TargetExternal)),
-# 'is_utility' : ezt.boolean(isinstance(target,
-# gen_base.TargetUtility)),
-# 'is_apache_mod' : ezt.boolean(target.install == 'apache-mod'),
+ 'is_external' : ezt.boolean(isinstance(target,
+ gen_base.TargetExternal)),
+ 'is_utility' : ezt.boolean(isinstance(target,
+ gen_base.TargetUtility)),
+ 'is_apache_mod' : ezt.boolean(target.install == 'apache-mod'),
}
self.write_with_template(fname, 'vcnet_vcproj.ezt', data)
@@ -151,20 +151,34 @@
if isinstance(target, gen_base.TargetExternal):
fname = target._sources[0]
- ### GJS: or should this be get_unique_win_depends?
- deplist = self.get_win_depends(target)
-
+ deplist = [ ]
+ if isinstance(target, gen_base.Target):
+ if isinstance(target, gen_base.TargetExe):
+ deps = { }
+ for obj in self.get_win_depends(target, 0):
+ deps[obj] = None
+ for obj in self.get_win_depends(target, 2):
+ if isinstance(obj, gen_base.TargetLib):
+ deps[obj] = None
+ deps = deps.keys()
+ deps.sort()
+ deplist.extend(deps)
+ elif isinstance(target, gen_base.TargetLib):
+ pass
+ else:
+ deplist.extend(self.get_unique_win_depends(target))
+
depends = [ ]
- for i in range(len(deplist)):
- depends.append(_item(guid=guids[deplist[i].name],
- index=i,
+ for i in range(len(deplist)):
+ depends.append(_item(guid=guids[deplist[i].name],
+ index=i,
))
-
targets.append(_item(name=target.name,
path=string.replace(fname, os.sep, '\\'),
guid=guids[target.name],
depends=depends,
))
+ targets.sort()
configs = [ ]
for i in range(len(self.configs)):
Index: build/generator/vcnet_vcproj.ezt
===================================================================
--- build/generator/vcnet_vcproj.ezt (revision 5928)
+++ build/generator/vcnet_vcproj.ezt (working copy)
@@ -10,10 +10,10 @@
<Configurations>
[for platforms][for configs] <Configuration
Name="[configs.name]|[platforms]"
- OutputDirectory="$(SolutionDir)\[configs.name]"
- IntermediateDirectory="[configs.name]"
+ OutputDirectory="..\..\..\[configs.name]\[target.path]"
+ IntermediateDirectory="..\..\..\[configs.name]\[target.path]"
ConfigurationType="[target_type]"[is configs.name "Release"]
- WholeProgramOptimization="TRUE"[end]>
+ WholeProgramOptimization="FALSE"[end]>
<Tool
Name="VCCLCompilerTool"
[is configs.name "Debug"] Optimization="0"
@@ -24,7 +24,7 @@
EnableIntrinsicFunctions="TRUE"
FavorSizeOrSpeed="1"
OmitFramePointers="TRUE"
-[end] AdditionalIncludeDirectories="[for includes][includes][if-index includes last][else];[end][end]"
+[end] AdditionalIncludeDirectories="[for includes]..\..\[includes][if-index includes last][else];[end][end]"
PreprocessorDefinitions="[for configs.defines][configs.defines][if-index configs.defines last][else];[end][end]"
[is configs.name "Debug"] MinimalRebuild="TRUE"
RuntimeLibrary="3"
@@ -47,7 +47,7 @@
[is target_type "4"][else] OutputFile="$(OutDir)\$(ProjectName).[if-any is_exe]exe[else]dll[end]"
[end][is configs.name "Debug"] LinkIncremental="2"
[else] LinkIncremental="1"
-[end] AdditionalLibraryDirectories="[rootpath]\db4-win32\lib"
+[end] AdditionalLibraryDirectories="..\..\..\db4-win32\lib"
[is configs.name "Debug"] GenerateDebugInformation="TRUE"
[else] GenerateDebugInformation="FALSE"
[end] ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"[is configs.name "Debug"]
@@ -76,7 +76,7 @@
[end][end] </Configurations>
<Files>
[for sources] <File
- RelativePath="[sources]">
+ RelativePath="..\..\[sources.path]">
</File>
[end] </Files>
<Globals>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 14 02:43:59 2003