diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..fb0e272 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "gitsubmodule" + directory: "/" + schedule: + interval: "weekly" diff --git a/README.md b/README.md index aadbef7..9c108d7 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # Networking Libs -Build curl (8.8.0) with +Build curl with - TLS (BoringSSL) -- HTTP2 (nghttp2 1.62.1) -- HTTP3 (ngtcp2 1.5.0, nghttp3 1.3.0) +- HTTP2 (nghttp2) +- HTTP3 (ngtcp2, nghttp3) ## Cloning @@ -23,4 +23,4 @@ BoringSSL links to `libc++` when compiling for android, macOS. `CMakeFiles.txt` 1. `project(CURL C)` -> `project(CURL C CXX)` 2. Add `include(CheckCXXSymbolExists)` -3. Locate `openssl_check_symbol_exists` and change `check_symbol_exists` to `check_cxx_symbol_exists` at the end \ No newline at end of file +3. Locate `openssl_check_symbol_exists` and change `check_symbol_exists` to `check_cxx_symbol_exists` at the end diff --git a/boringssl b/boringssl index 251b2c1..9938f09 160000 --- a/boringssl +++ b/boringssl @@ -1 +1 @@ -Subproject commit 251b2c127da3bfd4aaf36384be50279820782b87 +Subproject commit 9938f09d1cb6637f95a700df717178fcb7754025 diff --git a/build_android.sh b/build_android.sh index 4be64c1..bd497db 100755 --- a/build_android.sh +++ b/build_android.sh @@ -2,91 +2,38 @@ ROOT=$PWD SDK_VER=23 - -# Uncomment a set of variables to compile for 32bit or 64bit - -#ABI="armeabi-v7a" -#BUILD_PATH="$ROOT/build/android32" -#OUT_PATH="$ROOT/out/android32" - ABI="arm64-v8a" BUILD_PATH="$ROOT/build/android64" OUT_PATH="$ROOT/out/android64" -# Remove previous output files +build_library() { + local module_name=$1 + local extra_cmake_flags=$2 + + echo "Building $module_name..." + + rm -rf "$BUILD_PATH/$module_name" + mkdir -p "$BUILD_PATH/$module_name" + cd "$BUILD_PATH/$module_name" + + cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="$OUT_PATH" \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" \ + -DANDROID_ABI=$ABI \ + -DANDROID_PLATFORM=android-$SDK_VER \ + $extra_cmake_flags \ + "$ROOT/$module_name" + + make -j$(nproc) + make install + make clean +} rm -rf "$OUT_PATH" -# Build BoringSSL - -rm -rf "$BUILD_PATH/boringssl" -mkdir -p "$BUILD_PATH/boringssl" -cd "$BUILD_PATH/boringssl" - -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ - -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" \ - -DANDROID_ABI=$ABI -DANDROID_PLATFORM=android-$SDK_VER "$ROOT/boringssl" -make -j$(nproc) -make install -make clean - -# Build nghttp2 - -rm -rf "$BUILD_PATH/nghttp2" -mkdir -p "$BUILD_PATH/nghttp2" -cd "$BUILD_PATH/nghttp2" - -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -DENABLE_LIB_ONLY=ON -DENABLE_EXAMPLES=OFF \ - -DBUILD_TESTING=OFF -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" -DANDROID_ABI=$ABI \ - -DANDROID_PLATFORM=android-$SDK_VER -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON "$ROOT/nghttp2" -make -j$(nproc) -make install -make clean - -# Build ngtcp2 - -rm -rf "$BUILD_PATH/ngtcp2" -mkdir -p "$BUILD_PATH/ngtcp2" -cd "$BUILD_PATH/ngtcp2" - -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -DBUILD_TESTING=OFF \ - -DENABLE_BORINGSSL=ON -DBORINGSSL_INCLUDE_DIR="$OUT_PATH/include" \ - -DBORINGSSL_LIBRARIES="$OUT_PATH/lib/libcrypto.a;$OUT_PATH/lib/libssl.a" \ - -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" -DANDROID_ABI=$ABI \ - -DANDROID_PLATFORM=android-$SDK_VER -DENABLE_SHARED_LIB=OFF -DENABLE_STATIC_LIB=ON "$ROOT/ngtcp2" -make -j$(nproc) -make install -make clean - -# Build nghttp3 - -rm -rf "$BUILD_PATH/nghttp3" -mkdir -p "$BUILD_PATH/nghttp3" -cd "$BUILD_PATH/nghttp3" - -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -DENABLE_LIB_ONLY=ON -DENABLE_EXAMPLES=OFF \ - -DBUILD_TESTING=OFF -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" -DANDROID_ABI=$ABI \ - -DANDROID_PLATFORM=android-$SDK_VER -DENABLE_SHARED_LIB=OFF -DENABLE_STATIC_LIB=ON "$ROOT/nghttp3" -make -j$(nproc) -make install -make clean - -# Build curl - -rm -rf "$BUILD_PATH/curl" -mkdir -p "$BUILD_PATH/curl" -cd "$BUILD_PATH/curl" - -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -DBUILD_CURL_EXE=OFF \ - -DCURL_USE_OPENSSL=ON -DOPENSSL_INCLUDE_DIR="$OUT_PATH/include" \ - -DOPENSSL_CRYPTO_LIBRARY="$OUT_PATH/lib/libcrypto.a" -DOPENSSL_SSL_LIBRARY="$OUT_PATH/lib/libssl.a" \ - -DOPENSSL_LIBRARIES="$OUT_PATH/lib/libcrypto.a;$OUT_PATH/lib/libssl.a" \ - -DUSE_NGHTTP2=ON -DNGHTTP2_INCLUDE_DIR="$OUT_PATH/include" -DNGHTTP2_LIBRARY="$OUT_PATH/lib/libnghttp2.a" \ - -DUSE_NGTCP2=ON -DNGTCP2_INCLUDE_DIR="$OUT_PATH/include" -DNGTCP2_LIBRARY="$OUT_PATH/lib/libngtcp2.a" \ - -Dngtcp2_crypto_boringssl_LIBRARY="$OUT_PATH/lib/libngtcp2_crypto_boringssl.a" \ - -DNGHTTP3_INCLUDE_DIR="$OUT_PATH/include" -DNGHTTP3_LIBRARY="$OUT_PATH/lib/libnghttp3.a" \ - -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake" -DANDROID_ABI=$ABI \ - -DANDROID_PLATFORM=android-$SDK_VER -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON "$ROOT/curl" -make -j$(nproc) -make install -make clean \ No newline at end of file +build_library "boringssl" +build_library "nghttp2" "-DENABLE_LIB_ONLY=ON -DENABLE_EXAMPLES=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON" +build_library "ngtcp2" "-DBUILD_TESTING=OFF -DENABLE_BORINGSSL=ON -DBORINGSSL_INCLUDE_DIR=$OUT_PATH/include -DBORINGSSL_LIBRARIES=$OUT_PATH/lib/libcrypto.a;$OUT_PATH/lib/libssl.a -DENABLE_SHARED_LIB=OFF -DENABLE_STATIC_LIB=ON" +build_library "nghttp3" "-DENABLE_LIB_ONLY=ON -DENABLE_EXAMPLES=OFF -DBUILD_TESTING=OFF -DENABLE_SHARED_LIB=OFF -DENABLE_STATIC_LIB=ON" +build_library "curl" "-DBUILD_CURL_EXE=OFF -DCURL_USE_OPENSSL=ON -DOPENSSL_INCLUDE_DIR=$OUT_PATH/include -DOPENSSL_CRYPTO_LIBRARY=$OUT_PATH/lib/libcrypto.a -DOPENSSL_SSL_LIBRARY=$OUT_PATH/lib/libssl.a -DOPENSSL_LIBRARIES=$OUT_PATH/lib/libcrypto.a;$OUT_PATH/lib/libssl.a -DUSE_NGHTTP2=ON -DNGHTTP2_INCLUDE_DIR=$OUT_PATH/include -DNGHTTP2_LIBRARY=$OUT_PATH/lib/libnghttp2.a -DUSE_NGTCP2=ON -DNGTCP2_INCLUDE_DIR=$OUT_PATH/include -DNGTCP2_LIBRARY=$OUT_PATH/lib/libngtcp2.a -Dngtcp2_crypto_boringssl_LIBRARY=$OUT_PATH/lib/libngtcp2_crypto_boringssl.a -DNGHTTP3_INCLUDE_DIR=$OUT_PATH/include -DNGHTTP3_LIBRARY=$OUT_PATH/lib/libnghttp3.a" diff --git a/build_macos.sh b/build_macos.sh index fd5bb3c..8f69dfa 100755 --- a/build_macos.sh +++ b/build_macos.sh @@ -7,74 +7,25 @@ OUT_PATH="$ROOT/out/macos" export CMAKE_OSX_ARCHITECTURES="x86_64;arm64" export MACOSX_DEPLOYMENT_TARGET="10.15" -# Remove previous output files - rm -rf "$OUT_PATH" -# Build BoringSSL - -rm -rf "$BUILD_PATH/boringssl" -mkdir -p "$BUILD_PATH/boringssl" -cd "$BUILD_PATH/boringssl" - -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -DCMAKE_POSITION_INDEPENDENT_CODE=ON "$ROOT/boringssl" -make -j$(sysctl -n hw.ncpu) -make install -make clean - -# Build nghttp2 - -rm -rf "$BUILD_PATH/nghttp2" -mkdir -p "$BUILD_PATH/nghttp2" -cd "$BUILD_PATH/nghttp2" - -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -DENABLE_LIB_ONLY=ON -DENABLE_EXAMPLES=OFF \ - -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON "$ROOT/nghttp2" -make -j$(sysctl -n hw.ncpu) -make install -make clean - -# Build ngtcp2 - -rm -rf "$BUILD_PATH/ngtcp2" -mkdir -p "$BUILD_PATH/ngtcp2" -cd "$BUILD_PATH/ngtcp2" - -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -DBUILD_TESTING=OFF \ - -DENABLE_BORINGSSL=ON -DBORINGSSL_INCLUDE_DIR="$OUT_PATH/include" \ - -DBORINGSSL_LIBRARIES="$OUT_PATH/lib/libcrypto.a;$OUT_PATH/lib/libssl.a" \ - -DENABLE_SHARED_LIB=OFF -DENABLE_STATIC_LIB=ON "$ROOT/ngtcp2" -make -j$(sysctl -n hw.ncpu) -make install -make clean - -# Build nghttp3 - -rm -rf "$BUILD_PATH/nghttp3" -mkdir -p "$BUILD_PATH/nghttp3" -cd "$BUILD_PATH/nghttp3" - -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -DENABLE_LIB_ONLY=ON -DENABLE_EXAMPLES=OFF \ - -DBUILD_TESTING=OFF -DENABLE_SHARED_LIB=OFF -DENABLE_STATIC_LIB=ON "$ROOT/nghttp3" -make -j$(sysctl -n hw.ncpu) -make install -make clean - -# Build curl - -rm -rf "$BUILD_PATH/curl" -mkdir -p "$BUILD_PATH/curl" -cd "$BUILD_PATH/curl" - -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -DBUILD_CURL_EXE=OFF \ - -DCURL_DISABLE_LDAP=ON -DCURL_USE_OPENSSL=ON -DOPENSSL_INCLUDE_DIR="$OUT_PATH/include" \ - -DOPENSSL_CRYPTO_LIBRARY="$OUT_PATH/lib/libcrypto.a" -DOPENSSL_SSL_LIBRARY="$OUT_PATH/lib/libssl.a" \ - -DOPENSSL_LIBRARIES="$OUT_PATH/lib/libcrypto.a;$OUT_PATH/lib/libssl.a" \ - -DUSE_NGHTTP2=ON -DNGHTTP2_INCLUDE_DIR="$OUT_PATH/include" -DNGHTTP2_LIBRARY="$OUT_PATH/lib/libnghttp2.a" \ - -DUSE_NGTCP2=ON -DNGTCP2_INCLUDE_DIR="$OUT_PATH/include" -DNGTCP2_LIBRARY="$OUT_PATH/lib/libngtcp2.a" \ - -Dngtcp2_crypto_boringssl_LIBRARY="$OUT_PATH/lib/libngtcp2_crypto_boringssl.a" \ - -DNGHTTP3_INCLUDE_DIR="$OUT_PATH/include" -DNGHTTP3_LIBRARY="$OUT_PATH/lib/libnghttp3.a" \ - -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON "$ROOT/curl" -make -j$(sysctl -n hw.ncpu) -make install -make clean +build_library() { + local project_name="$1" + local cmake_flags="$2" + local build_dir="$BUILD_PATH/$project_name" + + rm -rf "$build_dir" + mkdir -p "$build_dir" + cd "$build_dir" + + cmake $cmake_flags "$ROOT/$project_name" + make -j$(sysctl -n hw.ncpu) + make install + make clean +} + +build_library "boringssl" "-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=\"$OUT_PATH\" -DCMAKE_POSITION_INDEPENDENT_CODE=ON" +build_library "nghttp2" "-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=\"$OUT_PATH\" -DENABLE_LIB_ONLY=ON -DENABLE_EXAMPLES=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON" +build_library "ngtcp2" "-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=\"$OUT_PATH\" -DBUILD_TESTING=OFF -DENABLE_BORINGSSL=ON -DBORINGSSL_INCLUDE_DIR=\"$OUT_PATH/include\" -DBORINGSSL_LIBRARIES=\"$OUT_PATH/lib/libcrypto.a;$OUT_PATH/lib/libssl.a\" -DENABLE_SHARED_LIB=OFF -DENABLE_STATIC_LIB=ON" +build_library "nghttp3" "-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=\"$OUT_PATH\" -DENABLE_LIB_ONLY=ON -DENABLE_EXAMPLES=OFF -DBUILD_TESTING=OFF -DENABLE_SHARED_LIB=OFF -DENABLE_STATIC_LIB=ON" +build_library "curl" "-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=\"$OUT_PATH\" -DBUILD_CURL_EXE=OFF -DCURL_DISABLE_LDAP=ON -DCURL_USE_OPENSSL=ON -DOPENSSL_INCLUDE_DIR=\"$OUT_PATH/include\" -DOPENSSL_CRYPTO_LIBRARY=\"$OUT_PATH/lib/libcrypto.a\" -DOPENSSL_SSL_LIBRARY=\"$OUT_PATH/lib/libssl.a\" -DOPENSSL_LIBRARIES=\"$OUT_PATH/lib/libcrypto.a;$OUT_PATH/lib/libssl.a\" -DUSE_NGHTTP2=ON -DNGHTTP2_INCLUDE_DIR=\"$OUT_PATH/include\" -DNGHTTP2_LIBRARY=\"$OUT_PATH/lib/libnghttp2.a\" -DUSE_NGTCP2=ON -DNGTCP2_INCLUDE_DIR=\"$OUT_PATH/include\" -DNGTCP2_LIBRARY=\"$OUT_PATH/lib/libngtcp2.a\" -Dngtcp2_crypto_boringssl_LIBRARY=\"$OUT_PATH/lib/libngtcp2_crypto_boringssl.a\" -DNGHTTP3_INCLUDE_DIR=\"$OUT_PATH/include\" -DNGHTTP3_LIBRARY=\"$OUT_PATH/lib/libnghttp3.a\" -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON" diff --git a/build_windows.ps1 b/build_windows.ps1 index d306e43..79ed550 100644 --- a/build_windows.ps1 +++ b/build_windows.ps1 @@ -1,45 +1,39 @@ -$ROOT=$PWD -$NPROC=(Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors +$ROOT = $PWD +$NPROC = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors if ($env:PLATFORM -eq "x86") { - $BUILD_PATH="$ROOT/build/windows32" - $OUT_PATH="$ROOT/out/windows32" + $BUILD_PATH = "$ROOT/build/windows32" + $OUT_PATH = "$ROOT/out/windows32" } elseif ($env:PLATFORM -eq "x64") { - $BUILD_PATH="$ROOT/build/windows64" - $OUT_PATH="$ROOT/out/windows64" + $BUILD_PATH = "$ROOT/build/windows64" + $OUT_PATH = "$ROOT/out/windows64" } else { "Invalid Platform!" Exit } -# Remove previous output files - if (Test-Path $OUT_PATH) { - Remove-Item -Path $OUT_PATH -Recurse | out-null + Remove-Item -Path $OUT_PATH -Recurse | Out-Null } -# Build BoringSSL - if (Test-Path "$BUILD_PATH/boringssl") { - Remove-Item -Path "$BUILD_PATH/boringssl" -Recurse | out-null + Remove-Item -Path "$BUILD_PATH/boringssl" -Recurse | Out-Null } -New-Item -Path $BUILD_PATH -Name "boringssl" -ItemType "directory" | out-null -Set-Location -Path "$BUILD_PATH/boringssl" | out-null +New-Item -Path $BUILD_PATH -Name "boringssl" -ItemType "directory" | Out-Null +Set-Location -Path "$BUILD_PATH/boringssl" | Out-Null cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -G Ninja "$ROOT/boringssl" ninja -j $NPROC ninja install ninja clean -# Build nghttp2 - if (Test-Path "$BUILD_PATH/nghttp2") { - Remove-Item -Path "$BUILD_PATH/nghttp2" -Recurse | out-null + Remove-Item -Path "$BUILD_PATH/nghttp2" -Recurse | Out-Null } -New-Item -Path $BUILD_PATH -Name "nghttp2" -ItemType "directory" | out-null -Set-Location -Path "$BUILD_PATH/nghttp2" | out-null +New-Item -Path $BUILD_PATH -Name "nghttp2" -ItemType "directory" | Out-Null +Set-Location -Path "$BUILD_PATH/nghttp2" | Out-Null cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -G Ninja -DENABLE_LIB_ONLY=ON -DENABLE_EXAMPLES=OFF ` -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON "$ROOT/nghttp2" @@ -47,16 +41,14 @@ ninja -j $NPROC ninja install ninja clean -# Build ngtcp2 - if (Test-Path "$BUILD_PATH/ngtcp2") { - Remove-Item -Path "$BUILD_PATH/ngtcp2" -Recurse | out-null + Remove-Item -Path "$BUILD_PATH/ngtcp2" -Recurse | Out-Null } -New-Item -Path $BUILD_PATH -Name "ngtcp2" -ItemType "directory" | out-null -Set-Location -Path "$BUILD_PATH/ngtcp2" | out-null +New-Item -Path $BUILD_PATH -Name "ngtcp2" -ItemType "directory" | Out-Null +Set-Location -Path "$BUILD_PATH/ngtcp2" | Out-Null -$BORINGSSL_LIB_PATHS = "$OUT_PATH/lib/crypto.lib;$OUT_PATH/lib/ssl.lib" -replace '[\\]','/' +$BORINGSSL_LIB_PATHS = "$OUT_PATH/lib/crypto.lib;$OUT_PATH/lib/ssl.lib" -replace '[\\]', '/' cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -G Ninja -DBUILD_TESTING=OFF ` -DCMAKE_TRY_COMPILE_CONFIGURATION=Release ` -DENABLE_BORINGSSL=ON -DBORINGSSL_INCLUDE_DIR="$OUT_PATH/include" -DBORINGSSL_LIBRARIES="$BORINGSSL_LIB_PATHS" ` @@ -65,14 +57,12 @@ ninja -j $NPROC ninja install ninja clean -# Build nghttp3 - if (Test-Path "$BUILD_PATH/nghttp3") { - Remove-Item -Path "$BUILD_PATH/nghttp3" -Recurse | out-null + Remove-Item -Path "$BUILD_PATH/nghttp3" -Recurse | Out-Null } -New-Item -Path $BUILD_PATH -Name "nghttp3" -ItemType "directory" | out-null -Set-Location -Path "$BUILD_PATH/nghttp3" | out-null +New-Item -Path $BUILD_PATH -Name "nghttp3" -ItemType "directory" | Out-Null +Set-Location -Path "$BUILD_PATH/nghttp3" | Out-Null cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -G Ninja -DENABLE_LIB_ONLY=ON -DENABLE_EXAMPLES=OFF ` -DBUILD_TESTING=OFF -DENABLE_SHARED_LIB=OFF -DENABLE_STATIC_LIB=ON "$ROOT/nghttp3" @@ -80,17 +70,16 @@ ninja -j $NPROC ninja install ninja clean -# Build curl - if (Test-Path "$BUILD_PATH/curl") { - Remove-Item -Path "$BUILD_PATH/curl" -Recurse | out-null + Remove-Item -Path "$BUILD_PATH/curl" -Recurse | Out-Null } -New-Item -Path $BUILD_PATH -Name "curl" -ItemType "directory" | out-null -Set-Location -Path "$BUILD_PATH/curl" | out-null +New-Item -Path $BUILD_PATH -Name "curl" -ItemType "directory" | Out-Null +Set-Location -Path "$BUILD_PATH/curl" | Out-Null + +$env:CFLAGS = "-DNGHTTP2_STATICLIB -DNGTCP2_STATICLIB -DNGHTTP3_STATICLIB" +$env:CXXFLAGS = $env:CFLAGS -$env:CFLAGS="-DNGHTTP2_STATICLIB -DNGTCP2_STATICLIB -DNGHTTP3_STATICLIB" -$env:CXXFLAGS=$env:CFLAGS cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -G Ninja -DBUILD_CURL_EXE=OFF ` -D CURL_DISABLE_LDAP=ON -DCURL_USE_OPENSSL=ON -DOPENSSL_INCLUDE_DIR="$OUT_PATH/include" ` -DOPENSSL_CRYPTO_LIBRARY="$OUT_PATH/lib/crypto.lib" -DOPENSSL_SSL_LIBRARY="$OUT_PATH/lib/ssl.lib" ` @@ -101,4 +90,4 @@ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$OUT_PATH" -G Ninja -DB -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON "$ROOT/curl" ninja -j $NPROC ninja install -ninja clean \ No newline at end of file +ninja clean diff --git a/curl b/curl index fd567d4..68bd759 160000 --- a/curl +++ b/curl @@ -1 +1 @@ -Subproject commit fd567d4f06857f4fc8e2f64ea727b1318f76ad33 +Subproject commit 68bd759c2bfe74799c3355ad29265b795a7e6c62 diff --git a/make_ca_bundle.py b/make_ca_bundle.py index f7dee8e..6081941 100644 --- a/make_ca_bundle.py +++ b/make_ca_bundle.py @@ -5,6 +5,8 @@ with open("ca_bundle.h", "w") as out: out.write("#pragma once\n\n") out.write("constexpr static char CA_BUNDLE_CONTENT[] =") + for line in content.split('\n'): out.write(f'\n"{line}\\n"') - out.write(';') \ No newline at end of file + + out.write(';') diff --git a/nghttp2 b/nghttp2 index d13a575..5ca0bca 160000 --- a/nghttp2 +++ b/nghttp2 @@ -1 +1 @@ -Subproject commit d13a5758373931064636c1641db6277db45552dc +Subproject commit 5ca0bca19992fbb08792a25a6657a61c16f78710 diff --git a/nghttp3 b/nghttp3 index e4f96f9..dcec8f1 160000 --- a/nghttp3 +++ b/nghttp3 @@ -1 +1 @@ -Subproject commit e4f96f9572e4fc27324b4a009d877a4a2bbacc4e +Subproject commit dcec8f1df3d371a101a3e977ff4e917601db3155 diff --git a/ngtcp2 b/ngtcp2 index e2372a8..4a22dfc 160000 --- a/ngtcp2 +++ b/ngtcp2 @@ -1 +1 @@ -Subproject commit e2372a8256322284f5795cd765c4eccbc06bbdeb +Subproject commit 4a22dfcf71c55c0c12fa428c4fd64d5f17cac437