mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-31 22:45:45 +00:00
Simplify Docker build on Windows
This commit is contained in:
@@ -340,17 +340,12 @@ brew install shadowsocks-libev
|
||||
### Windows (MinGW)
|
||||
To build Windows native binaries, the recommended method is to use Docker:
|
||||
|
||||
* On Windows: double-click `make.bat` in `docker\mingw`
|
||||
* On Unix-like system:
|
||||
|
||||
cd shadowsocks-libev/docker/mingw
|
||||
make
|
||||
|
||||
* On Windows (Command Prompt):
|
||||
|
||||
cd shadowsocks-libev\docker\mingw
|
||||
docker build --force-rm -t ss --build-arg REBUILD=%RANDOM% .
|
||||
docker run --rm --entrypoint cat ss /bin.tgz > ss-win.tgz
|
||||
|
||||
A tarball with 32-bit and 64-bit binaries will be generated in the same directory.
|
||||
|
||||
You could also manually use MinGW-w64 compilers to build in Unix-like shell (MSYS2/Cygwin), or cross-compile on Unix-like systems (Linux/MacOS). Please refer to build scripts in `docker/mingw`.
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
@echo off
|
||||
pushd %~dp0
|
||||
set "REPO=shadowsocks"
|
||||
set "REV=master"
|
||||
set "IMAGE=ss-build-mingw"
|
||||
set "DIST=ss-libev-win-dist.tar.gz"
|
||||
docker build --force-rm -t %IMAGE% ^
|
||||
--build-arg REV=%REV% --build-arg REPO=%REPO% ^
|
||||
--build-arg REBUILD=%RANDOM% .
|
||||
docker run --rm --entrypoint cat %IMAGE% /bin.tgz > %DIST%
|
||||
pause
|
||||
Reference in New Issue
Block a user