Skip to content

Commit

Permalink
Added compatiility for self xmlsec compiling with Visual Studio.
Browse files Browse the repository at this point in the history
  • Loading branch information
mirus77 committed May 30, 2017
1 parent ccaaa15 commit 266d43a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
5 changes: 5 additions & 0 deletions demo/TestEET.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ 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
solution for time_t compatibility
VS 2013 and lower using MSVCRxxx.dll
VS 2015 and higher VCRUNTIME140.dll (ucrtbase.dll)
(for other)
Delphi Compiler Options -> Output Directory: ..\bin
Expand All @@ -25,6 +29,7 @@ program TestEET;


uses
System.SimpleShareMem,
Forms,
u_main in 'u_main.pas' {TestEETForm},
u_EETXMLSchema in '..\include\databinding\u_EETXMLSchema.pas';
Expand Down
2 changes: 1 addition & 1 deletion include/xmlsec/libxml2.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface


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

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

{$IFNDEF USE_UCRT_LIBS}
{$DEFINE _USE_32BIT_TIME_T}
{$ENDIF}

type
{$IFDEF _USE_32BIT_TIME_T}
time_t = LongInt;
{$ELSE}
time_t = Int64;
{$ENDIF}
xmlSecSize = Cardinal;
xmlSecSizePtr = ^xmlSecSize;
xmlSecByte = Byte;
Expand Down

0 comments on commit 266d43a

Please sign in to comment.