[Libreoffice-commits] core.git: bin/gbuild-to-ide

Michel Renon michel.renon at free.fr
Mon Jul 20 03:17:58 PDT 2015


 bin/gbuild-to-ide |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 09491390e6662516339f8aa920bb8ae9493e34c0
Author: Michel Renon <michel.renon at free.fr>
Date:   Sat Jul 11 23:56:12 2015 +0200

    tdf#92560 : QtCreator integration complains about a "ucpp" without a .pro file
    
    The script gbuild-to-ide now handles correctly specific case where a module
    is not a direct subfolder of LibreOffice base folder.
    Currently, 3 modules :
    external/neon, external/clucene, external/ucpp.
    
    Change-Id: I9477519a530439d43919b4e1b51dc2c71ee05fe0
    Reviewed-on: https://gerrit.libreoffice.org/17054
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index 0452a9e..af1b20a 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -1291,7 +1291,8 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
         all_libs = set(self.gbuildparser.libs) | set(self.gbuildparser.exes)
         for lib in all_libs:
             self._log("\nlibrary : %s, loc=%s" % (lib.short_name(), lib.location))
-            lib_folder = os.path.basename(lib.location)
+            lib_name = os.path.basename(lib.location)
+            lib_folder = os.path.relpath(lib.location, self.base_folder)
 
             def lopath(path):
                 return os.path.relpath(path, lib.location)
@@ -1336,7 +1337,8 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
                     'sources' : set(sources_list),
                     'headers' : set(headers_list),
                     'includepath' : set(includepath_list),
-                    'loc' : lib.location
+                    'loc' : lib.location,
+                    'name' : lib_name
                 }
 
     def emit(self):
@@ -1356,13 +1358,14 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
             headers_list = sorted(self.data_libs[lib_folder]['headers'])
             includepath_list = sorted(self.data_libs[lib_folder]['includepath'])
             lib_loc = self.data_libs[lib_folder]['loc']
+            lib_name = self.data_libs[lib_folder]['name']
             
             sources = " \\\n".join(sources_list)
             headers = " \\\n".join(headers_list)
             includepath = " \\\n".join(includepath_list)
             
             # create .pro file
-            qt_pro_file = '%s/%s.pro' % (lib_loc, lib_folder)
+            qt_pro_file = '%s/%s.pro' % (lib_loc, lib_name)
             try:
                 content = QtCreatorIntegrationGenerator.pro_template % {'sources' : sources, 'headers' : headers, 'includepath' : includepath}
                 mode = 'w+'
@@ -1378,7 +1381,7 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
                 print("\n\n", file=sys.stderr)
             
             # create .pro.user file
-            qt_pro_user_file = '%s/%s.pro.user' % (lib_loc, lib_folder)
+            qt_pro_user_file = '%s/%s.pro.user' % (lib_loc, lib_name)
             try:
                 with open(qt_pro_user_file, mode) as fprouser:
                     fprouser.write(self.generate_pro_user_content(lib_folder))


More information about the Libreoffice-commits mailing list