mirror of
https://github.com/netchx/netch.git
synced 2026-03-14 17:43:18 +08:00
[GitHub CI] Build shadowsocksr-libev
This commit is contained in:
24
Other/shadowsocksr-libev/build.ps1
Normal file
24
Other/shadowsocksr-libev/build.ps1
Normal file
@@ -0,0 +1,24 @@
|
||||
Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
|
||||
|
||||
git clone https://github.com/shadowsocksrr/shadowsocksr-libev -b 'Akkariiin/develop' src
|
||||
if ( -Not $? ) {
|
||||
Pop-Location
|
||||
exit $lastExitCode
|
||||
}
|
||||
Push-Location src
|
||||
|
||||
msys2 ..\build.sh
|
||||
if ( -Not $? ) {
|
||||
Pop-Location
|
||||
|
||||
rm -Recurse -Force src
|
||||
exit $lastExitCode
|
||||
}
|
||||
|
||||
cp -Force '.\ssr-local.exe' '..\release\ssr-local.exe'
|
||||
|
||||
Pop-Location
|
||||
rm -Recurse -Force src
|
||||
|
||||
Pop-Location
|
||||
exit $lastExitCode
|
||||
20
Other/shadowsocksr-libev/build.sh
Normal file
20
Other/shadowsocksr-libev/build.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
git submodule update --init || exit $?
|
||||
|
||||
cd libudns
|
||||
./autogen.sh || exit $?
|
||||
./configure || exit $?
|
||||
make -j2 || exit $?
|
||||
cd ..
|
||||
|
||||
./autogen.sh || exit $?
|
||||
CFLAGS+="-fstack-protector" ./configure --disable-documentation --with-ev="${PWD}/libev-mingw/build"
|
||||
|
||||
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
|
||||
|
||||
gcc $(find src/ -name "ss_local-*.o") $(find . -name "*.a" ! -name "*.dll.a") "${PWD}/libev-mingw/build/lib/libev.a" -o ssr-local -fstack-protector -static -lpcre -lssl -lcrypto -lws2_32 -s
|
||||
exit $?
|
||||
0
Other/shadowsocksr-libev/deps.ps1
Normal file
0
Other/shadowsocksr-libev/deps.ps1
Normal file
Reference in New Issue
Block a user