I try to compile QtWebKit on Qt5 but I have a problem. Actually I implement next command "d:\qt_5.0.2\qtwebkit qmake" after that
I see "Running configure test..." but at all after that I have a problem "pkg-configure isn't inside or outside command using app or package file"
And then i get the error ->> "Project ERROR: WebKit requires SQLite. Either make it available via pkg-config, set $SQLITE3SRCDIR or build WebKit under qt5.git."
Exactly what the message tells you: you need sqlite sources to compile QtWebKit. Given you're under Windows, we can exclude the pkg-config way.
You have a copy of sqlite sources inside the qtbase repository, so you can do in your prompt
SET SQLITE3SRCDIR=D:\path\to\qtbase\src\3rdparty\sqlite
and then qmake and make as usual.
(Note that you're not building from qt5.git as the message suggest, but module by module. That has its pros and its cons. Having to manually manage module (inter)dependencies is one of the cons, as you've just figured out.)
Related
I want to be able to create my own custom widgets in Qt Designer using the pyqt5 plugin on my Mac!
On my windows system this is easy. I have/install pyqt5-tools, this contains pyqt5.dll and I copy this into the Qt Designers plugin directory (these packages were all installed via winPython).
I set PYQTDESIGNERPATH=.
In my current directory I have ledplugin.py and ledwidget.py
I start Qt Designer and I have my custom widget to drag and drop
( this tutorial was taken from https://www.ics.com/blog/integrating-python-based-custom-widget-qt-designer )
On my Mac, I can't figure out what the equivalent .dylib of pyqt5.dll is? What is it? Where do I get it? How do I build it?
I try: brew install Qt Creator, that doesn't have the pyqt plugin. I try: brew install pyqt5, that creates: libpyqt5qmlplugin.dylib. I copy that into the Qt Designer plugin dir and the plugin loads, but it doesn't seem to do anything with my .py plugin/widget files.
How do I get this working on a Mac? What is the actual .dylib plugin I'm looking for? I can't find anything googling around.
Thanks for any help
As my comment explained: the Qt designer plugin can be built via the reference link (SIP/PyQt5 via RiverBank and Qt src via Qt).
Make sure your Qt versions match, although Qt docs do say plugins of lower versions should work with Designers on higher versions, but I'm sure there's a limit.
Build inside a python venv, as suggested.
You'll need xtool dev pkg for building.
Everything built really easy for me.
This will place your pyqt5.dylib plugin right in your Qt/clang_64/plugins/designer folder (it will also build it in pyqt5 make folder)
At this point I expected things to work. The plugin shows that it loads fine inside Designer.
Some extra notes:
running from command line can help with debugging: Qt/clang_64/bin/Designer.app > show package > /MacOS/Designer (drag this to a terminal to execute from command line)
set an env variable (>>export QT_DEBUG_PLUGINS=1) will give debug info and show lots of stuff including that pyqt5.dylib loads fine
widget plugins are two files: widget.py and the widgetplugin.py file that exposes the widget to designer. This plugin file MUST end with "plugin.py"
widgetplugin.py files can reside in a number of places:
in /[Designer App]/plugins/designer/python/
in ~/user dir/.designer/plugins/python/
in a directory of you choosing using env var PYQTDESIGNERPATH
However, at this point still nothing showed in Designer and I had no errors to go by. Since I just built pyqt5.dylib, I figured I'd simply put a bunch of print statements in it, re-make it and debug to figure out why the pyqt5 plugin loaded fine, but my custom widgets were nowhere to be found...
first issue was trouble loading a python environment:
for this issue, I simply copied my (I use brew) /usr/local/Cellar/python/3.7.2/Frameworks/Python.framework to Qt/clang_64/lib (I'm sure there's a proper PATH/PYTHONPATH you can set for this, I'll figure that out later)
after that came, missing PyQt5.sip module
for this, I installed (pip install) pyqt5-sip and then put in in my PYTHONPATH
After that, everything finally worked and I could see my custom plugins inside Qt Designer.
I am trying to compile some open source libraries in MinGW+MSYS. During the configure phase, I kept seeing some 3rd party libraries are missing.
For now, my solution is to download the source of the missing libraries and follow the GNU build process to compile and install them into my MinGW environment.
Is there any package management system for MinGW+MSYS to install packages easily? Just like apt-get.
I tried the mingw-get for the missing package. But it reports the error below.
mingw-get is the (closest equivalent to apt-get) package manager for MinGW and MSYS. However, it can only manage packages which are actually available for MinGW and/or MSYS, (either because a MinGW developer has built and packaged them, or a member of the MinGW user community has contributed them).
Arbitrarily guessing what packages may be available, and even what their correct package names may be, is unlikely to be productive. Run mingw-get in its GUI mode, (if it's properly installed, just running mingw-get without arguments should start it in this mode), to see a list of packages which are actually available; if you don't see any likely candidates for what you are looking for, then it doesn't (yet) exist. In that case, you will need to either find a non-MinGW alternative build, or build it yourself, from source. (If you choose the latter option, and your build is successful, then you may wish to consider contributing it to MinGW.org).
This works for me as a "package manager".
Install MSYS2. It comes with a package manager called pacman.
I am using Qt Creator to deploy my Qt application. On Mac, I'd like to include the required Qt libraries in the .app bundle. Is there any way to do it automatically using Qt Creator? Should I do it using the command-line? In that case, how should I do it?
The macdeployqt command line tool will add all the necessary Qt libraries that your Qt project references.
If you require any other, 3rd party libraries, you'll need to copy these manually and set the paths to them using the install_name_tool command.
You can check which libraries your application references using the otool command. For example: -
otool -L MyApplication.app/Contents/MacOS/MyApplication
For Qt Creator, I tend to write a script that adds the necessary libraries and calls macdeployqt and then under Projects, add a build step which calls the script.
An example script that would just add the Qt libraries would look something like this: -
#!/bin/bash
pwd
echo Copying QT libraries...
macdeployqt ./MyApplication.app
You can simply run macdeployqt foo.app. Qt Creator does not support this feature off-hand either. However, you can inject custom commands into your process in the QtCreator project settings.
It does not support QML just yet though. There are patches under codereview where it is coming. See the following link for details:
https://codereview.qt-project.org/#q,status:open+project:qt/qttools,n,z
Note: macdeployqt should not be used for usual development and debug! It should be only used when deploying. Otherwise, it is executed each time for building even if you just recompile the code due to a minor change for testing. This can slow down that process, but as for deploying, it should be alright.
On QT6 I was able to do it entirely within QT Creator:
In Projects/Build, add a custom build step after 'make' (probably only want to do this for your 'release' configuration):
Command: %{Qt:QT_HOST_PREFIX}/bin/macdeployqt
Arguments: %{ActiveProject:BuildConfig:Path}/%{ActiveProject:Name}.app - qmldir=%{ActiveProject:NativePath}
Working Directory: %{buildDir}
I was able to test it by airdropping the resulting .app onto my test machine.
reference: https://doc.qt.io/qt-6/macos-deployment.html#macdeploy
I am trying to build xmlsec on Windows... I am not an experienced C/C++ developer and not really familiar with the build process if something along the lines of "make ... make install" doesn't do the trick.
xmlsec comes with a Win32 subdirectory, a nice ECMAScript configure.js that takes an optional bunch of parameters and a readme which explains that after running the configure, "nmake ... nmake install" should do the trick. (Obviously it isn't quite that easy or I wouldn't be posting here!)
xmlsec also depends on a number of other libraries (see here for a graphic). I have downloaded the sources for those libraries.
My problem is that I don't know how to arrange those sources, or what to tell the configure.js script, in order to get a build to work.
For instance, the nmake process complains that it can't find "iconv.h" (iconv is one of the required libraries), which is not surprising because there isn't one. Instead there is an "iconv.h.in" and an "iconv.h.build.in"... which I don't know what to do with to produce the required 'iconv.h".
(I am using MS Visual Studio 2010 at the command prompt (which I think is the recommended approach.)
Does anybody out there know how to do this? Any help at all would be very much appreciated.
TIA
Mike Peat
You don't need to build xmlsec, you can directly download the wheel file from this link
https://github.com/mehcode/python-xmlsec/releases
It has all the dependencies installed with it.
have you tried the Msys with Mingw32 compiler? In Msys, you can do make and make install trick. I have successful with Msys in compile xmlsec. If you want to use Msys and have difficulties, I can help.
Anyway, in general, there must be a iconv.h file in the pre-compile folder provided by Zlatkovic (i.e C:\iconv\include\iconv.h). You may want to download again the folder. After figure out where all the dependencies are, put the path in environment path. For your information, I once tried with the configure.js but not successful. Hope that you are luckier than me :D
Hi Kristine (#Kristine T) - (and thanks for getting back to me!)
I had not been doing "make clean", but have now done so ("make clean", followed by "make" - no change in the result though).
The problem I get with the "make" is that it throws an error on compiling "dl.c" saying that "PACKAGE" is undefined (line 295).
I have also had problems using the compiled version of libxml2 - "configure" always says it can't find it (it is there, but...), so I have been using the --with-libxml-src=... parameter to configure, giving it the full source of libxml2 to work with, getting configure to at least finish OK.
I don't have the same problems with openssl or libxslt where I can either tell configure about the compiled version (using --with-XXX={path-to-dir}, or just omit ={path} bit, in which case it seems to find MinGW's own versions, but that doesn't work with libxml2.
Mike
How can I integrate SCIP with MinGW and Msys?
Whilst you are waiting for a real answer, I can already guide you to this page from the official site on how to build SCIP (see below). For actual integration there is a pointer in the faq:
How do I construct a problem instance in SCIP?
First you have to create a SCIP object via SCIPcreate(), then you
start to build the problem via SCIPcreateProb(). Then you create
variables via SCIPcreateVar() and add them to the problem via
SCIPaddVar(). The same has to be done for the constraints. For
example, if you want to fill in the rows of a general MIP, you have to
call SCIPcreateConsLinear(), SCIPaddConsLinear() and additionally
SCIPreleaseCons() after finishing. If all variables and constraints
are present, you can initiate the solution process via SCIPsolve().
Make sure to also call SCIPreleaseVar() if you do not need the
variable pointer anymore. For an explanation of creating and releasing
objects, please see the doxygen documentation.
NOTE: See the directories "examples/MIPsolver/" and "examples/Queens/" for simple examples
Remarks on Building/Installing under Windows using MinGW (from http://scip.zib.de/doc/html/INSTALL.php)
To build your own Windows binaries under Windows, we recommend using
the MinGW-Compiler with MSYS from mingw.org
First install MSYS, then MinGW to the mingw folder inside the msys
folder. Now you need to install the following packages to the mingw
folder:
- zlib (or use ZLIB=false ZIMPL=false since zlib is needed for ZIMPL and ZIMPL-support in SCIP)
- pcre (or use ZIMPL=false since pcre is needed for ZIMPL and ZIMPL-support in SCIP)
- gmplib (or use ZIMPL=false since gmplib is needed for ZIMPL and ZIMPL-support in SCIP)
(After calling "make clean" in the ZIMPL folder you will also need
flex and bison to remake ZIMPL. We recommend NOT to use "make clean"
inside the ZIMPL-folder if you do not have these packages installed.)
You can download these additional packages as precompiled binaries for
example from: http://gnuwin32.sourceforge.net/packages.html
(zlib&pcre) http://cs.nyu.edu/exact/core/gmp/ (gmplib) or compile the
source on your own from the project homepages: http://www.zlib.net/
http://www.pcre.org/ http://www.gmplib.org/ (The command "./configure
--prefix=/mingw ; make ; make install" should succeed without problems and installs the packages into the mingw folder.)
Now "make READLINE=false" should be compiling without errors. Please
note that we do NOT support creating the doxygen documentation or
readline-usage under Windows.
Since there are no real symlinks in MSYS, the include and library
files of SoPlex and ZIMPL are actually copied into the
SCIP-lib-folder. When you recompile ZIMPL or SoPlex after compiling
SCIP you have to copy the libraries manually into the SCIP-lib-folder
and recompile SCIP afterwards.