[Other] Update dependencies

This commit is contained in:
Connection Refused
2021-09-23 21:51:02 +08:00
parent 998b0488df
commit 599db0ed33
7 changed files with 38 additions and 6 deletions

View File

@@ -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

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
mkdir ../../build
./configure --prefix="${PWD}/../../build" || exit $?
make install -j2 || exit $?
exit $?

View File

View File

@@ -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

View File

@@ -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 $?

View File

@@ -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

View File

@@ -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 $?