Subversion Repositories tpanel

Rev

Rev 376 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
357 andreas 1
# Build for IOS
2
 
376 andreas 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.
357 andreas 4
 
376 andreas 5
On a Mac with Apple silicon, set _arm64_ as the base architecture (x86_64 is default).
6
 
357 andreas 7
## Prerequisits
8
 
359 andreas 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).
357 andreas 10
 
376 andreas 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.
357 andreas 12
 
13
- Skia
14
- PjSIP
15
- pcre
16
- openssl (version 1.1 for Qt prior to 6.5.0 and version 3 for newer Qt)
17
 
18
You can (cross) compile them yourself or download the [SDK](https://www.theosys.at/download/SDKs.tar.bz2) (~3.5Gb!) from my machine. I recommend you to download the SDK. This saves you a lot of time. The following description assumes you've installed the _SDK_ in the following directory structure:
19
```
20
SDKs
21
 +-openssl
22
 | +-include
23
 | +-IOS
24
 | +-IOSsim
25
 | +-lib
26
 +-pcre
27
 | +-include
28
 | +-lib
29
 +-pjsip
30
 | +-include
31
 | +-lib
32
 +-skia
33
   +-IOS32
34
   +-IOS64
35
   +-IOSsim
36
   +-IOSsim-apple
37
   +-IOSsim-intel
38
```
39
 
40
**File: SDKs.tar.bz2**
41
 
42
- Download: [SDKs.tar.bz2](https://www.theosys.at/download/SDKs.tar.bz2)
43
- SHA256 hash: `333a0bad139705c2b48c6e8ce37da959e9ce8e3284638f83d605464505463f98`
44
 
359 andreas 45
## Build with QtCreator
357 andreas 46
 
376 andreas 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`).
357 andreas 48
 
376 andreas 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.
357 andreas 50
 
376 andreas 51
Now you should be able to compile **TPanel** for IOS.
357 andreas 52
 
376 andreas 53
## Using the script `build_ios.sh`
357 andreas 54
 
376 andreas 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
```
57
build_ios.sh [clean] [debug] [sign] [id <ID>] [help|--help|-h]
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
```
357 andreas 63
 
376 andreas 64
For example, start the script as follows:
65
 
66
`./build_ios.sh clean sign`
67
 
381 andreas 68
to build **TPanel** for an iPhone or iPad. If you've problems and get errors, open the script with an editor and adapt the paths and settings according to your needs.