• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..17-Jan-2021-

src/H17-Jan-2021-13,3665,120

test/H17-Jan-2021-1710

.gitignoreH A D17-Jan-20217 21

README.mdH A D17-Jan-20216.9 KiB158126

RakefileH A D17-Jan-20211.1 KiB3527

qml_czmq_bindings.proH A D17-Jan-20214.2 KiB149131

README.md

1```
2################################################################################
3#  THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY  #
4#  Read the zproject/README.md for information about making permanent changes. #
5################################################################################
6```
7# qml_czmq
8
9QML bindings for creating UI applications using the "czmq" C library.
10
11## Setting up a Build Environment
12
13The following is intended to be a complete guide to setting up a build
14environment that can build for Android (as well as your desktop, although
15that part is considerably easier). To that end, if you encounter parts
16where steps are missing or unclear, please file an issue or pull request
17about it so that others might learn from your research.
18
19Eventually, we'd like to remove some of these steps where possible to make
20this process simpler. If you have ideas about removing or simplifying steps,
21please file an issue or pull request so that others might be saved some complexity.
22
23### C Library Dependencies
24
25If you are building for Android, you can skip this step, as the necessary
26dependencies are automatically pulled down and built by the `vendor/build`
27scripts. If you are developing and testing on your desktop, you will need
28a local installation of the czmq library to link against and include.
29
30### Ruby
31
32You will need an installation of
33[Ruby 1.9 or greater](https://www.ruby-lang.org/en/downloads/)
34to run some of the build scripts. In the future, this requirement may be
35eliminated and replaced by "pure" shell scripts with no Ruby dependency.
36
37On Linux, you can get Ruby from your package manager. On OSX, use
38[brew](http://brew.sh/). If you are already a Ruby developer and have an
39existing system to manage your Rubies, use what you are comfortable with.
40
41Once Ruby is installed, you will need the
42[qt-commander](https://github.com/jemc/qt-commander) gem, a utility package
43for parsing the Qt Creator IDE configuration files to pull out key information
44for building projects and project dependencies from the command line without
45the IDE. You will also need the [rake](https://github.com/jimweirich/rake)
46gem, a task automation package with usage similiar to the `make` command.
47You can install both using the `gem` command:
48```
49gem install rake
50gem install qt-commander
51```
52
53### Qt 5
54
55You will need [Qt 5](http://www.qt.io/download-open-source/) and a
56fully-functioning environment for Qt that can build and deploy to Android.
57
58Qt features [a guide for Android](http://qt-project.org/doc/qt-5/android-support.html)
59but here are a few tips to get you started:
60
61* You will need the Android [SDK](https://developer.android.com/sdk/index.html)
62and [NDK](https://developer.android.com/tools/sdk/ndk/index.html).
63Install them to any path you like, but you will eventually need to point
64the Qt Creator IDE to them.
65* You will need Java 7 - JRE and JDK, and 'ant'. You can usually get
66these through your package manager.
67* You don't need the Eclipse IDE or bundle - all work is done from the
68command line or through the Qt Creator IDE.
69
70At the end of this setup, you should be able to use the Qt Creator IDE to
71build and deploy an out-of-the-box simple 'Hello World' app for QML.
72
73To ready your device for deployment:
74
75* Be sure your Android device has
76[developer options enabled](http://developer.android.com/tools/device.html#developer-device-options).
77* Run the adb server with a privileged user (`sudo adb start-server`).
78If you previously tried to run adb with an unprivileged user, you'll need
79to stop the old adb server first (`sudo adb kill-server`). You will need
80the `adb` binary from the Android development kit in your `$PATH`.
81* Connect your device via USB and set it to "USB Debugging Mode".
82* Run `adb devices` to make sure your device is detected and ready.
83
84To create the temporary project:
85
86* Click `File`->`New File or Project...`
87* Choose `Applications`/`Qt Quick Application`
88* Enter a name and location for the temporary project
89* Choose the latest "Qt Quick Component Set"
90* Select the relevant kits you want to be able to deploy with (this should
91include the Android kit(s) that you set up earlier)
92* Choose a version control system to use (if you like)
93* Finish the creation wizard
94
95Once you have a project to deploy:
96
97* In the lower-left corner of the IDE (above the build icons),
98select from the drop-down menu the Android kit that matches the
99architectureof your connected device.
100* Click the "Run" button (just below the kit menu) to deploy.
101* Watch the bottom output pane of the IDE; it will show output from
102the build and packaging process, transfer the file, then show in a
103different tab output from the program execution as it runs on your device.
104
105## Build tasks
106
107### Install Locally and Run Tests
108```
109rake test
110```
111
112Use this command when developing and testing the library. A copy of the
113czmq library is installed locally where Qt can find it for
114running desktop applications that use the library, and tests are run.
115
116You will need to have the czmq C library built and installed
117on your machine.
118
119### Install Locally for Android
120```
121rake android
122```
123
124Use this command to install a copy of the library locally where Qt can find
125it later for bundling into an application you are deploying to Android.
126The build will repeat for each android kit you have configured in the Qt
127Creator IDE so that the installed library is available for all kits.
128
129In order to build for android, the qml_czmq needs access to
130an Android build of the czmq library and all its dependencies.
131This can be done one of two ways:
132
1331. Clone the czmq library and all its dependencies from source
134into the same folder. If all project repos are side-by-side in the same
135"workspace" folder (as is typical for many users' workflows), they can
136detect eachother automatically and build in a chain when you run
137`rake android` in the qml_czmq folder.
1382. Manually export the `CZMQ_ROOT` environment variable as the path
139to the CZMQ source code root. Do the same for any other projects
140that you are prompted for when you run `rake android`. When all environment
141variables are resolved, they will build in a chain.
142
143For all of the zeromq libraries in the dependencies, the source code will
144be copied to a temporary directory for building, but installed to the
145`$(XXX_ROOT)/builds/android/prefix/$(TOOLCHAIN_NAME)` directory within
146the original source tree. If you need to run builds for individual projects,
147use the `$(XXX_ROOT)/builds/android/prefix/build.sh` command. The build
148script will skip itself if it was already installed to
149`$(XXX_ROOT)/builds/android/prefix/$(TOOLCHAIN_NAME)`, so at times you
150may need to delete that directory to trigger a clean build.
151
152```
153################################################################################
154#  THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY  #
155#  Read the zproject/README.md for information about making permanent changes. #
156################################################################################
157```
158