pelagicore / facelift Goto Github PK
View Code? Open in Web Editor NEWA framework for flexible interfacing between C++ and QML/JS.
License: MIT License
A framework for flexible interfacing between C++ and QML/JS.
License: MIT License
To be decided if Windows support is still required. The Windows build is broken for a long time now and none is complaining about it.
I want to create a conan recipe for facelift and therefore I need a version number in order to say, this recipe is for version x.y.z ? Something like this: facelift/1.0.0@conan/stable
You cannot use the git hash for that. It is not human readable anyway and I cannot compare it with a bigger and smaller version.
Unfortunately it seems to be that facelift doesn't have a version number. Which is kinda strange.
I propose to add a git tag from now and also that the version number is added as variable in cmake and from this automatically a header file created. So I can compare versions at compile time too.
I can make a PR for this. But I want to ask before doing this. I guess I am not the only one who needs this "feature".
I got following warning messages during compilation with MSVC:
MediaPlayerInterface_unity_1.cpp
facelift_generated\mediaplayerinterface\module\mediaplayer\module.cpp(34): warning C4273: 'mediaplayer::Module::Module': inconsistent dll linkage
facelift_generated\mediaplayerinterface\module\mediaplayer\module.h(30): note: see previous definition of '{ctor}'
facelift_generated\mediaplayerinterface\module\mediaplayer\module.cpp(40): warning C4273: 'mediaplayer::Module::registerTypes': inconsistent dll linkage
facelift_generated\mediaplayerinterface\module\mediaplayer\module.h(47): note: see previous definition of 'registerTypes'
facelift_generated\mediaplayerinterface\module\mediaplayer\module.cpp(58): warning C4273: 'mediaplayer::Module::registerUncreatableQmlTypes': inconsistent dll linkage
facelift_generated\mediaplayerinterface\module\mediaplayer\module.h(41): note: see previous definition of 'registerUncreatableQmlTypes'
facelift_generated\mediaplayerinterface\module\mediaplayer\module.cpp(69): warning C4273: 'mediaplayer::Module::registerQmlTypes': inconsistent dll linkage
facelift_generated\mediaplayerinterface\module\mediaplayer\module.h(35): note: see previous definition of 'registerQmlTypes'
The reason for this bug is following wrong code generated in Module.h
:
#if defined(MediaPlayerInterface_types_LIBRARY)
# define MediaPlayerInterface_types_EXPORT Q_DECL_EXPORT
#else
# define MediaPlayerInterface_types_EXPORT Q_DECL_IMPORT
#endif
#include "ModuleBase.h"
#include "mediaplayer/MediaIndexerModelQMLFrontend.h"
namespace mediaplayer {
/**
* \brief mediaplayer module singleton object
* \ingroup mediaplayer
* \inqmlmodule mediaplayer
* This singleton can be used to create instances of the types defined in the mediaplayer module/package.
*/
class MediaPlayerInterface_types_EXPORT Module : public facelift::ModuleBase
{
public:
Module();
MediaPlayerInterface_types_LIBRARY
is not defined when compiling the Module.cpp
However, Module.cpp
contains the whole implementation, however, because of the missing define it will try to use the Q_DECL_IMPORT
, which is obviously wrong. So MediaPlayerInterface_types_LIBRARY
must be defined or, it seems to me that this define is in the wrong moduleanyway. Because there is a library called MediaPlayerInterface_types
, which is something totally different.
src/model/FaceliftModel.h:349:18: error: ‘function’ in namespace ‘std’ does not name a template type
Requires #include in the header
As the current objectRegistery allows registering and un-registering arbitrary objectPaths on different service names, without verifying the origin of the caller, DoS attacks are possible as well as re-routing calls meant for other services to a different service.
interface ObjectRegistry {
bool registerObject(string objectPath, string serviceName);
bool unregisterObject(string objectPath, string serviceName);
map getObjects();
signal objectAdded(string objectPath, string serviceName, int version);
signal objectRemoved(string objectPath, int version);
}
Observation :
Mac fails to compile because of failure to import jinja2 in file generator.py
//Error : #from jinja2.debug import make_traceback as _make_traceback
Preconditions:
Jinja2 was also installed along with necessary dependencies.
Solution:
Remove the line 26 from generator.py where import of jinja2.debug is used.
Seems jinja is reduntant ..
This build should reveal issues (such as missing #include), which remain unnoticed because of unity-build being used by default.
This test should reveal issues such as headers not being installed.
Is it possible to compile the framework with VS 2017?
I was able to manage to generate the solution with this change
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra")
endif()
However, I get compile errors likes these:
3>LINK : fatal error LNK1104: cannot open file '..\common\Debug\FaceliftCommonLib.lib'
because the Module FaceliftCommonLib
does not export anything. So no lib at all is created.
How can I (or your) fix this?
Please add support for CI, otherwise the build might be broken in the future again.
I could give support you with travis and appveyor. But you need to setup the initial connection up first (the yaml files).
The project directory structure described in the README.md file does not match the current directory structure of the git repository.
Also, the copyright year needs to be updated.
It is not convenient for contributors who are not admins in Pelagicore account.
diff --git a/.gitmodules b/.gitmodules
index 426137d..0078220 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,3 @@
[submodule "qface"]
path = codegen/facelift/qface
- url = ../qface.git
+ url = https://github.com/Pelagicore/qface.git
Move the code of the lambda at
facelift/src/ipc/ipc-common/IPCProxy.h
Line 63 in 1e5eb92
Would it be possible to introduce on interface /structure level support for QObject derived classes?
It looks like code generation from different interface files happens independently and is trivially parallelazable on a pool of multiple processes. For projects with big number of interface files/modules it may be worth to use more than one thread for code generation.
Command:
/home/osboxes/Desktop/qml-workspace/facelift/codegen/facelift/facelift-codegen.py
--input
/home/osboxes/Desktop/qml-workspace/facelift/src/ipc/dbus/interfaces
--output
/home/osboxes/Desktop/qml-workspace/facelift/build/src/ipc/dbus/facelift_generated_tmp
with
PYTHONPATH=/home/osboxes/Desktop/qml-workspace/facelift/codegen/facelift/qface
Return code: No such file or directory
Output:
Error:
Call Stack (most recent call first):
src/ipc/dbus/CMakeLists.txt:12 (facelift_generate_code)
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.