Subversion Repositories tpanel

Rev

Rev 353 | Rev 358 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 353 Rev 357
Line 1... Line 1...
1
# TPanel
1
# TPanel
2
**TPanel** is an emulation of some AMX G4 touch panels. The panels used to verify the communication protocol and the behavior were an *AMX MVP-5200i* an *AMX NXD-700Vi* and an *MST-701*.
2
**TPanel** is an emulation of some AMX G4 touch panels. The panels used to verify the communication protocol and the behavior were an *AMX MVP-5200i* an *AMX NXD-700Vi* and an *MST-701*.
3
 
3
 
4
**TPanel** was designed for *NIX desktops (Linux, BSD, …) as well as Android and IOS operating systems. Currently there exists no Windows version and there probably never will.
4
**TPanel** was designed for *NIX desktops (Linux, BSD, …) as well as Android and IOS operating systems. To create an executable for Android a special shell script exists. It sets all dependencies and starts _cmake_ with all necessary parameters.
-
 
5
 
-
 
6
> **Hint**: With version 1.4 of **TPanel** the support for Qt 5.x was canceled. Now you must use Qt 6.x for all operating systems!
5
 
7
 
6
The software uses internally the [Skia](https://skia.org) library for drawing all objects and the [Qt](https://doc.qt.io/) framework to display the objects and handle widgets. **TPanel** is written in C++. This makes it especially on mobile platforms fast and reliable. It has the advantage to not drain the battery of any mobile device while running as fast as possible. Compared to commercial products the battery lasts up to 10 times longer.
8
The software uses internally the [Skia](https://skia.org) library for drawing all objects and the [Qt](https://doc.qt.io/) framework to display the objects and handle widgets. **TPanel** is written in C++. This makes it especially on mobile platforms fast and reliable. It has the advantage to not drain the battery of any mobile device while running as fast as possible. Compared to commercial products the battery lasts up to 10 times longer.
7
 
9
 
8
# Full documentation
10
# Full documentation
9
Look at the full documentation in this repository. You'll find the [reference manual](https://github.com/TheLord45/tpanel/tree/main/documentation) in three different formats:
11
Look at the full documentation in this repository. You'll find the [reference manual](https://github.com/TheLord45/tpanel/tree/main/documentation) in three different formats:
10
* [PDF](https://github.com/TheLord45/tpanel/blob/main/documentation/ReferenceGuide.pdf)
12
* [PDF](https://github.com/TheLord45/tpanel/blob/main/documentation/ReferenceGuide.pdf)
11
* [ODT](https://github.com/TheLord45/tpanel/blob/main/documentation/ReferenceGuide.odt)
13
* [ODT](https://github.com/TheLord45/tpanel/blob/main/documentation/ReferenceGuide.odt)
12
* [HTML](https://github.com/TheLord45/tpanel/blob/main/documentation/ReferenceGuide.html)
14
* [HTML](https://github.com/TheLord45/tpanel/blob/main/documentation/ReferenceGuide.html)
13
 
15
 
14
# How to compile
16
# How to compile
-
 
17
## Prerequisits
-
 
18
For Linux and MacOS you need the following libraries installed:
-
 
19
 
-
 
20
- [Qt 6](https://doc.qt.io/qt-6/)
-
 
21
- [Skia](https://skia.org)
-
 
22
- [pjsip](https://www.pjsip.org)
-
 
23
- openssl (part of your distribution)
-
 
24
- Expat (part of your distribution)
-
 
25
- Freetype (part of your distribution)
-
 
26
 
-
 
27
To install Qt I recomend to download the open source version from [Open Source Development](https://www.qt.io/download-open-source). However: Some Linux distributions are coming with Qt included. If you want to use this version make sure, to install the Qt6 packages.
-
 
28
 
15
## Compile for Linux desktop
29
## Compile for Linux desktop
16
First download the source into a directory. Then enter the directory and type the following commands.
30
First [download the source](https://github.com/TheLord45/tpanel) into a directory. Then enter the directory and type the following commands.
17
 
31
 
18
    $ mkdir build
32
    $ mkdir build
-
 
33
    $ cmake -B build -DCMAKE_PREFIX_PATH="/<path>/<to>/Qt/6.5.2/gcc_64/lib/cmake"
19
    $ cd build
34
    $ cd build
20
    $ cmake ..
-
 
21
    $ make
35
    $ make
22
    $ sudo make install
36
    $ sudo make install
23
 
37
 
24
To be able to compile the source you need the following credentials installed. Make sure you've installed the developper files of them.
-
 
25
- Skia
-
 
26
  - Download and compile the source from [Skia](https://skia.org)
-
 
27
- Qt 5.15 or Qt 6.x.x
-
 
28
- pjsip
-
 
29
  - Download and compile the source from [pjsip](https://www.pjsip.org)
38
> Replace `<path>/<to>/` with the path to your Qt installation (usualy `/opt/Qt`).
30
- Expat
-
 
31
- Freetype
-
 
32
 
-
 
33
Apart from the fact that Skia and maybe pjsip is not part of your Linux distribution, the other dependencies are (for most distributions). But for Android and IOS you must cross compile them. Look at the home pages of this projects to find out how.
-
 
34
 
39
 
35
If everything compiled successfull and installed, you can start the application. There is a setup dialog included. It depends on the operating system of how this setup looks like.
40
If everything compiled successfull and installed, you can start the application. There is a setup dialog included. It depends on the operating system of how this setup looks like.
36
 
41
 
37
## Compile for Android
-
 
38
For Android we need the [Android SDK](https://developer.android.com/). In case you've not intstalled it, do it now. Additionaly you need the following libraries compiled for Android:
-
 
39
 
-
 
40
- [Skia](https://skia.org)
-
 
41
- [Qt 5.15](https://doc.qt.io/qt-5/)
-
 
42
- openssl (is part of NDK)
-
 
43
- [pjsip](https://www.pjsip.org)
-
 
44
 
-
 
45
As you can see, you must still use the older Qt 5.15 version because the newer Qt 6.x versions doesn't support multi architecture builds. But I'm working on a solution for this.
-
 
46
 
-
 
47
You can download a ready package with all the necessary libraries and header files from my [server](https://www.theosys.at/download/android_dist.tar.bz2) (~ 1Gb!). After you've downloaded this hugh file, unpack it into any directory. The file details are:
42
## Compile for other operating systems
48
 
-
 
49
- [`android_dist.tar.bz2`](https://www.theosys.at/download/android_dist.tar.bz2)
-
 
50
- SHA256: `eb7f474aec318bec4af6052ac23232296fa9a9c43f0bf2640f771781d6afb1fc`
-
 
51
 
-
 
52
The package does not include the Qt framework. You can download it from [Qt page](https://www.qt.io/download). There exists a maintenance tool which lets you choose what to install. Select at least Qt5.15.2 and Android.
-
 
53
 
-
 
54
I developped **TPanel** with [QTCreator](https://www.qt.io/product/development-tools). Therefor I would recoment to use this tool to compile **TPanel**. However. There exists a command line tool called `build_android.sh`. This is a shell script. Open it with the editor of your choice and set the paths according to your installation. Then simply start the script. It compiles the code and produces an Android APK file. Copy this file to your Android device and use it to install the app.
-
 
55
 
-
 
56
All the following descriptions are for the tool **QTCreator**. The easiest way to install it is by using the [Qt maintenance tool](https://www.qt.io/download).
-
 
57
 
-
 
58
Start `QTCreator` and load the project file `tpanel.pro`. You must set some things to have the correct paths. Go to the build settings of the project. Define the path where you like the binary for Android, the APK-file, to be. Expand the **Build steps** and enter into the line **Additional arguments** the following definitions:
-
 
59
 
-
 
60
- `SDK_PATH=</path/to/your/android/sdk>`
-
 
61
- `EXT_LIB_PATH=</path/to/the/distribution>` (The self compiled libraries or the distribution downloaded from my [server](https://www.theosys.at/download/android_dist.tar.bz2) )
-
 
62
- `EXTRA_PATH=</path/to/android/sdk/extras>`
-
 
63
 
-
 
64
To make clear what this means I give you an example. We assume that the Android SDK was installed into the directory `/usr/share/android-sdk-linux`. The distribution from my server (the file containing all necessary binaries for Android) was unpacked into `/home/user/distribution`. Then the line **Additional arguments** must look like:
-
 
65
 
-
 
66
    SDK_PATH=/usr/share/android-sdk-linux EXT_LIB_PATH=/home/user/distribution EXTRA_PATH=/usr/share/android-sdk-linux/extras
-
 
67
 
-
 
68
For **Build environment** check **Clear system environment**. Then click on **Details** to expand this section. With the example above in mind make sure that the following elements are there.
-
 
69
 
-
 
70
    ANDROID_HOME           /usr/share/android-sdk-linux
-
 
71
    ANDROID_NDK_HOST       linux-x86_64
-
 
72
    ANDROID_NDK_PLATTFORM  android-31
-
 
73
    ANDROID_NDK_ROOT       /usr/share/android-sdk-linux/ndk/23.1.7779620
-
 
74
    ANDROID_SDK_ROOT       /usr/share/android-sdk-linux
-
 
75
    JAVA_HOME              /usr/lib/jvm/java-11-openjdk-amd64
-
 
76
    PATH                   /usr/lib/jvm/java-11-openjdk-amd64/bin:/home/user/distribution/qt/bin:/usr/share/android-sdk-linux/ndk/23.1.7779620/toolchains/llvm/prebuilt/linux-x86_64/bin:/bin:/usr/bin
-
 
77
    QTDIR                  /home/user/distribution/qt
-
 
78
 
-
 
79
Your Java distribution may be in a different location. Set the variable `JAVA_HOME` to the location on your system. Don't forget to set this path also for the variable `PATH`.
-
 
80
 
-
 
81
It is possible that you want to use another ndk version then *23.1.7779620*. If you want to use a newer version make sure your Qt version supports it.
-
 
82
 
-
 
83
I wrote the Java part for Android to work with Android 12. I use some API function available with Android 12 and above for getting the battery state and the network state. This is the reason why I set `ANDROID_NDK_PLATTFORM` to `android-31`. It is up to you to use a newer API.
-
 
84
 
-
 
85
With this parameters set you should be able to start the compiler. When everything finished you should find the Android binary in the **Build directory** at `android-build/build/outputs/apk/debug`.
-
 
86
 
-
 
87
## Compile for IOS
-
 
88
For IOS you need a Mac with *XCode* installed. You need also a developer accound and a signature of a developer team if you want to compile the code for a real iPhone or iPad. For details look at [Apple developer](https://developer.apple.com/tutorials/app-dev-training).
-
 
89
 
-
 
90
Unfortunately I currently have no ready package with the libraries `Skia` and `pjsip` for IOS. This means that you must compile them first on your own. Once this is done, the steps are very similar to Android. The following description assumes you're using *QtCreator*.
-
 
91
 
-
 
92
In the settings for the project look for the section **Build steps** and the line **Additional arguments**. Enter in this line the following definitions:
-
 
93
- `OS=iossim` (for building it for the IOS simulator)
-
 
94
- `OS=ios` (for building it for an iPhone or an iPad)
-
 
95
- `EXT_LIB_PATH=</path/to/sdk>`
-
 
96
Replace `<path/to/sdk>` with the path to the previously compiled libraries *Skia* and *pjsip*.
-
 
97
 
-
 
98
At the line **ABIs** check both architectures (`x86-darwin-generic-mach_o-64bit` and `arm-darwin-generic-mach_o-64bit`).
-
 
99
 
-
 
100
In case you're building for a real iPhone or iPad you must select in the section **iOS settings** the **development team**.
-
 
101
 
-
 
102
In the section **Build environment** check **Clear system environment**. Then append to line **PATH**: `:/usr/bin`
-
 
103
 
43
 
104
That's it. Hit on compile (the hammer symbol) and start.
-
 
105
 
44
- [Compile for Android](https://github.com/TheLord45/tpanel/documentation/build_android.md)
-
 
45
- [Compile for iOS](https://github.com/TheLord45/tpanel/documentation/build_ios.md)
-
 
46