brigjs / brig Goto Github PK
View Code? Open in Web Editor NEWUser Interface Toolkits for Node.js
License: MIT License
User Interface Toolkits for Node.js
License: MIT License
Please add support to mac os with arm64 ,. this wont work on mac with m1
For being able to compile against Qt 5.9.2 I need to add
'-I/usr/include/qt/QtCore/5.9.2',
'-I/usr/include/qt/QtQuickControls2',
in binding.gyp "cflags" property. I'm using arch linux so basically is not possible for me to downgrade without lot of work. Is this an issue of brig or arch's. Thanks
Here's what I get for npm brig install
on my Mac
node-pre-gyp ERR! Tried to download(404): https://github.com/cfsghost/brig/releases/download/0.1.17/node-v59-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp)
CXX(target) Release/obj.target/brig/build/src/moc_eventdispatcher.o
In file included from ../build/src/moc_eventdispatcher.cpp:9:
In file included from ../build/src/../../src/eventdispatcher/eventdispatcher.h:6:
In file included from /usr/local/Cellar/qt/5.10.0/lib/QtCore.framework/Versions/Current/Headers/QAbstractEventDispatcher:1:
/usr/local/Cellar/qt/5.10.0/lib/QtCore.framework/Versions/Current/Headers/qabstracteventdispatcher.h:43:10: fatal error: 'QtCore/qobject.h' file not found
#include <QtCore/qobject.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/brig/build/src/moc_eventdispatcher.o] Error 1
Mac = 10.13.2.
QT = v5.10 via homebrew (I had to link moc
and qmake
myself).
NPM = 5.6.0
QML is indeed Javascript and you can write in pure JS in each QML file
Where is the difference to this project?
Warning messages when starting application on MacOSX.
$ node app.js
objc[29593]: Class RunLoopModeTracker is implemented in both /Users/fred/Qt/5.7/clang_64/lib/QtCore.framework/Versions/5/QtCore and /Users/fred/projects/brig/native/node-v51-darwin-x64/brig.node. One of the two will be used. Which one is undefined.
Brig can be installed on Mac OS X
with prebuilt binary now in order to have a more easier way to prepare environment without Qt and Xcode.
This feature is being required on Windows
as well.
I was wondering if the project is still being maintained, thanks.
Hi there!
When running the install script for qt-darwin, which is a dependency of brig, it errors due to being unable to extract the files using tar. I believe this could be remedied by making qt-darwin an optional dependency to only install on MacOS systems. Here is the npm output:
$ npm install brig
> [email protected] install D:\Matthew\Documents\Projects\QtTest\node_modules\qt-darwin
> tar -zxf library.node && rm -fr library.node
tar: Frameworks/Qt3DCore.framework/Qt3DCore: Cannot create symlink to ‘Versions/Current/Qt3DCore’: No such file or directory
tar: Frameworks/Qt3DCore.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/Qt3DQuick.framework/Qt3DQuick: Cannot create symlink to ‘Versions/Current/Qt3DQuick’: No such file or directory
tar: Frameworks/Qt3DQuick.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtBluetooth.framework/QtBluetooth: Cannot create symlink to ‘Versions/Current/QtBluetooth’: No such file or directory
tar: Frameworks/QtBluetooth.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtCharts.framework/QtCharts: Cannot create symlink to ‘Versions/Current/QtCharts’: No such file or directory
tar: Frameworks/QtCharts.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtConcurrent.framework/QtConcurrent: Cannot create symlink to ‘Versions/Current/QtConcurrent’: No such file or directory
tar: Frameworks/QtConcurrent.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtCore.framework/QtCore: Cannot create symlink to ‘Versions/Current/QtCore’: No such file or directory
tar: Frameworks/QtCore.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtDataVisualization.framework/QtDataVisualization: Cannot create symlink to ‘Versions/Current/QtDataVisualization’: No such file or directory
tar: Frameworks/QtDataVisualization.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtGui.framework/QtGui: Cannot create symlink to ‘Versions/Current/QtGui’: No such file or directory
tar: Frameworks/QtGui.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtMultimedia.framework/QtMultimedia: Cannot create symlink to ‘Versions/Current/QtMultimedia’: No such file or directory
tar: Frameworks/QtMultimedia.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtMultimediaQuick_p.framework/QtMultimediaQuick_p: Cannot create symlink to ‘Versions/Current/QtMultimediaQuick_p’: No such file or directory
tar: Frameworks/QtMultimediaQuick_p.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtMultimediaWidgets.framework/QtMultimediaWidgets: Cannot create symlink to ‘Versions/Current/QtMultimediaWidgets’: No such file or directory
tar: Frameworks/QtMultimediaWidgets.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtNetwork.framework/QtNetwork: Cannot create symlink to ‘Versions/Current/QtNetwork’: No such file or directory
tar: Frameworks/QtNetwork.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtOpenGL.framework/QtOpenGL: Cannot create symlink to ‘Versions/Current/QtOpenGL’: No such file or directory
tar: Frameworks/QtOpenGL.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtPositioning.framework/QtPositioning: Cannot create symlink to ‘Versions/Current/QtPositioning’: No such file or directory
tar: Frameworks/QtPositioning.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtPrintSupport.framework/QtPrintSupport: Cannot create symlink to ‘Versions/Current/QtPrintSupport’: No such file or directory
tar: Frameworks/QtPrintSupport.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtQml.framework/QtQml: Cannot create symlink to ‘Versions/Current/QtQml’: No such file or directory
tar: Frameworks/QtQml.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtQuick.framework/QtQuick: Cannot create symlink to ‘Versions/Current/QtQuick’: No such file or directory
tar: Frameworks/QtQuick.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtQuickControls2.framework/QtQuickControls2: Cannot create symlink to ‘Versions/Current/QtQuickControls2’: No such file or directory
tar: Frameworks/QtQuickControls2.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtQuickParticles.framework/QtQuickParticles: Cannot create symlink to ‘Versions/Current/QtQuickParticles’: No such file or directory
tar: Frameworks/QtQuickParticles.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtQuickTemplates2.framework/QtQuickTemplates2: Cannot create symlink to ‘Versions/Current/QtQuickTemplates2’: No such file or directory
tar: Frameworks/QtQuickTemplates2.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtSensors.framework/QtSensors: Cannot create symlink to ‘Versions/Current/QtSensors’: No such file or directory
tar: Frameworks/QtSensors.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtSql.framework/QtSql: Cannot create symlink to ‘Versions/Current/QtSql’: No such file or directory
tar: Frameworks/QtSql.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtWebChannel.framework/QtWebChannel: Cannot create symlink to ‘Versions/Current/QtWebChannel’: No such file or directory
tar: Frameworks/QtWebChannel.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtWebEngine.framework/QtWebEngine: Cannot create symlink to ‘Versions/Current/QtWebEngine’: No such file or directory
tar: Frameworks/QtWebEngine.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtWebEngineCore.framework/Helpers: Cannot create symlink to ‘Versions/Current/Helpers’: No such file or directory
tar: Frameworks/QtWebEngineCore.framework/Libraries: Cannot create symlink to ‘Versions/Current/Libraries’: No such file or directory
tar: Frameworks/QtWebEngineCore.framework/QtWebEngineCore: Cannot create symlink to ‘Versions/Current/QtWebEngineCore’: No such file or directory
tar: Frameworks/QtWebEngineCore.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtWebSockets.framework/QtWebSockets: Cannot create symlink to ‘Versions/Current/QtWebSockets’: No such file or directory
tar: Frameworks/QtWebSockets.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtWebView.framework/QtWebView: Cannot create symlink to ‘Versions/Current/QtWebView’: No such file or directory
tar: Frameworks/QtWebView.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtWidgets.framework/QtWidgets: Cannot create symlink to ‘Versions/Current/QtWidgets’: No such file or directory
tar: Frameworks/QtWidgets.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Frameworks/QtXmlPatterns.framework/QtXmlPatterns: Cannot create symlink to ‘Versions/Current/QtXmlPatterns’: No such file or directory
tar: Frameworks/QtXmlPatterns.framework/Resources: Cannot create symlink to ‘Versions/Current/Resources’: No such file or directory
tar: Exiting with failure status due to previous errors
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] install: `tar -zxf library.node && rm -fr library.node`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Matthew\AppData\Roaming\npm-cache\_logs\2017-10-02T03_43_05_587Z-debug.log
It crashes when accessing properties defined in QML of Instance which is created with customized type.
N-API is available in Node.js v8.0 as experimental feature for native module. It provides a way to make native module be built once and run on all of versions of Node.js. That's great for Brig and it should be supported.
Event should be fired if property type was changed, but it doesn't work when changing property value of customized type in Node.js.
This problem occurs because not implement signal emitting after setting property in Node.js
On raspberry pi 3
make: Entering directory '/home/pi/xxx/node_modules/brig/build'
CXX(target) Release/obj.target/brig/build/src/moc_eventdispatcher.o
CXX(target) Release/obj.target/brig/build/src/brig.o
In file include from ../src/brig.h:32:0,
from ../src/brig.cpp:2:
../src/DynamicQMetaObjectBuilder.h:6:43: fatal error: internal/qmetaobjectbuilder_p.h: No such file or directory
#include <internal/qmetaobjectbuilder_p.h>
compilation terminalted.
First I homebrew uninstalled QT and checked the symlinks were gone from /use/local/bin/
Then, for npm install brig
:
$ npm install brig
...
> [email protected] install /path/to/brig-example-app/node_modules/qt-darwin
> tar -zxf library.node && rm -fr library.node
> [email protected] install /path/to/brig-example-app/node_modules/brig
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://github.com/cfsghost/brig/releases/download/0.1.17/node-v59-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp)
tools/mac-config.sh: line 45: qmake: command not found
gyp: Call to 'tools/mac-config.sh --internal' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
So whatever it was doing with qt-darwin, didn't put qmake in the path :(
1st case:
Install/build with system Qt
ENV:
bluet@Titania:~/local/V-PlaySDK$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
bluet@Titania:~/local/V-PlaySDK$ qmake -v
QMake version 3.0
Using Qt version 5.5.1 in /usr/lib/x86_64-linux-gnu
bluet@Titania:~/local/V-PlaySDK$ sudo apt install qt5-default qtquick1-5-dev qtquick1-5-dev-tools qtcreator qt5-qmake qtdeclarative5-dev qtquick1-5-dev qml-module-qtquick-controls qtmultimedia5-dev qtbase5-private-dev qml-module-qtquick-controls
bluet@Titania:~/workspace/brig-example-app$ npm install brig
Log:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.