diff options
-rw-r--r-- | README.windows | 22 | ||||
-rwxr-xr-x | dist-win.sh | 48 |
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 | ||
42 | 64-bit systems always have a 64-bit time_t and are not affected by this | 42 | 64-bit systems always have a 64-bit time_t and are not affected by this |
43 | problem. | 43 | problem. |
44 | |||
45 | # Using Libressl with Visual Studio | ||
46 | |||
47 | A script for generating ready-to-use .DLL and static .LIB files is included in | ||
48 | the source repository at | ||
49 | https://github.com/libressl/portable/blob/master/dist-win.sh | ||
50 | |||
51 | This script uses mingw-w64 to build LibreSSL and then uses Visual Studio tools | ||
52 | to generate compatible library import files ready-to-use with Visual | ||
53 | Studio projects. Static and dynamic libraries are included. The script uses | ||
54 | cv2pdb to generate Visual Studio and windbg compatible debug files. cv2pdb is a | ||
55 | tool developed for the D language and can be found here: | ||
56 | https://github.com/rainers/cv2pdb | ||
57 | |||
58 | The mingw-w64 code is largely, but not 100%, compatible with code built from | ||
59 | Visual Studio. Notably, FILE * pointers cannot be shared between code built for | ||
60 | Mingw-w64 and Visual Studio. | ||
61 | |||
62 | As of LibreSSL 2.2.2, Visual Studio Native builds can also be produced using | ||
63 | CMake. This produces ABI-compatible libraries for linking with native code | ||
64 | generated by Visual Studio. Currently tested versions are VS 2019 and 2022, | ||
65 | though 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 | ||
2 | set -e | ||
3 | #set -x | ||
4 | |||
5 | export PATH=/cygdrive/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 12.0/VC/bin:$PATH | ||
6 | VERSION=`cat VERSION` | ||
7 | DIST=libressl-$VERSION-windows | ||
8 | |||
9 | rm -fr $DIST | ||
10 | mkdir -p $DIST | ||
11 | autoreconf -i | ||
12 | |||
13 | for 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 | ||
46 | done | ||
47 | |||
48 | zip -r $DIST.zip $DIST | ||