Line 1... |
Line 1... |
1 |
# Build for IOS
|
1 |
# Build for IOS
|
2 |
|
2 |
|
3 |
**TPanel** can be build also for IOS (iPad, iPhone). There exists a file called `tpanel.pro`. This file contains the instructions for the `qmake` tool. It is meant to be used out of _QtCreator_. Start the _QtCreator_ and open this file as a project.
|
3 |
**TPanel** can be build also for IOS (iPad, iPhone). The _cmake_ configuration contains the necessary options. The easiest way to do this is to use _QtCreator_. Start the _QtCreator_ and open the _cmake_ file `CMakeLists.txt` as a project.
|
- |
|
4 |
|
- |
|
5 |
On a Mac with Apple silicon, set _arm64_ as the base architecture (x86_64 is default).
|
4 |
|
6 |
|
5 |
## Prerequisits
|
7 |
## Prerequisits
|
6 |
|
8 |
|
7 |
For IOS you need a Mac with *XCode* installed. You need also a developer account 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).
|
9 |
For IOS you need a Mac with *XCode* installed. You need also a developer account 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).
|
8 |
|
10 |
|
9 |
To be able to build **TPanel** for IOS you need the following libraries compiled for IOS and MacOS. For MacOS you may need them for the architectures ARM as well as Intel. For IOS you may need versions for 64 bit and 32 bit. It depends on what devices you have.
|
11 |
To be able to build **TPanel** for IOS you need the following libraries compiled for IOS and MacOS. For MacOS you may need them for the architectures ARM as well as Intel. For IOS you may need versions for 64 bit and 32 bit (from iOS version 17.0 on the 32Bit is no longer supported). It depends on what devices you have.
|
10 |
|
12 |
|
11 |
- Skia
|
13 |
- Skia
|
12 |
- PjSIP
|
14 |
- PjSIP
|
13 |
- pcre
|
15 |
- pcre
|
14 |
- openssl (version 1.1 for Qt prior to 6.5.0 and version 3 for newer Qt)
|
16 |
- openssl (version 1.1 for Qt prior to 6.5.0 and version 3 for newer Qt)
|
Line 40... |
Line 42... |
40 |
- Download: [SDKs.tar.bz2](https://www.theosys.at/download/SDKs.tar.bz2)
|
42 |
- Download: [SDKs.tar.bz2](https://www.theosys.at/download/SDKs.tar.bz2)
|
41 |
- SHA256 hash: `333a0bad139705c2b48c6e8ce37da959e9ce8e3284638f83d605464505463f98`
|
43 |
- SHA256 hash: `333a0bad139705c2b48c6e8ce37da959e9ce8e3284638f83d605464505463f98`
|
42 |
|
44 |
|
43 |
## Build with QtCreator
|
45 |
## Build with QtCreator
|
44 |
|
46 |
|
45 |
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. Expand the **Build steps** and enter into the line **Additional arguments** the following definitions:
|
47 |
Start `QtCreator` and load the project file `CMakeLists.txt`. If you're on a Mac with Apple silicon (arm64 M1, M2 or newer) then you must set `CMAKE_OSX_ARCHITECTURES` to `arm64` (default: `x86_64`).
|
46 |
|
48 |
|
47 |
- `OS=[IOS|IOSsim|macos]`
|
- |
|
48 |
- `EXT_LIB_PATH=<path/to/precompiled/files>`
|
49 |
In case you have unzipped the file `SDKs.tar.bz2` in another directory then the _HOME_-directory, you must specify the path. Add the variable `EXT_LIB_PATH` to the _Current configurations_ of _cmake_. Set it to the path where you've unzipped it.
|
49 |
|
50 |
|
50 |
To make clear what this means I give you an example. We assume that the precompiled libraries (Skia, PjSIP) are installed in your home directory (`/Users/<user>/SDKs`). We want to create an executable for the IOS simulator. Then we must set the _Additional arguments_ to:
|
51 |
Now you should be able to compile **TPanel** for IOS.
|
51 |
|
52 |
|
52 |
`OS=IOS EXT_LIB_PATH=/Users/<user>/SDKs`
|
53 |
## Using the script `build_ios.sh`
|
53 |
|
54 |
|
54 |
Now check the _ABIs_ you want to compile for (only IOS). With this settings you should be able to compile **TPanel** for IOS.
|
55 |
The repository comes with a shell script called `build_ios.sh`. With it you can compile **TPanel** on the command line. The script offers some parameters:
|
- |
|
56 |
```
|
55 |
In case you're building for a real iPhone or iPad you must select in the section **iOS settings** the **development team**.
|
57 |
build_ios.sh [clean] [debug] [sign] [id <ID>] [help|--help|-h]
|
56 |
In the section **Build environment** check **Clear system environment**. Then append to line **PATH**: `:/usr/bin`
|
58 |
clean Delete old build, if there is one, and start a new clean build.
|
- |
|
59 |
debug Create a binary with debugging enabled.
|
- |
|
60 |
sign Sign the resulting app.
|
- |
|
61 |
id <ID> The signing identity (team ID)
|
- |
|
62 |
```
|
57 |
|
63 |
|
58 |
Now you should be able to compile **TPanel** for IOS.
|
64 |
For example, start the script as follows:
|
- |
|
65 |
|
- |
|
66 |
`./build_ios.sh clean sign`
|
- |
|
67 |
|
- |
|
68 |
to build **TPanel** for an iPhone of iPad. If you've problems and get errors, open the script with an editor and adapt the paths and settings according to your needs.
|