Skip to content

Commit 5e45a67

Browse files
committed
Update script to allow single platform builds #76
1 parent e3e8457 commit 5e45a67

File tree

41 files changed

+2108
-408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2108
-408
lines changed

.gitignore

+7-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ cURLtv.sh
4242
*.orig
4343
test.sh
4444

45-
# Library Archives
45+
# Build Artifacts
4646
######################
4747
archive/
4848
libcrypto.a
@@ -55,3 +55,9 @@ openssl-ios-x86_64-maccatalyst.a
5555
releases
5656
sandbox/
5757
example/iOS\ Test\ App/libs/
58+
example/tvOS\ Test\ App/libs/
59+
example/macOS\ Test\ App/libs/
60+
example/iOS\ Test\ App/include/
61+
example/tvOS\ Test\ App/include/
62+
example/macOS\ Test\ App/include/
63+
cacert.pem

README.md

+21-8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This Script builds OpenSSL, nghttp2 and cURL/libcurl for MacOS (x86_64, arm64),
77

88
## News
99

10+
* 19-Jan-2025: Updated build script to allow building for single platform targets: macOS, iOS or tvOS. Specify with `-p macOS`. Default build is for "all" as it has been. Added examples apps for tvOS and macOS.
1011
* 17-Mar-2024: Updated tvOS build script to work with XCode 15.3 and added `--without-libpsl` for cURL due to on-by-default policy (see [cURL blog](https://daniel.haxx.se/blog/2024/01/10/psl-in-curl/)). TODO: Get a static build of libpsl for cross-compile.
1112
* 19-Jul-2023: Added OpenSSL 3.0.x (LTS) Support and removed EOL bitcode for builds going forward.
1213
* 13-Feb-2021: Update now builds XCFrameworks which supports all platforms and targets for easy import into your projects.
@@ -23,9 +24,9 @@ The build script accepts several arguments to adjust versions and toggle feature
2324
```
2425
./build.sh [-o <OpenSSL version>] [-c <curl version>] [-n <nghttp2 version>] [-d] [-e] [-3] [-x] [-h] [...]
2526
26-
-o <version> Build OpenSSL version (default 3.0.9)
27-
-c <version> Build curl version (default 8.1.2)
28-
-n <version> Build nghttp2 version (default 1.55.1)
27+
-o <version> Build OpenSSL version (default 3.0.15)
28+
-c <version> Build curl version (default 8.11.1)
29+
-n <version> Build nghttp2 version (default 1.64.0)
2930
-d Compile without HTTP2 support
3031
-e Compile with OpenSSL engine support
3132
-b Compile without bitcode
@@ -34,9 +35,11 @@ The build script accepts several arguments to adjust versions and toggle feature
3435
-3 Compile with SSLv3
3536
-s <version> iOS min target version (default 8.0)
3637
-t <version> tvOS min target version (default 9.0)
37-
-i <version> macOS 86_64 min target version (default 11.6.6)
38-
-a <version> macOS arm64 min target version (default 11.6.6)
38+
-i <version> macOS 86_64 min target version (default 14.6.1)
39+
-a <version> macOS arm64 min target version (default 14.6.1)
3940
-x No color output
41+
-p <platform> Build only for specified platform (iOS, tvOS, macOS, or all [default])
42+
-y Skip build confirmation
4043
-h Show usage
4144
```
4245

@@ -55,7 +58,15 @@ Minimum macOS, iOS and tvOS target build versions are set by default in the buil
5558
```bash
5659
git clone https://github.com/jasonacox/Build-OpenSSL-cURL.git
5760
cd Build-OpenSSL-cURL
61+
62+
# Build for all: macOS, iOS, and tvOS
5863
./build.sh
64+
65+
# Build for macOS only
66+
./build.sh -p macos
67+
68+
# build for iOS only
69+
./build.sh -p ios
5970
```
6071

6172
Default versions are specified in the `build.sh` script but you can specify the version you want to build via the command line, e.g.:
@@ -74,9 +85,9 @@ You can update the default version by editing this section in the `build.sh` scr
7485
# EDIT this section to Select Default Versions #
7586
################################################
7687

77-
OPENSSL="3.0.9" # https://www.openssl.org/source/
78-
LIBCURL="8.1.2" # https://curl.haxx.se/download.html
79-
NGHTTP2="1.55.1" # https://nghttp2.org/
88+
OPENSSL="3.0.15" # https://www.openssl.org/source/ - LTS Version
89+
LIBCURL="8.11.1" # https://curl.haxx.se/download.html
90+
NGHTTP2="1.64.0" # https://nghttp2.org/
8091

8192
################################################
8293
```
@@ -402,3 +413,5 @@ If you see "FATAL ERROR" during the nghttp2 build phase, this is likely due to n
402413
If you are on a new macOS installation and wonder why the build is failing, you might need to set the correct path for the command line tools:
403414

404415
xcode-select --switch /Applications/Xcode.app
416+
417+
If the build fails for a newer version of one of the libraries, submit a ticket. Please note, the project focuses on supporting long term support (LTS) versions of libraries. OpenSSL in particular, has many dev or short term support versions. These change too freuqently to adequately support. Switch to a LTS version. Submit any errors you get with LTS versions.

0 commit comments

Comments
 (0)