Skip to content

Commit

Permalink
Replace original libxml2, xmlsec, openssl with self compiled DLLs wit…
Browse files Browse the repository at this point in the history
…h Visual Studio 2013.
  • Loading branch information
mirus77 committed May 31, 2017
1 parent 266d43a commit 71d2bc1
Show file tree
Hide file tree
Showing 26 changed files with 40 additions and 24 deletions.
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ openssl 1.0.x (libeay32.dll, ssleay32.dll) libs for Indy Https comunication
Delphi project Options for demo TestEET.dpr with USE_LIBEET

```
Delphi Compiler Options -> Conditional Defines :
Delphi Compiler Options -> Conditional Defines :
USE_LIBEET - for using with libeetsigner
USE_INDY - for using in Windows XP required. This is not usable for Delphi Starter Edition.
USE_DIRECTINDY - enable function with direct usage indy for post request and receive response.
USE_LIBEET - for using with libeetsigner
USE_VS_LIBS - use libxml2 and xmlsec compiled with Visual Studio
solution for time_t compatibility
VS 2013 and lower using MSVCRxxx.dll
VS 2015 and higher VCRUNTIME140.dll (ucrtbase.dll)
For x64 binaries of demo use directive USE_LIBEET
Delphi Compiler Options -> Output Directory: ..\bin
Delphi Compiler Options -> Search Path:
Delphi Compiler Options -> Search Path:
$(BDS)\source\soap;..\include\databinding;
..\include\eet;..\include\vcruntime
Delphi Compiler Options -> Unit Output Directory: .\dcu
Expand All @@ -30,6 +37,8 @@ Delphi project Options for demo TestEET.dpr with USE_LIBEET

## Use without USE_LIBEET
Demo need libxml2 and libxmlsec library from : ftp://ftp.zlatkovic.com/libxml/64bit/
or self compiled libXML, XMLSEC with Visual Studio (build scripts at https://github.com/mirus77/build_xmlsoft).

```
libcharset-1.dll
libeay32.dll
Expand All @@ -52,11 +61,16 @@ zlib1.dll
Delphi project Options for demo TestEET.dpr

```
Delphi Compiler Options -> Conditional Defines :
Delphi Compiler Options -> Conditional Defines :
USE_INDY - for using in Windows XP required. This is not usable for Delphi Starter Edition.
USE_DIRECTINDY - enable function with direct usage indy for post request and receive response.
USE_DIRECTINDY - enable function with direct usage indy for post request and receive response.
USE_VS_LIBS - use libeetsigner.dll in debug mode
Default c-runtime msvcrt.dll for MinGW xmlsec1.
For x64 binaries of demo use directive USE_LIBEET
Delphi Compiler Options -> Output Directory: ..\bin
Delphi Compiler Options -> Search Path:
Delphi Compiler Options -> Search Path:
$(BDS)\source\soap;..\include\databinding;
..\include\eet;..\include\synapse;..\include\szutils;
..\include\xmlsec;..\include\vcruntime
Expand Down
Binary file removed bin/libcharset-1.dll
Binary file not shown.
Binary file modified bin/libeay32.dll
Binary file not shown.
Binary file modified bin/libeetsigner.dll
Binary file not shown.
Binary file removed bin/libexslt-0.dll
Binary file not shown.
Binary file removed bin/libgcc_s_dw2-1.dll
Binary file not shown.
Binary file removed bin/libiconv-2.dll
Binary file not shown.
Binary file removed bin/libintl-8.dll
Binary file not shown.
Binary file removed bin/libltdl-7.dll
Binary file not shown.
Binary file removed bin/libwinpthread-1.dll
Binary file not shown.
Binary file removed bin/libxml2-2.dll
Binary file not shown.
Binary file removed bin/libxmlsec1-openssl.dll
Binary file not shown.
Binary file removed bin/libxmlsec1.dll
Binary file not shown.
Binary file removed bin/libxslt-1.dll
Binary file not shown.
Binary file modified bin/openssl.exe
Binary file not shown.
Binary file modified bin/ssleay32.dll
Binary file not shown.
Binary file removed bin/xmlsec1.exe
Binary file not shown.
Binary file removed bin/zlib1.dll
Binary file not shown.
Binary file modified bin64/libeetsigner.dll
Binary file not shown.
5 changes: 4 additions & 1 deletion demo/TestEET.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ program TestEET;
USE_INDY - recompile SOAP comunications with Indy
USE_LIBEET - use wrapper libeetsigner.dll - static compiled into one library (libxml2, xmlsec, openssl)
compiled with Visual Studio 2013 U5 Express - VC12 (VS Runtime 2013) needed MSVCR120.dll
USE_UCRT_LIBS - use libxml2 and xmlsec compiled with Visual Studio
USE_VS_LIBS - use libxml2 and xmlsec compiled with Visual Studio
solution for time_t compatibility
VS 2013 and lower using MSVCRxxx.dll
VS 2015 and higher VCRUNTIME140.dll (ucrtbase.dll)
Default c-rutntime msvcrt.dll for MinGW xmlsec1.
For x64 binaries of demo use directive USE_LIBEET
(for other)
Delphi Compiler Options -> Output Directory: ..\bin
Expand Down
Binary file removed demo/TestEET.res
Binary file not shown.
14 changes: 6 additions & 8 deletions include/vcruntime/vcruntime.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@ interface

const
{$IFDEF USE_LIBEET}
{$IFDEF USE_UCRT_LIBS}
LIBMSVCRT = 'ucrtbase.dll';
{$ELSE}
// LIBMSVCRT = 'ucrtbase.dll'; // Visual Studio 2015 and higher
LIBMSVCRT = 'msvcr120.dll'; // Visual Studio 2013
{$ENDIF}
{$ELSE}
{$IFDEF USE_UCRT_LIBS}
LIBMSVCRT = 'ucrtbase.dll';
{$IFDEF USE_VS_LIBS}
LIBMSVCRT = 'msvcr120.dll'; // Visual Studio 2013
// LIBMSVCRT = 'ucrtbase.dll'; // Visual Studio 2015 and higher
{$ELSE}
LIBMSVCRT = 'msvcrt.dll';
LIBMSVCRT = 'msvcrt.dll'; // MinGW32 libs
{$ENDIF}
{$ENDIF}

type
PFILE = Pointer;

var
// msvcrt.dll utils
// crtuntime utils

crt_fopen : function (const filename, mode: PAnsiChar): PFILE; cdecl;

Expand Down
4 changes: 2 additions & 2 deletions include/xmlsec/libxml2.pas
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface

const
{$IFDEF MSWINDOWS}
LIBXML2_SO = {$IFNDEF USE_UCRT_LIBS}'libxml2-2.dll'{$ELSE}'libxml2.dll'{$ENDIF};
LIBXML2_SO = {$IFNDEF USE_VS_LIBS}'libxml2-2.dll'{$ELSE}'libxml2.dll'{$ENDIF};
{$ELSE}
LIBXML2_SO = 'libxml2.so';
{$ENDIF}
Expand Down Expand Up @@ -4412,7 +4412,7 @@ xmlNs = record

implementation
uses
{$IFDEF WIN32}
{$IFDEF MSWINDOWS}
Windows,
{$ENDIF}
SysUtils;
Expand Down
7 changes: 4 additions & 3 deletions include/xmlsec/libxmlsec.pas
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ interface

const
{$IFDEF MSWINDOWS}
LIBXMLSEC_SO = {$IFDEF USE_UCRT_LIBS}'libxmlsec.dll'{$ELSE}'libxmlsec1.dll'{$ENDIF};
LIBXMLSEC_SO = {$IFDEF USE_VS_LIBS}'libxmlsec.dll'{$ELSE}'libxmlsec1.dll'{$ENDIF};
{$ELSE}
LIBXMLSEC_SO = 'libxmlsec.so';
{$ENDIF}

{$IFNDEF USE_UCRT_LIBS}
{$IFNDEF USE_VS_LIBS}
// for MinGW runtime
{$DEFINE _USE_32BIT_TIME_T}
{$ENDIF}

Expand Down Expand Up @@ -1680,7 +1681,7 @@ _xmlSecTransformKlass = record

implementation
uses
{$IFDEF WIN32}
{$IFDEF MSWINDOWS}
Windows,
{$ENDIF}
SysUtils;
Expand Down
4 changes: 2 additions & 2 deletions include/xmlsec/libxmlsec_openssl.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ interface
uses SysUtils, Classes, {TimeSpan,} libxml2, libxmlsec, libeay32;

const
{$IFDEF WIN32}
LIBXMLSECOPENSSL_SO = {$IFNDEF USE_UCRT_LIBS}'libxmlsec1-openssl.dll'{$ELSE}'libxmlsec-openssl.dll'{$ENDIF};
{$IFDEF MSWINDOWS}
LIBXMLSECOPENSSL_SO = {$IFNDEF USE_VS_LIBS}'libxmlsec1-openssl.dll'{$ELSE}'libxmlsec-openssl.dll'{$ENDIF};
{$ELSE}
LIBXMLSECOPENSSL_SO = 'libxmlsec-openssl.so';
{$ENDIF}
Expand Down
4 changes: 2 additions & 2 deletions include/xmlsec/libxslt.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface
uses libxml2;

const
{$IFDEF WIN32}
{$IFDEF MSWINDOWS}
LIBXSLT_SO = 'libxslt.dll';
{$ELSE}
LIBXSLT_SO = 'libxslt.so';
Expand Down Expand Up @@ -1093,7 +1093,7 @@ xsltVarInfo = record
xsltConstXSLTAttrMarker = 'LRE XLST Attr';
implementation
uses
{$IFDEF WIN32}
{$IFDEF MSWINDOWS}
Windows,
{$ENDIF}
SysUtils;
Expand Down

0 comments on commit 71d2bc1

Please sign in to comment.