diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48213e65..89b5f0e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,10 @@ jobs: - name: C++ uses: msys2/setup-msys2@v2 + with: + update: true + release: true + install: base-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-libevent mingw-w64-x86_64-pcre2 mingw-w64-x86_64-freetype mingw-w64-x86_64-libpng mingw-w64-x86_64-bzip2 mingw-w64-x86_64-openssl mingw-w64-x86_64-mbedtls mingw-w64-x86_64-libsodium mingw-w64-x86_64-c-ares mingw-w64-x86_64-boost mingw-w64-x86_64-libmariadbclient unzip p7zip - name: Rust uses: actions-rs/toolchain@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d82654e9..ae1be6e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,10 @@ jobs: - name: C++ uses: msys2/setup-msys2@v2 + with: + update: true + release: true + install: install: base-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-libevent mingw-w64-x86_64-pcre2 mingw-w64-x86_64-freetype mingw-w64-x86_64-libpng mingw-w64-x86_64-bzip2 mingw-w64-x86_64-openssl mingw-w64-x86_64-mbedtls mingw-w64-x86_64-libsodium mingw-w64-x86_64-c-ares mingw-w64-x86_64-boost mingw-w64-x86_64-libmariadbclient unzip p7zip - name: Rust uses: actions-rs/toolchain@v1 diff --git a/Other/shadowsocksr-libev/build.ps1 b/Other/shadowsocksr-libev/build.ps1 new file mode 100644 index 00000000..c1bce51d --- /dev/null +++ b/Other/shadowsocksr-libev/build.ps1 @@ -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 \ No newline at end of file diff --git a/Other/shadowsocksr-libev/build.sh b/Other/shadowsocksr-libev/build.sh new file mode 100644 index 00000000..74423216 --- /dev/null +++ b/Other/shadowsocksr-libev/build.sh @@ -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 $? \ No newline at end of file diff --git a/Other/shadowsocksr-libev/deps.ps1 b/Other/shadowsocksr-libev/deps.ps1 new file mode 100644 index 00000000..e69de29b