Experimental 32bit build with pyd instead of dll

This commit is contained in:
Dmitri Bogomolov 2020-10-20 18:32:55 +03:00
parent f3e2771bc2
commit b83c51c752
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -88,9 +88,11 @@ function install_openssl(){
if [ "${MACHINE_TYPE}" == 'x86_64' ]; then if [ "${MACHINE_TYPE}" == 'x86_64' ]; then
echo "Installing OpenSSL ${OPENSSL_VERSION} 64b" echo "Installing OpenSSL ${OPENSSL_VERSION} 64b"
wine Win64OpenSSL-${OPENSSL_VERSION}.exe /q /norestart /silent /verysilent /sp- /suppressmsgboxes wine Win64OpenSSL-${OPENSSL_VERSION}.exe /q /norestart /silent /verysilent /sp- /suppressmsgboxes
export OPENSSL_DIR="$HOME/.wine64/drive_c/OpenSSL-Win64"
else else
echo "Installing OpenSSL ${OPENSSL_VERSION} 32b" echo "Installing OpenSSL ${OPENSSL_VERSION} 32b"
wine Win32OpenSSL-${OPENSSL_VERSION}.exe /q /norestart /silent /verysilent /sp- /suppressmsgboxes wine Win32OpenSSL-${OPENSSL_VERSION}.exe /q /norestart /silent /verysilent /sp- /suppressmsgboxes
export OPENSSL_DIR="$HOME/.wine64/drive_c/OpenSSL-Win32"
fi fi
} }
@ -130,8 +132,8 @@ function install_pyopencl()
function build_dll(){ function build_dll(){
cd "${BASE_DIR}" || exit 1 cd "${BASE_DIR}" || exit 1
cd src/bitmsghash || exit 1
if [ "${MACHINE_TYPE}" == 'x86_64' ]; then if [ "${MACHINE_TYPE}" == 'x86_64' ]; then
cd src/bitmsghash || exit 1
echo "Create dll" echo "Create dll"
x86_64-w64-mingw32-g++ -D_WIN32 -Wall -O3 -march=native \ x86_64-w64-mingw32-g++ -D_WIN32 -Wall -O3 -march=native \
"-I$HOME/.wine64/drive_c/OpenSSL-Win64/include" \ "-I$HOME/.wine64/drive_c/OpenSSL-Win64/include" \
@ -146,18 +148,20 @@ function build_dll(){
-fPIC -shared -lcrypt32 -leay32 -lwsock32 \ -fPIC -shared -lcrypt32 -leay32 -lwsock32 \
-o bitmsghash64.dll -Wl,--out-implib,bitmsghash.a -o bitmsghash64.dll -Wl,--out-implib,bitmsghash.a
else else
echo "Create dll" echo "Create pyd"
i686-w64-mingw32-g++ -D_WIN32 -Wall -m32 -O3 -march=native \ # FIXME: check for VCPython and build dll if not found
"-I$HOME/.wine32/drive_c/OpenSSL-Win32/include" \ wine python setup.py build_ext --inplace
-I/usr/i686-w64-mingw32/include \ # i686-w64-mingw32-g++ -D_WIN32 -Wall -m32 -O3 -march=native \
"-L$HOME/.wine32/drive_c/OpenSSL-Win32/lib" \ # "-I$HOME/.wine32/drive_c/OpenSSL-Win32/include" \
-c bitmsghash.cpp # -I/usr/i686-w64-mingw32/include \
i686-w64-mingw32-g++ -static-libgcc -shared bitmsghash.o \ # "-L$HOME/.wine32/drive_c/OpenSSL-Win32/lib" \
-D_WIN32 -O3 -march=native \ # -c bitmsghash.cpp
"-I$HOME/.wine32/drive_c/OpenSSL-Win32/include" \ # i686-w64-mingw32-g++ -static-libgcc -shared bitmsghash.o \
"-L$HOME/.wine32/drive_c/OpenSSL-Win32/lib/MinGW" \ # -D_WIN32 -O3 -march=native \
-fPIC -shared -lcrypt32 -leay32 -lwsock32 \ # "-I$HOME/.wine32/drive_c/OpenSSL-Win32/include" \
-o bitmsghash32.dll -Wl,--out-implib,bitmsghash.a # "-L$HOME/.wine32/drive_c/OpenSSL-Win32/lib/MinGW" \
# -fPIC -shared -lcrypt32 -leay32 -lwsock32 \
# -o bitmsghash32.dll -Wl,--out-implib,bitmsghash.a
fi fi
} }