aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.windows22
-rwxr-xr-xdist-win.sh48
2 files changed, 0 insertions, 70 deletions
diff --git a/README.windows b/README.windows
index 4d74a2e..2d342fa 100644
--- a/README.windows
+++ b/README.windows
@@ -41,25 +41,3 @@ use the new ABI.
41 41
4264-bit systems always have a 64-bit time_t and are not affected by this 4264-bit systems always have a 64-bit time_t and are not affected by this
43problem. 43problem.
44
45# Using Libressl with Visual Studio
46
47A script for generating ready-to-use .DLL and static .LIB files is included in
48the source repository at
49https://github.com/libressl/portable/blob/master/dist-win.sh
50
51This script uses mingw-w64 to build LibreSSL and then uses Visual Studio tools
52to generate compatible library import files ready-to-use with Visual
53Studio projects. Static and dynamic libraries are included. The script uses
54cv2pdb to generate Visual Studio and windbg compatible debug files. cv2pdb is a
55tool developed for the D language and can be found here:
56https://github.com/rainers/cv2pdb
57
58The mingw-w64 code is largely, but not 100%, compatible with code built from
59Visual Studio. Notably, FILE * pointers cannot be shared between code built for
60Mingw-w64 and Visual Studio.
61
62As of LibreSSL 2.2.2, Visual Studio Native builds can also be produced using
63CMake. This produces ABI-compatible libraries for linking with native code
64generated by Visual Studio. Currently tested versions are VS 2019 and 2022,
65though earlier versions may work as well.
diff --git a/dist-win.sh b/dist-win.sh
deleted file mode 100755
index e4e0fd0..0000000
--- a/dist-win.sh
+++ /dev/null
@@ -1,48 +0,0 @@
1#!/bin/bash
2set -e
3#set -x
4
5export PATH=/cygdrive/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 12.0/VC/bin:$PATH
6VERSION=`cat VERSION`
7DIST=libressl-$VERSION-windows
8
9rm -fr $DIST
10mkdir -p $DIST
11autoreconf -i
12
13for ARCH in X86 X64; do
14
15 if [ $ARCH = X86 ]; then
16 HOST=i686-w64-mingw32
17 ARCHDIR=x86
18 else
19 HOST=x86_64-w64-mingw32
20 ARCHDIR=x64
21 fi
22
23 echo Building for $HOST
24
25 CC=$HOST-gcc ./configure --host=$HOST --with-openssldir=c:/libressl/ssl
26 make clean
27 PATH=$PATH:/usr/$HOST/sys-root/mingw/bin \
28 make -j 4 check
29 make -j 4 install DESTDIR=`pwd`/stage-$ARCHDIR
30
31 mkdir -p $DIST/$ARCHDIR
32 if [ ! -e $DIST/include ]; then
33 cp -r stage-$ARCHDIR/usr/local/include $DIST
34 fi
35
36 cp stage-$ARCHDIR/usr/local/bin/* $DIST/$ARCHDIR
37
38 for i in libcrypto libssl libtls; do
39 DLL=$(basename `ls -1 $DIST/$ARCHDIR/$i*.dll`|cut -d. -f1)
40 echo EXPORTS > $DLL.def
41 dumpbin /exports $DIST/$ARCHDIR/$DLL.dll | \
42 awk '{print $4}' | awk 'NF' |tail -n +9 >> $DLL.def
43 lib /MACHINE:$ARCH /def:$DLL.def /out:$DIST/$ARCHDIR/$DLL.lib
44 cv2pdb $DIST/$ARCHDIR/$DLL.dll
45 done
46done
47
48zip -r $DIST.zip $DIST