mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 18:24:58 +00:00
Add xmake as build system
This commit is contained in:
10 files changed
+302
-201
No files matched your search
@@ -1,51 +1,60 @@
|
||||
#!/bin/bash
|
||||
set -xe
|
||||
|
||||
apk add gcc g++ build-base linux-headers cmake make autoconf automake libtool python2 python3
|
||||
apk add mbedtls-dev mbedtls-static zlib-dev rapidjson-dev zlib-static pcre2-dev
|
||||
#apk add gcc g++ build-base linux-headers cmake make autoconf automake libtool python2 python3
|
||||
#apk add mbedtls-dev mbedtls-static zlib-dev rapidjson-dev zlib-static pcre2-dev
|
||||
#
|
||||
#git clone https://github.com/curl/curl --depth=1 --branch curl-8_4_0
|
||||
#cd curl
|
||||
#cmake -DCURL_USE_MBEDTLS=ON -DHTTP_ONLY=ON -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_USE_LIBSSH2=OFF -DBUILD_CURL_EXE=OFF . > /dev/null
|
||||
#make install -j2 > /dev/null
|
||||
#cd ..
|
||||
#
|
||||
#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 -j3 > /dev/null
|
||||
#cd ..
|
||||
#
|
||||
#git clone https://github.com/ftk/quickjspp --depth=1
|
||||
#cd quickjspp
|
||||
#cmake -DCMAKE_BUILD_TYPE=Release .
|
||||
#make quickjs -j3 > /dev/null
|
||||
#install -d /usr/lib/quickjs/
|
||||
#install -m644 quickjs/libquickjs.a /usr/lib/quickjs/
|
||||
#install -d /usr/include/quickjs/
|
||||
#install -m644 quickjs/quickjs.h quickjs/quickjs-libc.h /usr/include/quickjs/
|
||||
#install -m644 quickjspp.hpp /usr/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 -j3
|
||||
#cd ..
|
||||
#
|
||||
#git clone https://github.com/ToruNiina/toml11 --branch="v3.7.1" --depth=1
|
||||
#cd toml11
|
||||
#cmake -DCMAKE_CXX_STANDARD=11 .
|
||||
#make install -j4
|
||||
#cd ..
|
||||
#
|
||||
#export PKG_CONFIG_PATH=/usr/lib64/pkgconfig
|
||||
#cmake -DCMAKE_BUILD_TYPE=Release .
|
||||
#make -j3
|
||||
#rm subconverter
|
||||
## shellcheck disable=SC2046
|
||||
#g++ -o base/subconverter $(find CMakeFiles/subconverter.dir/src/ -name "*.o") -static -lpcre2-8 -lyaml-cpp -L/usr/lib64 -lcurl -lmbedtls -lmbedcrypto -lmbedx509 -lz -l:quickjs/libquickjs.a -llibcron -O3 -s
|
||||
|
||||
git clone https://github.com/curl/curl --depth=1 --branch curl-8_4_0
|
||||
cd curl
|
||||
cmake -DCURL_USE_MBEDTLS=ON -DHTTP_ONLY=ON -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_USE_LIBSSH2=OFF -DBUILD_CURL_EXE=OFF . > /dev/null
|
||||
make install -j2 > /dev/null
|
||||
cd ..
|
||||
apk add git g++ build-base linux-headers cmake python3 curl unzip p7zip
|
||||
apk add lua5.4-dev luajit-dev mbedtls-dev mbedtls-static zlib-dev
|
||||
curl -fsSL https://xmake.io/shget.text | bash
|
||||
source "$HOME/.xmake/profile"
|
||||
|
||||
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 -j3 > /dev/null
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/ftk/quickjspp --depth=1
|
||||
cd quickjspp
|
||||
cmake -DCMAKE_BUILD_TYPE=Release .
|
||||
make quickjs -j3 > /dev/null
|
||||
install -d /usr/lib/quickjs/
|
||||
install -m644 quickjs/libquickjs.a /usr/lib/quickjs/
|
||||
install -d /usr/include/quickjs/
|
||||
install -m644 quickjs/quickjs.h quickjs/quickjs-libc.h /usr/include/quickjs/
|
||||
install -m644 quickjspp.hpp /usr/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 -j3
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/ToruNiina/toml11 --branch="v3.7.1" --depth=1
|
||||
cd toml11
|
||||
cmake -DCMAKE_CXX_STANDARD=11 .
|
||||
make install -j4
|
||||
cd ..
|
||||
|
||||
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig
|
||||
cmake -DCMAKE_BUILD_TYPE=Release .
|
||||
make -j3
|
||||
rm subconverter
|
||||
# shellcheck disable=SC2046
|
||||
g++ -o base/subconverter $(find CMakeFiles/subconverter.dir/src/ -name "*.o") -static -lpcre2-8 -lyaml-cpp -L/usr/lib64 -lcurl -lmbedtls -lmbedcrypto -lmbedx509 -lz -l:quickjs/libquickjs.a -llibcron -O3 -s
|
||||
xmake f --root --static=true -m release
|
||||
xmake --root subconverter
|
||||
cp "$(find build -name subconverter -type f)" base/subconverter
|
||||
|
||||
python3 -m ensurepip
|
||||
python3 -m pip install gitpython
|
||||
|
||||
Reference in new issue
Block a user