Static libraries for Textual
How this works
source/buildLibraries.sh automates the building of libressl, libgpg-error, libgcrypt, and libotr for the Textual IRC Client.
By default, the build is done in /tmp/static-library-build-results.
Other libraries and frameworks are obtained prebuilt or built manually.
Prebuilt:
Built manually:
- asn1c 0.9.28 (used by Apple Receipt Loader, built using
Libraries/Source/Apple Receipt ASN1c/asn1c.xcodeproj) - GRMustache af9d138f6fc1d985a2c4089ad19b791a02827908 (templating engine, built using
Libraries/Source/GRMustache/GRMustache.xcodeproj)
Main Libraries
How to build
This repository contains prebuilt binaries; however, if you need to rebuild them, instructions follow. This assumes the arches being built are the default (x86_64 and arm64).
The ARCHES can be changed in the buildLibraries.sh script, in case other architectures are needed in the future.
cd source./buildLibraries.sh- Ensure that
/tmp/static-library-build-results/lib-static/universalcontains the following files:- libcrypto.a
- libgcrypt.a
- libgpg-error.a
- libotr.a
- libssl.a
- libtls.a
- Copy the above
.afiles into theLibrariesdirectory in this repository, overwriting any existing libraries.
How to update library versions
Modify source/buildLibraries.sh to have the desired library version numbers. Note that this might break build and might require additional patches.
After building the libraries, the following additional steps must be taken:
-
Verify that there are no critical differences between the headers for the different arches:
diff -Nruw /tmp/static-library-build-results/includes/x86_64 /tmp/static-library-build-results/includes/arm64A slight difference in the comment header in
gpgrt.his expected. -
Delete the
Headers/libotrand theHeaders/openssldirectories in this repository. -
Copy everything inside
/tmp/static-library-build-results/includes/arm64/intoHeadersin this repository. -
When completed,
Headersshould contain the following files:- gcrypt.h
- gpg-error.h
- gpgrt.h
- tls.h
And the following directories:
- libasn1c
- libmustache
- libotr
- openssl
-
Delete the following directories within
Documentationin this repository:- libgcrypt
- libgpg-error
- libotr
- libssl
-
Copy everything inside
/tmp/static-library-build-results/licenses/arm64/toDocumentation. -
Build the Encryption Kit Xcode project and make corrections for any API changes in the libraries.
Other Libraries
For the prebuilt libraries, just download the latest releases and copy the frameworks into Libraries.
For the libraries built manually, instructions follow.
libasn1:
- Build
Source/Apple Receipt ASN1c/asn1c.xcodeproj. - Copy the
libasn1c.abuild product intoLibraries.
Updating this library is somewhat complicated -- files need to be copied from the source package and the Xcode project needs to be modified appropriately.
GRMustache:
- Check out the source code from GitHub.
- Open
src/GRMustache.xcodeproj, set the project to "GRMustache7-MacOS", and set build to "Any Mac". - Go to Project Info and set the Deployment Target to macOS 10.12.
- Close the Xcode project.
- Open Terminal, cd to the directory for GRMustache, and run
make lib/libGRMustache7-MacOS.a. - Copy
lib/libGRMustache7-MacOS.atoSource/GRMustache/Libraries/libmustache.ain this repo. - If you are building a different version of GRMustache, you will need to copy over the headers to
Source/GRMustache/Headersand ensure that there have been no substantial changes. - Open
Sources/GRMustache/GRMustache.xcodeprojin this repo. - Build the GRMustache wrapper.
- Copy the
GRMustache.frameworkbuild product to theLibrariesdirectory in this repo.
Licensing
See the Documentation directory.