meltingshowman / qmlc Goto Github PK
View Code? Open in Web Editor NEWThis project forked from qmlc/qmlc
Qml Compiler
License: Other
This project forked from qmlc/qmlc
Qml Compiler
License: Other
Qml Compiler ------------ The Qml Compiler can be used to convert Qml source code files into precompiled Qml files. The precompiled Qml files are faster to load and do not expose the source code. Normally, the Qt either compiles the Qml files in the startup or interprets the Qml files runtime. The Qml uses the JIT compiler shipped with Qt to create precompiled files. It works thus in same way, as Qt when it is using JIT. Only that the JIT compilation step is performed already when the program launches. The loader is used to load precompiled files and link them into the Qml Engine. The compiler is created by creating a new version of the Qml compilation framework, that is builtin in the Qt. The class QQmlTypeCompiler, that is the core class handling the compilation, is taken as a base for the compiler. Some of its dependencies are exported on the Qt, some of the dependencies are rewritten, due to need for modifications. The compiler, loader and examples are all based on Qt source code. They are licensed under LGPL 2.1 (with Digia Qt LGPL exception 1.1) or BSD license. See source code files for license. Collectively this component can be used under terms of LGPL 2.1 with Digia Qt LGPL exception 1.1. See LICENSE.LGPL and LGPL_EXCEPTION.txt for details. Known limitations ----------------- There are few limitations with the compiler. The compiler requires a modified version of the Qt. The modifications are available in the qtdeclarative repository. Other than that, the target is to remove these limitations. There might be also a way to no require modified Qt. The reason for the other limitations is the lack of implementation. - It is not possible to mix precompiled and source Qml files - It is not possible to load Qml from network - Few structures are still unsupported, for example composite singleton - The test cases are still not very comphrehensive List of current issues can be found at: https://github.com/qmlc/qmlc/issues Using Qml Compiler ------------------ The Qml compiler can be used from command line: This command will read the Qml file and produce a precompiled qml file. The produced file is named file.qmc. qmc file.qml The Qml program needs slight modifications. After creating the QQuickView, the precompiled components need to be loaded: QQmlEngine *engine = view.engine(); QQmlEnginePrivate::get(engine)->v4engine()->iselFactory.reset(new QV4::JIT::ISelFactory); QmcLoader loader(engine); QQmlComponent *component = loader.loadComponent(":/file.qmc"); QObject *rootObject = component->create(); view.setContent(component->url(), component, rootObject); There is an example in the examples/objectlistmodel how to use the compiler. How to run modified Qt in your development machine: --------------------------------------------------- 1. Install Qt 5.3.1 with source code from here: http://qt-project.org/downloads Rest of the instructions assume that you installed it in /home/user/Qt5.3.1 If installed elsewhere, replace this path 2. Replace qtdeclarative module with modified cd /home/user/Qt5.3.1/5.3/Src/ mv qtdeclarative qtdeclarative-bak git clone https://github.com/qmlc/qtdeclarative.git qtdeclarative cd qtdeclarative git checkout qmlc-5.3.1 3. Configure development build cd /home/user/Qt5.3.1/5.3/Src ./configure -developer-build -debug make make install 4. Configure Qt Kit in the Qt creator /home/user/Qt5.3.1/5.3/Src as directory
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.