From 599db0ed33509245fadcd4bfd8a490106eea373e Mon Sep 17 00:00:00 2001 From: Connection Refused Date: Thu, 23 Sep 2021 21:51:02 +0800 Subject: [PATCH] [Other] Update dependencies --- Other/libev-mingw/build.ps1 | 22 ++++++++++++++++++++++ Other/libev-mingw/build.sh | 6 ++++++ Other/libev-mingw/deps.ps1 | 0 Other/shadowsocksr-libev/build.ps1 | 2 +- Other/shadowsocksr-libev/build.sh | 6 ++++-- Other/simple-obfs/build.ps1 | 2 +- Other/simple-obfs/build.sh | 6 ++++-- 7 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 Other/libev-mingw/build.ps1 create mode 100644 Other/libev-mingw/build.sh create mode 100644 Other/libev-mingw/deps.ps1 diff --git a/Other/libev-mingw/build.ps1 b/Other/libev-mingw/build.ps1 new file mode 100644 index 00000000..eaf4bf13 --- /dev/null +++ b/Other/libev-mingw/build.ps1 @@ -0,0 +1,22 @@ +Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) + +git clone https://github.com/shadowsocks/libev -b 'mingw' src +if ( -Not $? ) { + Pop-Location + exit $lastExitCode +} +Push-Location src + +msys2 ..\build.sh +if ( -Not $? ) { + Pop-Location + + rm -Recurse -Force src + exit $lastExitCode +} + +Pop-Location +rm -Recurse -Force src + +Pop-Location +exit $lastExitCode \ No newline at end of file diff --git a/Other/libev-mingw/build.sh b/Other/libev-mingw/build.sh new file mode 100644 index 00000000..baf0579b --- /dev/null +++ b/Other/libev-mingw/build.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +mkdir ../../build + +./configure --prefix="${PWD}/../../build" || exit $? +make install -j2 || exit $? +exit $? \ No newline at end of file diff --git a/Other/libev-mingw/deps.ps1 b/Other/libev-mingw/deps.ps1 new file mode 100644 index 00000000..e69de29b diff --git a/Other/shadowsocksr-libev/build.ps1 b/Other/shadowsocksr-libev/build.ps1 index 1167de09..bdd943be 100644 --- a/Other/shadowsocksr-libev/build.ps1 +++ b/Other/shadowsocksr-libev/build.ps1 @@ -15,7 +15,7 @@ if ( -Not $? ) { exit $lastExitCode } -cp -Force '.\src\ss-local.exe' '..\..\release\ssr-local.exe' +cp -Force '.\ss-local.exe' '..\..\release\ssr-local.exe' Pop-Location rm -Recurse -Force src diff --git a/Other/shadowsocksr-libev/build.sh b/Other/shadowsocksr-libev/build.sh index 8d24bdad..46cdceff 100644 --- a/Other/shadowsocksr-libev/build.sh +++ b/Other/shadowsocksr-libev/build.sh @@ -8,11 +8,13 @@ make -j2 || exit $? cd .. ./autogen.sh || exit $? -CFLAGS+="-fstack-protector" ./configure --disable-documentation --with-ev="${PWD}/libev-mingw/build" || exit $? +CFLAGS+="-fstack-protector" ./configure --disable-documentation --with-ev="${PWD}/../../build" || exit $? sed -i "s/%I/%z/g" src/utils.h sed -i "s/^const/extern const/g" src/tls.h sed -i "s/^const/extern const/g" src/http.h -make -j2 +make -j2 || exit $? + +gcc $(find src/ -name "ss_local-*.o") $(find . -name "*.a" ! -name "*.dll.a") "$LIBEV_PATH/lib/libev.a" -o ss-local -fstack-protector -static -lws2_32 -lsodium -lmbedtls -lmbedcrypto -lpcre || exit $? exit $? \ No newline at end of file diff --git a/Other/simple-obfs/build.ps1 b/Other/simple-obfs/build.ps1 index c87547f7..58a8420c 100644 --- a/Other/simple-obfs/build.ps1 +++ b/Other/simple-obfs/build.ps1 @@ -15,7 +15,7 @@ if ( -Not $? ) { exit $lastExitCode } -cp -Force '.\src\obfs-local.exe' '..\..\release\simple-obfs.exe' +cp -Force '.\simple-obfs.exe' '..\..\release\simple-obfs.exe' Pop-Location rm -Recurse -Force src diff --git a/Other/simple-obfs/build.sh b/Other/simple-obfs/build.sh index 3ddcdf4c..6a2e776e 100644 --- a/Other/simple-obfs/build.sh +++ b/Other/simple-obfs/build.sh @@ -2,7 +2,9 @@ git submodule update --init || exit $? ./autogen.sh || exit $? -./configure --disable-documentation --with-ev="${PWD}/libev-mingw/build" || exit $? +./configure --disable-documentation --with-ev="${PWD}/../../build" || exit $? -make -j2 +make -j2 || exit $? + +gcc $(find src/ -name "obfs_local-*.o") $(find . -name "*.a" ! -name "*.dll.a") "$LIBEV_PATH/lib/libev.a" -o simple-obfs -fstack-protector -static -lws2_32 -s || exit $? exit $? \ No newline at end of file