Closed Ty3uK closed 4 years ago
Hi @Ty3uK
Instead of adding QSvg to Qode can we make it a separate plugin ?
I really dont want to add additional libs to the core package.
Maybe do something like what Qt Webview plugin is trying to achieve ?
The main issue is that QtSvg wont be used in all the projects, so we can export is as a separate plugin instead.
Let me know and I can further help you out with this.
Hi @Ty3uK
Instead of adding QSvg to Qode can we make it a separate plugin ?
I really dont want to add additional libs to the core package.
Maybe do something like what Qt Webview plugin is trying to achieve ?
Ok, thank you, I'll check it out!
@master-atul can you check out repo?
When I run building without QT_INSTALL_DIR
, I've errors with QtSvg module (obvious).
But when I pass QT_INSTALL_DIR
, demo crashes with new error:
objc[11006]: Class QT_ROOT_LEVEL_POOL__THESE_OBJECTS_WILL_BE_RELEASED_WHEN_QAPP_GOES_OUT_OF_SCOPE is implemented in both /Users/ty3uk/projects/js/nodegui-plugin-svg/node_modules/@nodegui/qode/dist/1.0.6/lib/QtCore.framework/Versions/5/QtCore (0x102167618) and /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore (0x10ab72140). One of the two will be used. Which one is undefined.
objc[11006]: Class RunLoopModeTracker is implemented in both /Users/ty3uk/projects/js/nodegui-plugin-svg/node_modules/@nodegui/qode/dist/1.0.6/lib/QtCore.framework/Versions/5/QtCore (0x102167640) and /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore (0x10ab721b8). One of the two will be used. Which one is undefined.
Let me quickly check this @Ty3uK
@master-atul of course, thanks!
Seems to work pretty well with
QT_INSTALL_DIR=/Users/atulr/Tools/qt/5.13.0/clang_64 npm run dev
@Ty3uK
@master-atul hmm, strange. I've install qt through homebrew.
Could you post the actual path you are using in QT_INSTALL_DIR ?
QT_INSTALL_DIR=/usr/local/Cellar/qt/5.13.2
Could you quickly do ls /usr/local/Cellar/qt/5.13.2
and post the contents of the directory here?
ll /usr/local/Cellar/qt/5.13.2
Permissions Size User Date Modified Name
drwxr-xr-x - ty3uk 28 окт 15:14 .brew
drwxr-xr-x - ty3uk 28 окт 15:14 bin
drwxr-xr-x - ty3uk 28 окт 15:14 doc
drwxr-xr-x - ty3uk 28 окт 15:14 Frameworks
drwxr-xr-x - ty3uk 28 окт 15:14 include
.rw-r--r-- 3,2k ty3uk 10 дек 15:18 INSTALL_RECEIPT.json
drwxr-xr-x - ty3uk 28 окт 15:14 lib
drwxr-xr-x - ty3uk 28 окт 15:14 libexec
drwxr-xr-x - ty3uk 10 дек 15:17 mkspecs
drwxr-xr-x - ty3uk 28 окт 15:14 phrasebooks
drwxr-xr-x - ty3uk 28 окт 15:14 plugins
drwxr-xr-x - ty3uk 28 окт 15:14 qml
.rw-r--r-- 3,8k ty3uk 28 окт 15:14 README
drwxr-xr-x - ty3uk 28 окт 15:14 translations
This is super strange.
d in both /Users/ty3uk/projects/js/nodegui-plugin-svg/node_modules/@nodegui/qode/dist/1.0.6/lib/QtCore.framework/Versions/5/QtCore (0x102167640) and /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore
This clearly means it is trying to access qode's Qt.
This should have worked ideally. Is it too much for me to ask you to install official Qt ? I do remember that it was working with homebrew version also. Let me try it out with homebrew based qt installer as well
@master-atul no problem, already started downloading :)
Installed 5.14.0, got error:
Error: dlopen(/Users/ty3uk/projects/js/nodegui-plugin-svg/build/Release/nodegui_plugin_svg.node, 1): Library not loaded: @rpath/QtCore.framework/Versions/5/QtCore
Referenced from: /Users/ty3uk/projects/js/nodegui-plugin-svg/build/Release/nodegui_plugin_svg.node
Reason: Incompatible library version: nodegui_plugin_svg.node requires version 5.14.0 or later, but QtCore provides version 5.13.0
Trying to install 5.13.2
So, I can confirm it is not working with homebrew version sadly. Will check it out in depth why.
But make sure you run npx cmake-js clean
before switching the qt or delete the build directory.
Yep, i've delete build
before checking
With 5.13.2 got next error:
Cannot mix incompatible Qt library (version 0x50d02) with this library (version 0x50d00)
With QT_DEBUG_PLUGINS=1
found that crash is related to macintosh
plugin:
Got keys from plugin meta data ("macintosh")
QFactoryLoader::QFactoryLoader() checking directory path "/Users/ty3uk/projects/js/nodegui-plugin-svg/node_modules/@nodegui/qode/dist/1.0.6/styles" ...
loaded library "/Users/ty3uk/projects/js/nodegui-plugin-svg/node_modules/@nodegui/qode/dist/1.0.6/plugins/styles/libqmacstyle.dylib"
QFactoryLoader::QFactoryLoader() checking directory path "/Users/ty3uk/projects/js/nodegui-plugin-svg/node_modules/@nodegui/qode/dist/1.0.6/plugins/accessible" ...
QFactoryLoader::QFactoryLoader() checking directory path "/Users/ty3uk/projects/js/nodegui-plugin-svg/node_modules/@nodegui/qode/dist/1.0.6/accessible" ...
Cannot mix incompatible Qt library (version 0x50d02) with this library (version 0x50d00)
Interesting. I am running 5.13.0 and thats why it works for me. Great! Now we know the plugin system needs a bit more of work. I ll need to dig a bit deep to resolve this. I know its a bit strange request. But maybe you can try the exact version 5.13.0 for now until we resolve this correctly so that you are not blocked. But thanks for discovering this.
@master-atul 5.13.0 download in progress! :)
@master-atul confirm, worked with 5.13.0
I have a theory. When we do npm install we use qode's qt to build the nodegui core libarary. This is qt v5.13.0. So I think if we do QT_INSTALL_DIR=/Users/atulr/Tools/qt/5.13.2/clang_64 npm install after deleting node_modules it should compile with core nodegui library also with 5.13.2 and then when we build our plugin with 5.13.2 everything should be okay.
But since its working for you at the moment I will take a look at this sometime later.
@master-atul I've tried install with QT_INSTALL_DIR
- it's not working
Anyway, thank you for help!
@master-atul sorry, maybe you know what kind of problem is that. Building on Windows 10 with VS 2017 failed with next error:
..\node_modules\@nodegui\nodegui\config\..\build\Release\nodegui_core.node : fatal error LNK1107: [C:\develop\nodegui-plugin-webview\build\nodegui_plugin_webview.vcxproj]
Same error with your webview plugin.
Will be used with other PRs that implements QSvgWidget and Svg React component.