summaryrefslogtreecommitdiff
path: root/bin/gbuild-to-ide
AgeCommit message (Collapse)Author
2020-09-17make vim-ide-integration: fix ResourceWarningMiklos Vajna
Exception ignored in: <_io.FileIO name='compile_commands.json' mode='wb' closefd=True> ResourceWarning: unclosed file <_io.TextIOWrapper name='compile_commands.json' mode='w' encoding='UTF-8'> Change-Id: I2ab4275a9b7897f5cd9e88b20a1eea4c68fe0d1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102907 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-07-13Don't rely on Python's treatment of unrecognized escape sequencesMike Kaganski
According to [1]: > Changed in version 3.6: Unrecognized escape sequences produce a DeprecationWarning. > In a future Python version they will be a SyntaxWarning and eventually a SyntaxError. [1] https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals Change-Id: Ia4f79f17ccb121f423f35b1e1306d5ae285e8762 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98321 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-08vs-ide-integration: unescape values coming from DEFSMike Kaganski
... so `TK_DLL_NAME=\"tklo.dll\"` becomes `TK_DLL_NAME="tklo.dll"` Change-Id: I0e14ded85be387a342e1979aa3f120727178351d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98319 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-27VisualStudioIntegrationGenerator: put solution/projects to build dirMike Kaganski
.. instead of source dir. This allows to have ide integration files in proper directory when using out-of-the-tree build directory. Change-Id: I0d3be02b3ee27e499d9d223b0a521e4688885a1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87502 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-22vs-ide-integration: Also add .c filesMike Kaganski
Change-Id: Icb4e879025278291270d908bb53178250c8e7007 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87192 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-10-12qtcreator: Sort SUBDIRS in lo.pro alphabeticallyMichael Weghorn
... in particular to have a deterministic order and see more easily what relevant effects changes to the gbuild-to-ide script have while testing those. Change-Id: I4583a8ca5a779d1d1e8aa6db7bb0295abd6154ee Reviewed-on: https://gerrit.libreoffice.org/80653 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-10-11qtcreator-ide-integration: Take unit tests into accountMichael Weghorn
This makes code-completion, clang checks, navigation etc. work in files related to those as well. Change-Id: Ie0b7d75f2ed953228d74ae070056327bff7ff2a2 Reviewed-on: https://gerrit.libreoffice.org/80652 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-07-15qtcreator: Recursively include module's header filesMichael Weghorn
Recursivley walk the include directories located inside the current module's directory, since includes are basically paths relative to the include directories and can refer to files in subdirectories of the include path, like e.g. #include <extended/AccessibleBrowseBoxBase.hxx> in 'accessibility/source/extended/AccessibleBrowseBoxBase.cxx'. This way, such header files are added to the .pro files and are thus e.g. shown in Qt Creator's project view and can be found by using 'a <FILEANME>' in the Locator. Change-Id: Id74f971b2ffee82203f74a4d444c41166c671920 Reviewed-on: https://gerrit.libreoffice.org/75628 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-07-05qtcreator: Make paths work with cygwinMichael Weghorn
Absolute paths in files created by GbuildToJson in Cygwin environment are Windows paths (like "C:/....'), while relative paths in the Python program executed in Cygwin are treated as Unix paths ('/cygdrive/c/....') which caused wrong relative paths to be generated by the call to 'os.relpath'. It would walk up to the root of the Windows path and then walk down the tree in the Unix file system path again. This converts the paths to absolute Windows paths first to avoid this issue. Change-Id: I2e3e6926e312d64aa18067933a5903ac7ad5d31a Reviewed-on: https://gerrit.libreoffice.org/75114 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-06-17Add vs2019-ide-integrationMike Kaganski
Change-Id: I14b7ebb3521f9a23fcf4c3ff907408327f189f29 Reviewed-on: https://gerrit.libreoffice.org/74138 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-06-08qtcreator: Take over '-std=...' from CXXFLAGSMichael Weghorn
If the '-std=' compiler flag is set in CXXFLAGS, take that over into the .pro files used by Qt Creator. This makes ClangCodeModel use the correct std version, and e.g. know about 'std::string_view' if '-std=gnu++2a' (or anything else indicating C++17 or higher is supported) is used and thus avoids unnecessary errors/warnings from being displayed. Use a list, so other flags can easily be added later. (It currently doesn't seem reasonable to me to just pass all cxxflags though, since .pro files are currently only generated per top-level module, while C++ flags can differ between different targets in the same module). Change-Id: Id3f3e2b9ba77e5220a17fd4796937c816979959a Reviewed-on: https://gerrit.libreoffice.org/73677 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-02-14VisualStudioIntegrationGenerator: put CXXFLAGS to AdditionalOptionsMike Kaganski
Adding AdditionalOptions to nmake project settings allows IntelliSense to know about used compiler switches; specifically, passing std switch (currently -std:c++17) defines _MSVC_LANG macro [1] to proper value to avoid false IntelliSense errors (e.g., for string_view). [1] https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros Change-Id: I90309e6bf2a87257a0c81b1406e678af962eb587 Reviewed-on: https://gerrit.libreoffice.org/67805 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-01-25add basic support for generating CodeLite IDE filesNoel Grandin
Change-Id: I70613baada4f82e5e56f9a21547733c3a6907b53 Reviewed-on: https://gerrit.libreoffice.org/66908 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-13qtcreator: Take system includes into accountMichael Weghorn
Take system includes ('-isystem') into account when generating the '*.pro' files for Qt Creator using the 'qtcreator-ide-integration' make target. Without this, Qt Creator is unable to find the corresponding included files. This also makes Qt Creator's ClangCodeModel able to properly process files and display actual problems, rather than always showing a multitude of errors due to missing includes while parsing the source/header files. Change-Id: Ie513341e1074ceab9304ae9df73fac9a79329db8 Reviewed-on: https://gerrit.libreoffice.org/65129 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2018-12-03Fix typoAndrea Gelmini
Change-Id: I69e4d471c806159d6748016a79f041c01b40b888 Reviewed-on: https://gerrit.libreoffice.org/64430 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-08-30Upgrade to vs2017-ide-integration, since we don't support VS2015 in masterMike Kaganski
This allows to avoid the "(Visual Studio 2015)" labels next to project names in Solution Explorer; and also avoid multiple warnilgs like project-name.vcxproj : warning : The build tools for Visual Studio 2015 (v140) cannot be found. Install Visual Studio 2015 (v140) to build using the Visual Studio 2015 (v140) build tools. in IDE's Output pane in case VS2015 is absent locally. Change-Id: I53b68ac810cbf2a31667c35dd549310e7209e010 Reviewed-on: https://gerrit.libreoffice.org/59797 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-29vim-ide-integration: remove no longer needed workaroundMiklos Vajna
Fixes the problem that e.g. this code: OUString str; str += ""; is marked as a compile error, when clang would still work with c++11, but the tree is configured for gnu++17. Change-Id: Id60c0cf4b8c693b534f16ba813cf01a4bad7e560 Reviewed-on: https://gerrit.libreoffice.org/59746 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-07-09fix compile_commands.json when generated with modern gccMarkus Mohrhard
Change-Id: I4a17cfb567f5ebec8bb416b9aa4d58763ff36c36
2018-05-02VS IDE integration: use full Windows include paths in VS projectsMike Kaganski
It turns out that VS IDE's "Peek definition" (and other functions that navigate to sources) fail if the short ("DOS") path to the file is given in project's includes: see issue at https://developercommunity.visualstudio.com/content/problem/139659/vc-peek-definition-fails-to-navigate-to-windows-ki.html This patch converts the include paths to full Windows paths, to avoid the problem. Also, since IDE starts working correctly with this change, this patch removes inclusion of "inherited" paths "$(IncludePath)", which are the paths added by Visual Studio itself. Since we do specify all include paths explicitly, that is not required, and avoids confusion. Change-Id: Ide2d948f8c7b050b02f550342144fede4fcafb82 Reviewed-on: https://gerrit.libreoffice.org/53731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-03-21Don't generate filters with empty IncludesMike Kaganski
Avoids VS warnings: > smoketest\Library_smoketest.vcxproj.filters : warning : Unable to > read the filters file "Library_smoketest.vcxproj.filters". Please > unload the project "Library_smoketest.vcxproj" to be able to edit it. > The required attribute "Include" is empty or missing from the element > <Filter>. Change-Id: I0f02e837823a5e7a0355fd0f895f00c63a5df6fc Reviewed-on: https://gerrit.libreoffice.org/51684 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-17VS generator: set output to soffice.bin to allow starting from debuggerMike Kaganski
It is more likely that soffice.bit should be debugged, not soffice.exe stub. This allows to start debug session from VisualStudio, and debug startup code. Change-Id: Iab4615c67aeb25b811ecc71f6ae48aa9b40c45dc Reviewed-on: https://gerrit.libreoffice.org/48025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-23vim-ide-integration: -I<dir> workaround is no longer neededMiklos Vajna
Since commit ecbaf980625a9e7b06abe91c7c70e78f6ad469a7 (-I$(dir $(3)) in gb_CObject__command_pattern is no longer needed, 2017-11-01). Change-Id: I9d6b7436f7b6e865d37e358adb9cf075e4e51bff
2017-11-18gbuild-to-ide cleaned up double scripts.jan Iversen
Moved gbuild-to-ideNS to gbuild-to-ide (NS was the original) Removed gbuild-to-ideNS from Makefile.in the original gbuild-to-ide was split off to gbuild-to-ideNS, in order not to disturb the production environment while playing with new ide generation. Work on a new IDE generator have been stopped for a half year, so time to clean up. The work on a new Xcode generator continues offline (for now), and are part of the iOS development. Change-Id: Ia67355df21c6aec592d792ffa7c904a568eff961
2017-10-27VisualStudioIntegrationGenerator: honor defines' valuesMike Kaganski
Before this, -D_WIN32_WINNT=0x0601 used to land to VS project simply as _WIN32_WINNT (without value). Change-Id: I68ebdc24c3181c5d9e046280756e4cefee3de46c Reviewed-on: https://gerrit.libreoffice.org/43928 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-26gbuild-to-ide: handle -U undefs correctlyMike Kaganski
Previously, defines string like this: -DDBG_UTIL -DNOMINMAX -D_DLL -UNOMINMAX would produce this defines list: DBG_UTIL;NOMINMAX;_DLL -UNOMINMAX where last "define" is incorrect; proper list should be DBG_UTIL;_DLL so that the undef'ed element would be properly eliminated from the result. This patch takes care of this. Change-Id: Ia66a1d6d0a6e0bbfd0022b22285b005609871336 Reviewed-on: https://gerrit.libreoffice.org/43923 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-07-05gbuild-to-ide: add VisualStudio visualizers file to solutionMike Kaganski
See https://msdn.microsoft.com/en-us/library/jj620914 Change-Id: Ibd18f1c36c46ea47c897542f35e3ea2a8bc0a8ac Reviewed-on: https://gerrit.libreoffice.org/39510 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-28remove "vs2013" from gbuild-to-ideMichael Stahl
Too old to build master. Change-Id: I01636c9ae26ddb3954dcfdd1977551c0f115a81b
2017-03-12solution ProjectIDE-vs2013: Generate.5: only 1 .vcxproj and .filter pr moduleGian Domenico Ceccarini
change for cicle to generate only one .vcxproj and .filter pr module Change-Id: I93f2279e368e11ef5b9d442c6dcdfa4bf39bd6c2 Reviewed-on: https://gerrit.libreoffice.org/35075 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@libreoffice.org>
2017-03-03gbuild-to-ide: fix testide problemFederico Bassini
this patch fix some problem in the class testVS2013Ide: fix some tag xml bad generated, i test the project pocheck and it compiles. Change-Id: I5a4e3e71286a486e03ecbe936fb848e589ff71c9 Reviewed-on: https://gerrit.libreoffice.org/34739 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@libreoffice.org>
2017-03-03gbuild-to-ide: testVS2013Ide .propsFederico Bassini
this patch add a PropertySheet.props in the windows directory in this file can put the enviroment variables for vs2013. i add in the gbuildparser a variable _jsonsrcdir that contains the SRCDIR path that it can found in the json file. with this file we can use enviroment variables of LO. e.g.: $(SRCDIR), $(BUILDDIR) etc... in the VS2013 ide. Change-Id: Ie3158fd31fe247833115d445553f613dcd1a3b1d Reviewed-on: https://gerrit.libreoffice.org/34749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@libreoffice.org>
2017-02-04gbuild-to-ide fix the double .cxx in the .filtersFederico Bassini
double ".ccx" for each source files in the .filters in the testVS2013Ide. this patch fix that. Change-Id: Ic06800c260800f72254038e30119db40fe048037 Reviewed-on: https://gerrit.libreoffice.org/33892 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2017-02-04gbuild-to-ide: new function that generates a vxcproj on testIDEFederico Bassini
this function generates a vcxproj, for the reverse engineering i generate a vcxproj from VS2013 that: -the compiler works good i do the code that generates it the code miss that the link to lib that i left commented Change-Id: If98eb5645c9e1060a55701abf5b96db85eca6ce5 Reviewed-on: https://gerrit.libreoffice.org/33893 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2017-02-02gbuild-to-ide added -DLIBO_INTERNAL_ONLY to CXXFLAGSjan Iversen
In order to compile correct this flag is needed and it is not exported in the json files Change-Id: Ib8f0b882f2d59ed467a9198c148263e2882c60b3
2017-02-02gbuild-to-ide: second patch for vs2013 and testIdeFederico Bassini
the path in gbuildparse changed, so this patch re-adapt this 2 IDE integration Change-Id: I5f7a679b8b12eac6f44030a33713ff19327b9d1a Reviewed-on: https://gerrit.libreoffice.org/33815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2017-02-01gbuild-to-ide typojan Iversen
Change-Id: I3b57086349d039087dc9395f7af63f8e8fbf1bab
2017-02-01gbuild-to-ide patch to allow faulty gbuildtojsonjan Iversen
Sometimes gbuildtojson does not get rebuild, and thus delivers unexpected json files (old keys) Change-Id: Ib4bab170ed5a2ab5c112d19af144f2551e608278
2017-02-01gbuild-to-ide: VSGenerator and testVs2013 with relative linksFederico Bassini
VisualStudio2013IntegrationGenerator recently doesn't work with the new relative paths in GbuilParser. this patch does this, now it works fine with all relative paths. what is missing it's in the .vcxproj: <NMakeBuildCommandLine> <NMakeCleanCommandLine> <NMakeReBuildCommandLine> these still work with absolute path but i start now on working this Change-Id: I19610097edc11be67b4f7fd9f32b6683d334cc2d Reviewed-on: https://gerrit.libreoffice.org/33735 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2017-01-31gbuild-to-ide: testVS2013Ide add a function that create .filters fileFederico Bassini
this patch writes the .filters file, it creates 2 filters: -headers: place, for each module, the header files contained in gbuilparser.modules[<module>][headers] -sources: place, for each module, the cxx files contained in gbuildparser.modules[<module>][<target>]['CXXOBJECTS'] Change-Id: Iba98d788b72992624fb8aa09315a5647e275ffcc Reviewed-on: https://gerrit.libreoffice.org/33721 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2017-01-30gbuild-to-ide: fix VimIntegrationGeneratorMiklos Vajna
Regression from commit 92c2c5f62d6e8962259e03424a40b6ac7ef32e7d (gbuild-to-ide: moduleDict targets -> all paths replaced with relative, 2017-01-24), <https://clang.llvm.org/docs/JSONCompilationDatabase.html> says about the "directory" key of one entry: "All paths specified in the command or file fields must be either absolute or relative to this directory." So making the includes relative to the toplevel directory won't fly, make them absolute. Change-Id: I3f33c7a21880c1b245580b22996079ba08e3d806 Reviewed-on: https://gerrit.libreoffice.org/33694 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-30gbuild-to-ide, solved vim problem.jan Iversen
Updated xcode, WIP. Solved problem with vim. Remark the vim-ide-integration is not maintained, and cannot be expected to work as the IDE gets more integrated. Change-Id: I9d6fe6d2caef7162298814f1ab0d16c7aeb7d895
2017-01-29gbuild-to-ide xcode, added targets in menujan Iversen
First step in removing make as builder. Change-Id: I445627df5610a7d0b8bfbabddb66f1273e021b1a
2017-01-29gbuild-to-ide xcode added include files and sorted source listjan Iversen
Added source files so they are sorted (earlier was sorted pr target) include files added. Change-Id: Id9581e2c4d6b123eb13ecc7ce2586fe52cb3ab4f
2017-01-28gbuild-to-ide source code is relative to modulejan Iversen
Last central change, before rewrapping xcode. Change-Id: If9b3d668fa59fe32a7a89a17ea56a6852b260a2b
2017-01-28gbuild-to-ide, add pr module sourcesjan Iversen
Additional to having sources pr target (needed for generarition), each module also has a sources key where all the module source files are sorted, this allows to present the user with a sorted list of sources. Change-Id: I8fd8249c88dc55f47199b7998faeb721d74f982f
2017-01-28gbuild-to-ide, centralized adding extension.jan Iversen
Instead of each generator handling extensions it is not done centrally. Change-Id: I2cf1a499269a26c1c402577b3e8e508d578f9c6e
2017-01-26gbuildtojson support for yacc files.jan Iversen
added support for add_grammars macro Change-Id: I17955bd1534d9f43e1953691d985a18ee8241d38
2017-01-26gbuildtojson, added support for lex filesjan Iversen
added add_scanner macro Finalized the move around in gbuild-to-ide, to signal which generators are actively supported. Change-Id: I11699cd4380d49efc3b541abb7780b5136162433
2017-01-26gbuild-to-ide finalized split of maintained codejan Iversen
Added "testIde-ide-integration" to allow test of new vs2013 generator. Change-Id: Ia7d286f06e287ce97faa0a262ee4f93172d4ed28
2017-01-25gbuild-to-ide: moduleDict targets -> all paths replaced with relativeFederico Bassini
in moduleDict[<module>][<target>] all absolute paths are replaced with a relative path: -include/libs relative to core(contained in json) directory -json objects, makefile, relative to <module> directory Change-Id: I5dd64942c2a4d6fc2f01037ee7417de91c41906a Reviewed-on: https://gerrit.libreoffice.org/33506 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2017-01-24gbuild-to-ide: replacement of the codeFederico Bassini
this patch do 2 things: 1a) create class testide, a duplicate of VisualStudioIntegrationGeneration to work on it without touch the real one 1b) place xcodeintegrationgenerator under testide, and under this last one all of generators that work yet Change-Id: Ib678134678ed19de9dcd9d1f47e8e7c16ae59f74 Reviewed-on: https://gerrit.libreoffice.org/33495 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>