-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exclude webkit at all #14
Comments
I modified locally PythonQt_QtAll.pro to handle QT_STATIC as env variable like follows: QT_STATIC = $$(QT_STATIC) It seems working. If you like to open a pull request then I can do it. Regards, |
At least the reason why i maintain my fork of this fork is the use of CMake instead of qmake and i think that @Orochimarufan also doesn’t maintain the qmake files. |
OK, but then remove all the stuff related to qmake then (at least *.pro/pri/prf and createSolution.bat). Anyway I used qmake because cmake gives a bunch of errors. |
I left it in, so it is easier to merge when upstream does changes to it. |
Hi Norbert, Regards, |
Hi, PythonQt.cpp And here is the recipe I used: %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"" x86_amd64 |
This error has nothing to do with CMake, it tries to use the
|
To disable Qt5WebKit you can comment line 8 and 9 in The fork was created (as the description states) because it added Qt5 and Python3 support as well as an improved CMake build system, things upstream didn’t want to support back then. I irregularly merge upstream, so it doesn’t track any release, but also not trunk. (r403 at the moment, which is a few commits after v3.0) |
"This error has nothing to do with CMake, it tries to use the #endif as macro argument. " |
"To disable Qt5WebKit you can comment line 8 and 9 in extensions/PythonQt_QtAll/CMakeLists.txt. " extensions\PythonQt_QtAll\PythonQt_QtAll.cpp extensions\PythonQt_QtAll\CMakeLists.txt QT_STATIC is not the same as "exclude webkit". QT_STATIC means use static Qt and use that define to exclude webkit seems a trick. |
In the meanwhile I can say your modifications on "src/PythonQt.cpp" work fine, thanks. PythonQtImporter.cpp |
The python version I use is 2.7 so I surrounded PythonQtImporter_get_data implementation with "ifdef PY3K" and nmake built correctly the static libs. [ 93%] Linking CXX shared library Qt5Python27_d.dll I set the "python27_d.lib" in PYTHON_LIBRARY for cmake but it seems the release version of python library is used. |
While in release mode, trying to build shared libraries, with the same option and python27.lib in release mode I get a different error: [ 93%] Linking CXX shared library Qt5Python27.dll |
I realized a couple of errors related to release mode build. Then I'm not sure the "#ifndef QT_STATIC" precompiler statement works correctly in "extensions\PythonQt_QtAll\PythonQt_QtAll.cpp". AFAIK to pass that define from cmake to the source code an add_definitions() cmake command should be required in CMakeLists.txt |
Yes. Qt5WebKit also has to be disabled in the code and if Qt5.6 is used, it needs to be told to also use the wrappers for Qt5.4. I’m happy to get it tested, so i’m just curious: why use this fork, if the official PythonQt built with qmake and you don’t use Python3 or want CMake? |
|
We want to add the pythonQt build in out build system and cmake is fine. I built with qmake just to make a test. We don't like to use qmake in out build system. |
"QT_STATIC is defined by Qt itself." |
I just pushed a fix for PythonQtImporter.get_data 3134043 |
"There is a python27_d.lib? I don’t have this." |
Yeah, but it populates |
If understood correctly I can say I build out of source and I clean the build dir before running cmake. When I run cmake I read as follows: -- Found PythonLibs: L:/3rd_party/python/Python-2.7.8/win64/libs/python27_d.lib (found suitable version "2.7.8", minimum required is "2.6") But then running nmake I get the error: [ 31%] Linking CXX shared library Qt5Python27_d.dll |
try cleaning the CMakeCache (in the gui or remove the |
I removed completly the build dir where CMakeCache.txt and all other generated files are located (I perform an "out of source" build). I removed a path to a python installation from %PATH% env variable. I run cmake and then nmake but I always get the same error in debug mode. On the contrary the release mode works fine. |
Then print all the variables set by |
I added both "-DPYTHON_DEBUG_LIBRARY" and "-DPYTHON_LIBRARY" to cmake command line and here is the list of variables. The build problem in debug mode is not solved. -- PYTHONLIBS_FOUND=TRUE |
I also tried to add "-DPythonQt_DEBUG=ON" to cmake command line and I get the build error: PythonQtClassInfo.cpp I think that "meta->className()" is enough in this case since it already returns a "const char*" |
There is also a syntax error: PythonQtMethodInfo.cpp It seems nobody have ever built with this option then ... |
python uses auto linking with vc, so the CMake settings sadly don’t matter: from
and PythonQt abuses it (maybe rightly so, because the debug lib doesn’t exist in the official distribution): from
So remove the definition of
Ever is a bit of a stretch, if it’s rarely used, errors will sneak in, thx for testing. |
Thanks for the help! Now I can generate both debug and release libraries. |
Hi All,
I found that there is a fix to exclude webkit with Qt5 static libraries. In my case I don't use Qt static libraries but I don't need webkit either. So, wouldn't be a better implementation to have a USE_WEBKIT variable so exclude webkit? So that building with USE_WEBKIT = false webkit is skipped even with non static Qt? The Qt5 static libraries case would set that variable properly also.
Moreover I'm not sure the actual PythonQt_QtAll.pro configuration file handles the webkit exclusion with static Qt5 correctly.
Regards,
Gianni
The text was updated successfully, but these errors were encountered: