Skip to content

Instantly share code, notes, and snippets.

@myfreeer
Last active October 22, 2017 07:53
Show Gist options
  • Save myfreeer/bef0503907b9559d604c89f9b630a62b to your computer and use it in GitHub Desktop.
Save myfreeer/bef0503907b9559d604c89f9b630a62b to your computer and use it in GitHub Desktop.
static dnscrypt-proxy build scripts for windows on msys2
version: 1.0.{build}
build_script:
- cmd: >-
C:\msys64\usr\bin\pacman -Syyuu --noconfirm
C:\msys64\usr\bin\pacman -Suu --noconfirm
appveyor DownloadFile https://gist.github.com/myfreeer/bef0503907b9559d604c89f9b630a62b/raw/build-dnscrypt-proxy.sh
set MSYSTEM=MINGW64
C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./build-dnscrypt-proxy.sh"
set filename=dnscrypt-proxy-x64.7z
7z a -mx9 %filename% ./src/hostip/hostip.exe ./src/proxy/dnscrypt-proxy.exe dnscrypt-proxy.conf dnscrypt-resolvers.csv
appveyor PushArtifact %filename%
C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec make clean"
C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./build-dnscrypt-proxy.sh"
set filename=dnscrypt-proxy-x86.7z
7z a -mx9 %filename% ./src/hostip/hostip.exe ./src/proxy/dnscrypt-proxy.exe dnscrypt-proxy.conf dnscrypt-resolvers.csv
appveyor PushArtifact %filename%
test: off
#!/bin/bash
CPUCOUNT=$(grep -c ^processor /proc/cpuinfo)
case $MSYSTEM in
MINGW32)
export CPU=x86
;;
MINGW64)
export CPU=x86_64
;;
esac
pacman -Sy --noconfirm --needed mingw-w64-$CPU-libsodium mingw-w64-$CPU-ldns
export LDFLAGS='-Wl,-static -static -static-libgcc -s -Wl,--gc-sections'
rm -f /mingw64/lib/libsodium.dll.a \
/mingw64/lib/libsodium.dll.a.dyn \
/mingw64/lib/libldns.dll.a \
/mingw32/lib/libsodium.dll.a \
/mingw32/lib/libsodium.dll.a.dyn \
/mingw32/lib/libldns.dll.a
./autogen.sh
./configure --enable-static=libsodium,ldns --disable-shared
make -j$CPUCOUNT
strip -s src/proxy/dnscrypt-proxy.exe
strip -s src/hostip/hostip.exe
@myfreeer
Copy link
Author

Readme

Build status
static dnscrypt-proxy build scripts for windows on msys2.

Differences form offical release

  • build against git master.
  • fully static, no extra dlls needed.

Artifacts

  • x86_64 (64-bits) version: dnscrypt-proxy-x64.7z
  • x86 (32-bits) version: dnscrypt-proxy-x86.7z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment