• cross-compile-openssl-windows.sh,cross-compile-curl-windows.sh,cross-compile-zlib-windows.sh,build-zlib-visual-studio-2015-cli.bat


    https://gist.github.com/artynet

    build zlib with Visual Studio CLI tool
    https://gist.github.com/artynet/5a568938dab9f3f5cab96bcfd1438740

    :: INCLUDE=C:Program Files (x86)Microsoft Visual Studio 14.0VCINCLUDE;C:Program Files (x86)Microsoft Visual Studio 14.0VCATLMFCINCLUDE;C:Program Files (x86)Windows Kits10includewdfucrt;C:Program Files (x86)Windows KitsNETFXSDK4.6includeum;C:Program Files (x86)Windows Kits8.1includeshared;C:Program Files (x86)Windows Kits8.1includeum;C:Program Files (x86)Windows Kits8.1includewinrt;
    :: C:Program Files (x86)Windows Kits10Include10.0.10150.0ucrt;C:Program Files (x86)Windows Kits10Lib10.0.10150.0ucrtx86
    
    :: LIBPATH=C:WINDOWSMicrosoft.NETFrameworkv4.0.30319;C:Program Files (x86)Microsoft Visual Studio 14.0VCLIB;C:Program Files (x86)Microsoft Visual Studio 14.0VCATLMFCLIB;ReferencesCommonConfigurationNeutral;Microsoft.VCLibs14.0ReferencesCommonConfiguration
    eutral;C:Program Files (x86)Windows Kits10Lib10.0.10150.0ucrtx86
    
    :: set LIB=C:Program Files (x86)Microsoft Visual Studio 14.0VCLIB;C:Program Files (x86)Microsoft Visual Studio 14.0VCATLMFCLIB;C:Program Files (x86)Windows Kits10libwdfucrtx86;C:Program Files (x86)Windows KitsNETFXSDK4.6libumx86;C:Program Files (x86)Windows Kits8.1libwinv6.3umx86;
    
    set INCLUDE=C:Program Files (x86)Microsoft Visual Studio 14.0VCINCLUDE;C:Program Files (x86)Microsoft Visual Studio 14.0VCATLMFCINCLUDE;
    C:Program Files (x86)Windows Kits10includewdfucrt;C:Program Files (x86)Windows KitsNETFXSDK4.6includeum;C:Program Files (x86)Windows Kits8.1includeshared;
    C:Program Files (x86)Windows Kits8.1includeum;C:Program Files (x86)Windows Kits8.1includewinrt;;C:Program Files (x86)Windows Kits10Include10.0.10150.0ucrt;
    C:Program Files (x86)Windows Kits10Lib10.0.10150.0ucrtx86
    
    set LIB=C:Program Files (x86)Microsoft Visual Studio 14.0VCLIB;C:Program Files (x86)Microsoft Visual Studio 14.0VCATLMFCLIB;
    C:Program Files (x86)Windows Kits10libwdfucrtx86;C:Program Files (x86)Windows KitsNETFXSDK4.6libumx86;
    C:Program Files (x86)Windows Kits8.1libwinv6.3umx86;C:Program Files (x86)Windows Kits10Lib10.0.10150.0ucrtx86
    
    set LIBPATH=C:WINDOWSMicrosoft.NETFrameworkv4.0.30319;C:Program Files (x86)Microsoft Visual Studio 14.0VCLIB;
    C:Program Files (x86)Microsoft Visual Studio 14.0VCATLMFCLIB;ReferencesCommonConfigurationNeutral;Microsoft.VCLibs14.0ReferencesCommonConfiguration
    eutral;
    C:Program Files (x86)Windows Kits10Lib10.0.10150.0ucrtx86
    
    :: nmake -n win32Makefile.msc clean
    
    nmake -n win32Makefile.msc

    Cross compile zLib for mingw32-w64
    https://gist.github.com/artynet/75518a8d219abd8c435a9b3b73b4ec3b

    #!/bin/bash
    
    # PREFIXDIR=$HOME/Programmi/Zlib-1.2.11-win32-x86
    
    PREFIXDIR=$HOME/Programmi/win32-cross
    
    make -f win32/Makefile.gcc BINARY_PATH=$PREFIXDIR/bin INCLUDE_PATH=$PREFIXDIR/include LIBRARY_PATH=$PREFIXDIR/lib SHARED_MODE=1 PREFIX=i686-w64-mingw32- install

    Cross compile OpenSSL for mingw32-w64
    https://gist.github.com/artynet/ee042155c93fc110e9422b5d458d9c6b

    #!/bin/bash
    
    WORKSPACE=/home/arturo/Programmi/win32-cross
    
    sed -i 's/:.dll.a/ -Wl,--export-all -shared:.dll.a/g' Configure
    sed -i 's,.*target already defined.*,$target=$_;,g' Configure
    
    ./Configure mingw shared --cross-compile-prefix=i686-w64-mingw32- --prefix=${WORKSPACE}
    # ./Configure mingw shared --cross-compile-prefix=x86_64-w64-mingw32- --prefix=${WORKSPACE}
    
    make -j2
    make -j2 install
    
    cp *.dll ${WORKSPACE}/lib/
    cd ${WORKSPACE}/include
    
    # Fix compile bug in OpenSSL
    sed -i '/#define HEADER_X509V3_H/a \n#ifdef X509_NAME
    #undef X509_NAME
    #endif' openssl/x509v3.h

    Cross compile cURL for mingw32-w64
    https://gist.github.com/artynet/54c19beafc6ed5b6ff38fe8b8cd1e13b

    #!/bin/bash
    
    ### Compilare CURL con toolchain mingw-w64 ###
    
    CPPFLAGS="-I/home/arturo/Programmi/win32-cross/include" 
    LDFLAGS="-L/home/arturo/Programmi/win32-cross/lib" 
    ./configure --host=i686-w64-mingw32 
    --with-ssl=/home/arturo/Programmi/win32-cross 
    --with-zlib=/home/arturo/Programmi/win32-cross 
    --disable-shared --enable-static
    
    # To then make the curl tool linked with everything static, I did this:
    make -j3
    
    rm src/curl.exe
    make LDFLAGS=-all-static
  • 相关阅读:
    Android文件操作总结
    SQLite优化方法
    Android之TabHost布局
    Android简单数据存储SharedPreferences
    Android之SharedPreferences权限
    Android布局大全
    context理解
    Android网络连接之HttpURLConnection和HttpClient
    Android之ContentProvider总结
    Intent的简介以及属性详解
  • 原文地址:https://www.cnblogs.com/findumars/p/7492712.html
Copyright © 2020-2023  润新知