Kaydet (Commit) 25a50205 authored tarafından Federico Bassini's avatar Federico Bassini Kaydeden (comit) jan iversen

gbuild-to-ide: second patch for vs2013 and testIde

the path in gbuildparse changed, so this patch re-adapt this
2 IDE integration

Change-Id: I5f7a679b8b12eac6f44030a33713ff19327b9d1a
Reviewed-on: https://gerrit.libreoffice.org/33815Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarjan iversen <jani@documentfoundation.org>
üst 5badb5b1
...@@ -94,7 +94,7 @@ class GbuildParser: ...@@ -94,7 +94,7 @@ class GbuildParser:
# Relation between json object and file extension # Relation between json object and file extension
jsonSrc = { jsonSrc = {
'CXXOBJECTS': '.cxx', 'OBJCOBJECTS': '.m', 'OBJCXXOBJECTS': '.mm', 'COBJECTS': '.c', 'CXXOBJECTS': '.cxx', 'OBJCOBJECTS': '.m', 'OBJCXXOBJECTS': '.mm', 'COBJECTS': '.c',
'LEXOBJECTS': '.l', 'YACCOBJECTS': '.y', 'FLEXOBJECTS': '.l', 'YACCOBJECTS': '.y',
'GENCXXOBJECTS': '.cxx', # remark is in workdir/GenCxxObject 'GENCXXOBJECTS': '.cxx', # remark is in workdir/GenCxxObject
'ASMOBJECTS': '.s', #not in json, due to Blacklist ? 'ASMOBJECTS': '.s', #not in json, due to Blacklist ?
...@@ -368,9 +368,9 @@ class testVS2013Ide(IdeIntegrationGenerator): ...@@ -368,9 +368,9 @@ class testVS2013Ide(IdeIntegrationGenerator):
for cxxobject in target['CXXOBJECTS']: for cxxobject in target['CXXOBJECTS']:
cxxrelpath= os.path.join('../..',target['location'].split('/')[-1], cxxobject) cxxrelpath= os.path.join('../..',target['location'].split('/')[-1], cxxobject)
cxxabspath = os.path.join(self.gbuildparser.srcdir,target['location'].split('/')[-1], cxxobject) cxxabspath = os.path.join(self.gbuildparser.srcdir,target['location'].split('/')[-1], cxxobject)
cxxfile = cxxabspath + '.cxx' cxxfile = cxxabspath
if os.path.isfile(cxxfile): if os.path.isfile(cxxfile):
ET.SubElement(cxxobjects_node, '{%s}ClCompile' % ns, Include=cxxrelpath + '.cxx') ET.SubElement(cxxobjects_node, '{%s}ClCompile' % ns, Include=cxxrelpath)
else: else:
print('Source %s in project %s does not exist' % (cxxfile, target['target_name'])) print('Source %s in project %s does not exist' % (cxxfile, target['target_name']))
...@@ -378,13 +378,13 @@ class testVS2013Ide(IdeIntegrationGenerator): ...@@ -378,13 +378,13 @@ class testVS2013Ide(IdeIntegrationGenerator):
for cxxobject in target['CXXOBJECTS']: for cxxobject in target['CXXOBJECTS']:
include_rel_path = os.path.join('../..',target['location'].split('/')[-1], cxxobject) include_rel_path = os.path.join('../..',target['location'].split('/')[-1], cxxobject)
include_abs_path = os.path.join(self.gbuildparser.srcdir,target['location'].split('/')[-1], cxxobject) include_abs_path = os.path.join(self.gbuildparser.srcdir,target['location'].split('/')[-1], cxxobject)
hxxfile = include_abs_path + '.hxx' hxxfile = include_abs_path
if os.path.isfile(hxxfile): if os.path.isfile(hxxfile):
ET.SubElement(includes_node, '{%s}ClInclude' % ns, Include=include_rel_path + '.hxx') ET.SubElement(includes_node, '{%s}ClInclude' % ns, Include=include_rel_path)
# Few files have corresponding .h files # Few files have corresponding .h files
hfile = include_abs_path + '.h' hfile = include_abs_path
if os.path.isfile(hfile): if os.path.isfile(hfile):
ET.SubElement(includes_node, '{%s}ClInclude' % ns, Include=include_rel_path + '.h') ET.SubElement(includes_node, '{%s}ClInclude' % ns, Include=include_rel_path)
ET.SubElement(proj_node, '{%s}Import' % ns, Project='$(VCTargetsPath)\Microsoft.Cpp.targets') ET.SubElement(proj_node, '{%s}Import' % ns, Project='$(VCTargetsPath)\Microsoft.Cpp.targets')
ET.SubElement(proj_node, '{%s}ImportGroup' % ns, Label='ExtensionTargets') ET.SubElement(proj_node, '{%s}ImportGroup' % ns, Label='ExtensionTargets')
self.write_pretty_xml(proj_node, project_path) self.write_pretty_xml(proj_node, project_path)
...@@ -844,9 +844,9 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator): ...@@ -844,9 +844,9 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
for cxxobject in target['CXXOBJECTS']: for cxxobject in target['CXXOBJECTS']:
cxxrelpath = os.path.join('../..', target['location'].split('/')[-1], cxxobject) cxxrelpath = os.path.join('../..', target['location'].split('/')[-1], cxxobject)
cxxabspath = os.path.join(self.gbuildparser.srcdir, target['location'].split('/')[-1], cxxobject) cxxabspath = os.path.join(self.gbuildparser.srcdir, target['location'].split('/')[-1], cxxobject)
cxxfile = cxxabspath + '.cxx' cxxfile = cxxabspath
if os.path.isfile(cxxfile): if os.path.isfile(cxxfile):
ET.SubElement(cxxobjects_node, '{%s}ClCompile' % ns, Include=cxxrelpath + '.cxx') ET.SubElement(cxxobjects_node, '{%s}ClCompile' % ns, Include=cxxrelpath)
else: else:
print('Source %s in project %s does not exist' % (cxxfile, target['target_name'])) print('Source %s in project %s does not exist' % (cxxfile, target['target_name']))
...@@ -854,13 +854,13 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator): ...@@ -854,13 +854,13 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
for cxxobject in target['CXXOBJECTS']: for cxxobject in target['CXXOBJECTS']:
include_rel_path = os.path.join('../..',target['location'].split('/')[-1], cxxobject) include_rel_path = os.path.join('../..',target['location'].split('/')[-1], cxxobject)
include_abs_path = os.path.join(self.gbuildparser.srcdir,target['location'].split('/')[-1], cxxobject) include_abs_path = os.path.join(self.gbuildparser.srcdir,target['location'].split('/')[-1], cxxobject)
hxxfile = include_abs_path + '.hxx' hxxfile = include_abs_path
if os.path.isfile(hxxfile): if os.path.isfile(hxxfile):
ET.SubElement(includes_node, '{%s}ClInclude' % ns, Include=include_rel_path + '.hxx') ET.SubElement(includes_node, '{%s}ClInclude' % ns, Include=include_rel_path)
# Few files have corresponding .h files # Few files have corresponding .h files
hfile = include_abs_path + '.h' hfile = include_abs_path
if os.path.isfile(hfile): if os.path.isfile(hfile):
ET.SubElement(includes_node, '{%s}ClInclude' % ns, Include=include_rel_path + '.h') ET.SubElement(includes_node, '{%s}ClInclude' % ns, Include=include_rel_path)
ET.SubElement(proj_node, '{%s}Import' % ns, Project='$(VCTargetsPath)\Microsoft.Cpp.targets') ET.SubElement(proj_node, '{%s}Import' % ns, Project='$(VCTargetsPath)\Microsoft.Cpp.targets')
ET.SubElement(proj_node, '{%s}ImportGroup' % ns, Label='ExtensionTargets') ET.SubElement(proj_node, '{%s}ImportGroup' % ns, Label='ExtensionTargets')
self.write_pretty_xml(proj_node, project_path) self.write_pretty_xml(proj_node, project_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment