From e24d9002fd9d94e90fc5f093463b779fad70bd67 Mon Sep 17 00:00:00 2001 From: Larvan2 <78135608+Larvan2@users.noreply.github.com> Date: Wed, 23 Oct 2024 16:15:27 +0800 Subject: [PATCH] sync upstream --- scripts/build.macos.release.sh | 42 +++++++++++++++----------------- scripts/build.windows.release.sh | 7 +++--- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/scripts/build.macos.release.sh b/scripts/build.macos.release.sh index f774ea34a..8924fc5df 100644 --- a/scripts/build.macos.release.sh +++ b/scripts/build.macos.release.sh @@ -1,7 +1,7 @@ #!/bin/bash set -xe -brew reinstall rapidjson libevent zlib pcre2 pkgconfig +brew reinstall rapidjson zlib pcre2 pkgconfig #git clone https://github.com/curl/curl --depth=1 --branch curl-7_88_1 #cd curl @@ -14,46 +14,44 @@ brew reinstall rapidjson libevent zlib pcre2 pkgconfig git clone https://github.com/jbeder/yaml-cpp --depth=1 cd yaml-cpp cmake -DCMAKE_BUILD_TYPE=Release -DYAML_CPP_BUILD_TESTS=OFF -DYAML_CPP_BUILD_TOOLS=OFF . > /dev/null -make install -j8 > /dev/null +make -j6 > /dev/null +sudo make install > /dev/null cd .. git clone https://github.com/ftk/quickjspp --depth=1 cd quickjspp cmake -DCMAKE_BUILD_TYPE=Release . -make quickjs -j8 -install -d /usr/local/lib/quickjs/ -install -m644 quickjs/libquickjs.a /usr/local/lib/quickjs/ -install -d /usr/local/include/quickjs/ -install -m644 quickjs/quickjs.h quickjs/quickjs-libc.h /usr/local/include/quickjs/ -install -m644 quickjspp.hpp /usr/local/include/ +make quickjs -j6 > /dev/null +sudo install -d /usr/local/lib/quickjs/ +sudo install -m644 quickjs/libquickjs.a /usr/local/lib/quickjs/ +sudo install -d /usr/local/include/quickjs/ +sudo install -m644 quickjs/quickjs.h quickjs/quickjs-libc.h /usr/local/include/quickjs/ +sudo install -m644 quickjspp.hpp /usr/local/include/ cd .. git clone https://github.com/PerMalmberg/libcron --depth=1 cd libcron git submodule update --init cmake -DCMAKE_BUILD_TYPE=Release . -make libcron install -j8 -install -m644 libcron/out/Release/liblibcron.a /usr/local/lib/ -install -d /usr/local/include/libcron/ -install -m644 libcron/include/libcron/* /usr/local/include/libcron/ -install -d /usr/local/include/date/ -install -m644 libcron/externals/date/include/date/* /usr/local/include/date/ +make libcron -j6 +sudo install -m644 libcron/out/Release/liblibcron.a /usr/local/lib/ +sudo install -d /usr/local/include/libcron/ +sudo install -m644 libcron/include/libcron/* /usr/local/include/libcron/ +sudo install -d /usr/local/include/date/ +sudo install -m644 libcron/externals/date/include/date/* /usr/local/include/date/ cd .. git clone https://github.com/ToruNiina/toml11 --depth=1 cd toml11 cmake -DCMAKE_CXX_STANDARD=11 . -make install -j4 +sudo make install -j6 > /dev/null cd .. -cp /usr/local/lib/libevent.a . -cp /usr/local/opt/zlib/lib/libz.a . -cp /usr/local/lib/libpcre2-8.a . - cmake -DCMAKE_BUILD_TYPE=Release . -make -j8 +make -j6 rm subconverter -c++ -Xlinker -unexported_symbol -Xlinker "*" -o base/subconverter -framework CoreFoundation -framework Security $(find CMakeFiles/subconverter.dir/src/ -name "*.o") $(find . -name "*.a") -lcurl -O3 +# shellcheck disable=SC2046 +c++ -Xlinker -unexported_symbol -Xlinker "*" -o base/subconverter -framework CoreFoundation -framework Security $(find CMakeFiles/subconverter.dir/src/ -name "*.o") "$(brew --prefix zlib)/lib/libz.a" "$(brew --prefix pcre2)/lib/libpcre2-8.a" $(find . -name "*.a") -lcurl -O3 cd base chmod +rx subconverter @@ -61,4 +59,4 @@ chmod +r ./* cd .. mv base subconverter -set +xe +set +xe \ No newline at end of file diff --git a/scripts/build.windows.release.sh b/scripts/build.windows.release.sh index f6bb94349..2b52a5698 100644 --- a/scripts/build.windows.release.sh +++ b/scripts/build.windows.release.sh @@ -1,7 +1,7 @@ #!/bin/bash set -xe -git clone https://github.com/curl/curl --depth=1 --branch curl-7_88_1 +git clone https://github.com/curl/curl --depth=1 --branch curl-8_4_0 cd curl cmake -DCMAKE_BUILD_TYPE=Release -DCURL_USE_LIBSSH2=OFF -DHTTP_ONLY=ON -DCURL_USE_SCHANNEL=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_CURL_EXE=OFF -DCMAKE_INSTALL_PREFIX="$MINGW_PREFIX" -G "Unix Makefiles" -DHAVE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF . make install -j4 @@ -48,5 +48,6 @@ rm -f C:/Strawberry/perl/bin/pkg-config C:/Strawberry/perl/bin/pkg-config.bat cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" . make -j4 rm subconverter.exe -g++ $(find CMakeFiles/subconverter.dir/src -name "*.obj") curl/lib/libcurl.a -o base/subconverter.exe -static -lbcrypt -levent -lpcre2-8 -l:quickjs/libquickjs.a -llibcron -lyaml-cpp -liphlpapi -lcrypt32 -lws2_32 -lwsock32 -lz -s -mv base subconverter +# shellcheck disable=SC2046 +g++ $(find CMakeFiles/subconverter.dir/src -name "*.obj") curl/lib/libcurl.a -o base/subconverter.exe -static -lbcrypt -lpcre2-8 -l:quickjs/libquickjs.a -llibcron -lyaml-cpp -liphlpapi -lcrypt32 -lws2_32 -lwsock32 -lz -s +mv base subconverter \ No newline at end of file