macdeployqt for a daemon process
-
I was hoping to create a pkg for a daemon process. I am building a websocket server using the https://doc.qt.io/qt-5/qtwebsockets-sslechoserver-example.html example from the docs.
When I ran macdeployqt, I got the follwing error.
| => macdeployqt WebSocketServer Empty filename passed to function ERROR: Could not find bundle binary for "WebSocketServer" ERROR: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: '': No such file or directory\n" ERROR: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: '': No such file or directory\n" ERROR: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: '': No such file or directory\n" WARNING: WARNING: Could not find any external Qt frameworks to deploy in "WebSocketServer" WARNING: Perhaps macdeployqt was already used on "WebSocketServer" ? WARNING: If so, you will need to rebuild "WebSocketServer" before trying again. Empty filename passed to function ERROR: Could not find bundle binary for "WebSocketServer" ERROR: "error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: can't open file: (No such file or directory)\n" ERROR: ""
I assumed that it must be a tool only for a GUI and not exactly a console application.
Luckily I found the following: https://vincent.bernat.ch/en/blog/2013-autoconf-osx-packaging However, it is not specific to Qt and also I found: https://forum.qt.io/topic/60991/understanding-qt-and-mac-pkg-setups which was a lot more specific to Qt but it just did not work. I do now know how to add resources.Any suggestions here? Perhaps similar to windeployqt, macdeployqt will at least pull in all the libraries that need to be packaged perhaps.
Is there an example of a packaged application of the SSL EchoServer example? Any help is appreciated, please.
-
I think I am able to package this now using the blog post by Vincent.
Stuck in a slightly different situation.
So the otool output is the following:
| => otool -L WebSocketServer WebSocketServer: @rpath/QtWebSockets.framework/Versions/5/QtWebSockets (compatibility version 5.12.0, current version 5.12.0) @rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.12.0, current version 5.12.0) @rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.12.0, current version 5.12.0) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)
I do know I have to copy a few frameworks from Qt while packaging. The thing is while deploying, do I copy this in to the same folder as the daemon?
-
Hi,
A daemon like you describe has no associated bundle, therefore macdeployqt can't to its job.