加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Setup.sh 1.93 KB
一键复制 编辑 原始数据 按行查看 历史
GaoYanFei 提交于 2021-06-11 01:45 . 1
#! /bin/bash
# 改成 x86_64-w64-mingw32 来编译64位版本
export HOST=x86_64-w64-mingw32
# It would be better to use nearest ubuntu archive mirror for faster
# downloads.
# RUN sed -ie 's/archive\.ubuntu/jp.archive.ubuntu/g' /etc/apt/sources.list
# 安装编译环境
#apt-get update && \
#apt-get install -y libgcrypt20-dev
# 动态编译 gmp
cd ..
tar xf gmp-6.1.2.tar.lz && \
cd gmp-6.1.2 && \
./configure --enable-shared --disable-static --prefix=/usr/local/$HOST --host=$HOST --disable-cxx --enable-fat CFLAGS="-mtune=generic -O2 -g0" && \
make install
# 动态编译 expat
cd ..
tar xf expat-2.2.7.tar.bz2 && \
cd expat-2.2.7 && \
./configure --enable-shared --disable-static --prefix=/usr/local/$HOST --host=$HOST --build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` && \
make install
# 动态编译 sqlite3
cd ..
tar xf sqlite-autoconf-3290000.tar.gz && cd sqlite-autoconf-3290000 && \
./configure --enable-shared --disable-static --prefix=/usr/local/$HOST --host=$HOST --build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` && \
make install
# 动态编译 zlib
cd ..
tar xf zlib-1.2.11.tar.gz && \
cd zlib-1.2.11
export BINARY_PATH=/usr/local/$HOST/bin
export INCLUDE_PATH=/usr/local/$HOST/include
export LIBRARY_PATH=/usr/local/$HOST/lib
make install -f win32/Makefile.gcc PREFIX=$HOST- SHARED_MODE=1
# 动态编译 c-ares
cd ..
tar xf c-ares-1.15.0.tar.gz && \
cd c-ares-1.15.0 && \
./configure --enable-shared --disable-static --without-random --prefix=/usr/local/$HOST --host=$HOST --build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` LIBS="-lws2_32" && \
make install
# 动态编译 libssh2
cd ..
tar xf libssh2-1.9.0.tar.gz && \
cd libssh2-1.9.0 && \
./configure --enable-shared --disable-static --prefix=/usr/local/$HOST --host=$HOST --build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` --without-openssl --with-wincng LIBS="-lws2_32" && \
make install
cd ..
cd aria2 && autoreconf -i && ./mingw-config && make install && $HOST-strip /usr/local/$HOST/bin/libaria2-0.dll
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化