... | ... | @@ -57,6 +57,50 @@ Currently we use: |
|
|
|
|
|
You need Xcode with Command Line Tools in order to compile and build the package. Xcode usually supports two adjacent SDKs (e.g. 10.9 and 10.10). You need to obtain an older Xcode package to achieve older SDKs. Store the SDKs into the directory `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs`.
|
|
|
|
|
|
#### Datovka-4.10.2 and Newer
|
|
|
|
|
|
A working Qt5 installation is required (minimal version is 5.2.1). In order to be able to use the building scripts you are required to provide Qt in those paths `Qt-${QT_VER}-macx-clang-[32|64]-macosx${SDK_VER}-[shared|static]` where:
|
|
|
|
|
|
* `${QT_VER}` - version of the Qt framework (e.g. `5.7.1`, `5.9.4`, `5.10.1`, ...)
|
|
|
* `[32|64]` - target architecture bits (`32` or `64`)
|
|
|
* `${SDK_VER}` - SDK version (e.g. `10.12`, `10.13`, ...)
|
|
|
* `[shared|static]` - specifies whether Qt is compiled as static libraries (i.e. `static`) or as a framework (i.e. `shared`)
|
|
|
|
|
|
The build system does not support building of fat binaries containing both (32- and 64-bit binaries). Apple is anyway slowly pushing the users and developers towards 64 bits.
|
|
|
|
|
|
Libraries needed by the application can be linked statically or dynamically - depending on the used Qt. If you are linking with statically build Qt then you must use static libraries. If you are using Qt built as a framework then you must use shared libraries. (This is not a restriction of the used tools. Its just a requirement that makes the scripts easier to maintain.) In future we want to bundle the application only with shared libraries.
|
|
|
|
|
|
In order to build all required libraries (excluding Qt5) you need to run the following command:
|
|
|
``` shell
|
|
|
cd libs
|
|
|
../scripts/build_libisds_osx.sh ${SDK_VER}
|
|
|
```
|
|
|
This will compile libisds (as a static and shared library) and its other dependencies and store them in a directory where it can be read by the script which compiles and builds the package.
|
|
|
|
|
|
When you have all libraries (Qt5, libisds and dependencies) run the following commands. These must be run from a working desktop session on OS X as the scripts accesses some resources that aren't available on a plain terminal session (e.g. when logged-in via ssh).
|
|
|
``` shell
|
|
|
QT_VER=5.7.1 ./scripts/build_osx_dmgs.sh -d -s 10.12 --i386 --shared
|
|
|
```
|
|
|
or
|
|
|
``` shell
|
|
|
QT_VER=5.9.4 ./scripts/build_osx_dmgs.sh -d -s 10.13 --x86_64 --shared
|
|
|
```
|
|
|
or the modification of any of those command to build the desired target.
|
|
|
|
|
|
Occasionally it happens that the target .dmg file fails to build properly (because of some asynchronous actions). In such cases just re-run the command using the `-D` parameter:
|
|
|
``` shell
|
|
|
QT_VER=5.7.1 ./scripts/build_osx_dmgs.sh -D -s 10.12 --i386 --shared
|
|
|
|
|
|
```
|
|
|
This will skip the compilation and will only build the package.
|
|
|
|
|
|
The following script builds the .dmg package if the application has already been compiled. But you are not expected to run the script manually.
|
|
|
``` shell
|
|
|
./scripts/build_dmg.sh
|
|
|
```
|
|
|
|
|
|
#### Datovka-4.10.1 and Older
|
|
|
|
|
|
A working statically compiled Qt5 (minimal is 5.2.1) is required to be installed in the location `/usr/local/Qt-${QT_VER}-macx-clang-32-macosx${SDK_VER}-static`. Usually, the sources require some patching in order to successfully proceed the compilation process. Also it is recommendable to decrease the pool size in `ExecutableAllocatorFixedVMPool.cpp` (we use 128Mb instead of 2Gb). So far we haven't been able to compile Qt5 using 10.6 SDK.
|
|
|
|
|
|
All libraries are linked statically into Datovka. In order to build all required libraries (excluding Qt5) you need to run the following command:
|
... | ... | |